|
1 | | -From 90d97c45dc3f53db32e5e04e0e1f8769d1669c9c Mon Sep 17 00:00:00 2001 |
| 1 | +From f1f76f26f235b0ec4ab8eb63a37bcd75475435ef Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Yichao Yu <yyc1992@gmail.com> |
3 | 3 | Date: Wed, 13 Jul 2022 09:08:18 -0400 |
4 | 4 | Subject: [PATCH] Do not force fusion style |
5 | 5 |
|
6 | 6 | --- |
7 | | - src/app/main.cpp | 1 - |
8 | | - src/framework/ui/api/themeapi.cpp | 10 +++++++++- |
9 | | - 2 files changed, 9 insertions(+), 2 deletions(-) |
| 7 | + src/app/main.cpp | 1 - |
| 8 | + 1 file changed, 1 deletion(-) |
10 | 9 |
|
11 | 10 | diff --git a/src/app/main.cpp b/src/app/main.cpp |
12 | | -index acc4ad4146..1b446f5ec4 100644 |
| 11 | +index 32651d6430..b4fc503b50 100644 |
13 | 12 | --- a/src/app/main.cpp |
14 | 13 | +++ b/src/app/main.cpp |
15 | | -@@ -90,7 +90,6 @@ int main(int argc, char** argv) |
| 14 | +@@ -87,7 +87,6 @@ int main(int argc, char** argv) |
16 | 15 |
|
17 | 16 | app_init_qrc(); |
18 | 17 |
|
19 | 18 | - qputenv("QT_STYLE_OVERRIDE", "Fusion"); |
20 | 19 | qputenv("QML_DISABLE_DISK_CACHE", "true"); |
21 | 20 |
|
22 | | - #ifdef Q_OS_LINUX |
23 | | -diff --git a/src/framework/ui/api/themeapi.cpp b/src/framework/ui/api/themeapi.cpp |
24 | | -index 380c372a4f..b980ee2b37 100644 |
25 | | ---- a/src/framework/ui/api/themeapi.cpp |
26 | | -+++ b/src/framework/ui/api/themeapi.cpp |
27 | | -@@ -502,8 +502,16 @@ void ThemeApi::notifyAboutThemeChanged() |
28 | | - // QStyle |
29 | | - // ==================================================== |
30 | | - |
31 | | -+static QString _get_style_name() |
32 | | -+{ |
33 | | -+ auto style = QApplication::style(); |
34 | | -+ if (style) |
35 | | -+ return style->objectName(); |
36 | | -+ return "Fusion"; |
37 | | -+} |
38 | | -+ |
39 | | - ProxyStyle::ProxyStyle(ThemeApi* t) |
40 | | -- : QProxyStyle(QStyleFactory::create("Fusion")), m_theme(t) |
41 | | -+ : QProxyStyle(QStyleFactory::create(_get_style_name())), m_theme(t) |
42 | | - { |
43 | | - } |
44 | | - |
| 21 | + // HACK: Workaround for crash #28840. This disables the incremental GC |
45 | 22 | -- |
46 | | -2.45.2 |
| 23 | +2.53.0 |
47 | 24 |
|
0 commit comments