[neon/kde/plasma-workspace/Neon/unstable] debian/patches: update from https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2592

Jonathan Esk-Riddell null at kde.org
Thu Feb 9 10:42:48 GMT 2023


Git commit fd021e47f4b41f2fae1a23187ae9e13db51bbf0e by Jonathan Esk-Riddell.
Committed on 09/02/2023 at 10:42.
Pushed by jriddell into branch 'Neon/unstable'.

update from https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2592

M  +19   -6    debian/patches/neon_fix-first-run.diff

https://invent.kde.org/neon/kde/plasma-workspace/commit/fd021e47f4b41f2fae1a23187ae9e13db51bbf0e

diff --git a/debian/patches/neon_fix-first-run.diff b/debian/patches/neon_fix-first-run.diff
index f97aae3..77f754a 100644
--- a/debian/patches/neon_fix-first-run.diff
+++ b/debian/patches/neon_fix-first-run.diff
@@ -1,8 +1,16 @@
 diff --git a/kcms/lookandfeel/lookandfeelmanager.cpp b/kcms/lookandfeel/lookandfeelmanager.cpp
-index 9c36a0602..3627c6ff3 100644
+index 9c36a0602..7a9f5d623 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 +19,13 @@ index 9c36a0602..3627c6ff3 100644
 -    std::unique_ptr<QStyle> testStyle(QStyleFactory::create(style));
 -    if (!testStyle) {
 -        return;
--    }
--
++    if (qobject_cast<QGuiApplication *>(QCoreApplication::instance())) {
++        // 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