|
0 |
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
|
1 |
Date: Wed, 8 Feb 2017 12:13:07 +0100
|
|
2 |
Subject: [KCModuleQML] Pass the window as context for paletteChanged
|
|
3 |
|
|
4 |
This disconnects the connection when the window goes away otherwise it might crash.
|
|
5 |
|
|
6 |
CHANGELOG: Fixed potential crash in QML KCMs when application palette changes
|
|
7 |
|
|
8 |
Differential Revision: https://phabricator.kde.org/D4493
|
|
9 |
---
|
|
10 |
src/kcmoduleqml.cpp | 2 +-
|
|
11 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
12 |
|
|
13 |
diff --git a/src/kcmoduleqml.cpp b/src/kcmoduleqml.cpp
|
|
14 |
index a7c23aa..a36d339 100644
|
|
15 |
--- a/src/kcmoduleqml.cpp
|
|
16 |
+++ b/src/kcmoduleqml.cpp
|
|
17 |
@@ -111,7 +111,7 @@ void KCModuleQml::showEvent(QShowEvent *event)
|
|
18 |
widget->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
|
19 |
d->quickWindow = widget->quickWindow();
|
|
20 |
d->quickWindow->setColor(QGuiApplication::palette().window().color());
|
|
21 |
- connect(qApp, &QGuiApplication::paletteChanged, [=]() {
|
|
22 |
+ connect(qApp, &QGuiApplication::paletteChanged, d->quickWindow, [=]() {
|
|
23 |
d->quickWindow->setColor(QGuiApplication::palette().window().color());
|
|
24 |
});
|
|
25 |
|