on xenial help sign in
add some debug print if parsing the options doesn't work out
commitf0993e609431464855c02e69b47dcda8eb4da964 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 12 Feb 2016, 13:47 (11 years ago) parentd4f49a5
1 file changed+5
plugins/Utils/deviceconfigparser.cpp+5
plugins/Utils/deviceconfigparser.cpp+5
@@ -18,6 +18,7 @@
1818
1919#include <QSettings>
2020#include <QFileInfo>
21+#include <QDebug>
2122
2223DeviceConfigParser::DeviceConfigParser(QObject *parent): QObject(parent)
2324{
@@ -118,5 +119,9 @@ Qt::ScreenOrientation DeviceConfigParser::stringToOrientation(const QString &ori
118119 if (orientationString == "InvertedPortrait") {
119120 return Qt::InvertedPortraitOrientation;
120121 }
122+ if (!orientationString.isEmpty()) {
123+ // Some option we don't know. Give some hint on what went wrong.
124+ qWarning().nospace().noquote() << "Unknown option \"" << orientationString << "\". Supported options are: Landscape, InvertedLandscape, Portrait and InvertedPortrait.";
125+ }
121126 return defaultValue;
122127}