[neon/kde/plasma-workspace/Neon/unstable] debian/patches: update patch from https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2592
Jonathan Esk-Riddell
null at kde.org
Wed Feb 8 17:09:35 GMT 2023
Git commit 3f496d2cf23fc8647d7084e99bd549178e044f29 by Jonathan Esk-Riddell.
Committed on 08/02/2023 at 17:09.
Pushed by jriddell into branch 'Neon/unstable'.
update patch from https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2592
M +34 -6 debian/patches/neon_fix-first-run.diff
https://invent.kde.org/neon/kde/plasma-workspace/commit/3f496d2cf23fc8647d7084e99bd549178e044f29
diff --git a/debian/patches/neon_fix-first-run.diff b/debian/patches/neon_fix-first-run.diff
index f97aae3..89ff89b 100644
--- a/debian/patches/neon_fix-first-run.diff
+++ b/debian/patches/neon_fix-first-run.diff
@@ -1,8 +1,31 @@
+commit 7bbe2cea6f803aae5fd77014b1ad9f34638a9175
+Author: David Edmundson <kde at davidedmundson.co.uk>
+Date: Tue Feb 7 22:42:09 2023 +0000
+
+ kcms/lookandfeel: Guard for QGuiApplication before using styles
+
+ LookandFeelManager is invoked from QCoreApplcation startplasma. This
+ must remain a QCoreApplication as it starts up kwin_wayland.
+
+ This newly added safety check in lookandfeelmanager meant we loaded the
+ style. Use of QGui libraries in a QCoreApplication is undefined or
+ worse.
+
+ startplasma should only call us with a hardcoded default.
+
diff --git a/kcms/lookandfeel/lookandfeelmanager.cpp b/kcms/lookandfeel/lookandfeelmanager.cpp
-index 9c36a0602..3627c6ff3 100644
+index 9c36a0602..f6d01a358 100644
--- a/kcms/lookandfeel/lookandfeelmanager.cpp
+++ b/kcms/lookandfeel/lookandfeelmanager.cpp
-@@ -229,13 +229,6 @@ void LookAndFeelManager::setWidgetStyle(const QString &style)
+@@ -20,6 +20,7 @@
+ #include <KSharedConfig>
+ #include <QDBusConnection>
+ #include <QDBusMessage>
++#include <QGuiApplication>
+ #include <QStyle>
+ #include <QStyleFactory>
+
+@@ -229,11 +230,13 @@ void LookAndFeelManager::setWidgetStyle(const QString &style)
return;
}
@@ -11,8 +34,13 @@ index 9c36a0602..3627c6ff3 100644
- std::unique_ptr<QStyle> testStyle(QStyleFactory::create(style));
- if (!testStyle) {
- return;
-- }
--
++ if (qGuiApp) {
++ // Some global themes use styles that may not be installed.
++ // Test if style can be installed before updating the config.
++ std::unique_ptr<QStyle> testStyle(QStyleFactory::create(style));
++ if (!testStyle) {
++ return;
++ }
+ }
+
writeNewDefaults(QStringLiteral("kdeglobals"), QStringLiteral("KDE"), QStringLiteral("widgetStyle"), style, KConfig::Notify);
- Q_EMIT styleChanged(style);
- }
More information about the Neon-commits
mailing list