QGuiApplication: don't force lower case styleOverride

QtQuick Controls 2.0 is going to have capitalized style names (Material,
Universal, ...) so move the toLower() call to QApplication where widgets
make use of styleOverride.

Change-Id: I5a8c5ee38517690728f5f8f01024d4e692c81668
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
bb10
J-P Nurmi 2016-04-14 16:34:36 +02:00
parent dfe8a85e7c
commit 23ab267c72
2 changed files with 3 additions and 3 deletions

View File

@ -1366,9 +1366,9 @@ void QGuiApplicationPrivate::init()
} else if (strcmp(arg, "-testability") == 0) {
loadTestability = true;
} else if (strncmp(arg, "-style=", 7) == 0) {
s = QString::fromLocal8Bit(arg + 7).toLower();
s = QString::fromLocal8Bit(arg + 7);
} else if (strcmp(arg, "-style") == 0 && i < argc - 1) {
s = QString::fromLocal8Bit(argv[++i]).toLower();
s = QString::fromLocal8Bit(argv[++i]);
} else {
argv[j++] = argv[i];
}

View File

@ -1127,7 +1127,7 @@ QStyle *QApplication::style()
QString style;
QString envStyle = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
if (!QApplicationPrivate::styleOverride.isEmpty()) {
style = QApplicationPrivate::styleOverride;
style = QApplicationPrivate::styleOverride.toLower();
} else if (!envStyle.isEmpty()) {
style = envStyle;
} else {