mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +01:00
Added hack to fix QT_STYLE_OVERRIDE with QProxyStyle
Forcing a widget style with QT_STYLE_OVERRIDE env variable does not work when the app is using a QProxyStyle. Manually appending the -style=$QT_STYLE_OVERRIDE to command line arguments workarounds the issue. Closes #1357
This commit is contained in:
parent
7fc0c8d06d
commit
7a1f4c77cd
|
@ -167,6 +167,18 @@ int main(int argc, char* argv[])
|
||||||
signal(SIGSEGV, qupzilla_signal_handler);
|
signal(SIGSEGV, qupzilla_signal_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Hack to fix QT_STYLE_OVERRIDE with QProxyStyle
|
||||||
|
const QByteArray style = qgetenv("QT_STYLE_OVERRIDE");
|
||||||
|
if (!style.isEmpty()) {
|
||||||
|
char **args = (char**) malloc(sizeof(char*) * (argc + 1));
|
||||||
|
for (int i = 0; i < argc; ++i)
|
||||||
|
args[i] = argv[i];
|
||||||
|
|
||||||
|
QString stylecmd = QL1S("-style=") + style;
|
||||||
|
args[argc++] = qstrdup(stylecmd.toUtf8().constData());
|
||||||
|
argv = args;
|
||||||
|
}
|
||||||
|
|
||||||
MainApplication app(argc, argv);
|
MainApplication app(argc, argv);
|
||||||
|
|
||||||
if (app.isClosing())
|
if (app.isClosing())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user