When warning about invalid style override also print available ones
Change-Id: Ia017a342648a1f1e1185e74ddec1a77cb6dcfebe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
589f9f179c
commit
da37291f28
@ -1064,8 +1064,10 @@ QStyle *QApplication::style()
|
||||
if (!QApplicationPrivate::styleOverride.isEmpty()) {
|
||||
const QString style = QApplicationPrivate::styleOverride.toLower();
|
||||
app_style = QStyleFactory::create(style);
|
||||
if (!app_style)
|
||||
qWarning("QApplication: invalid style override passed, ignoring it.");
|
||||
if (Q_UNLIKELY(!app_style)) {
|
||||
qWarning("QApplication: invalid style override passed, ignoring it.\n"
|
||||
" Available styles: %s", qPrintable(QStyleFactory::keys().join(QLatin1String(", "))));
|
||||
}
|
||||
}
|
||||
if (!app_style)
|
||||
app_style = QStyleFactory::create(QApplicationPrivate::desktopStyleKey());
|
||||
|
Loading…
Reference in New Issue
Block a user