diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | qt5ct-shenanigans.patch | 76 |
3 files changed, 69 insertions, 21 deletions
@@ -1,6 +1,6 @@ pkgbase = qt5ct-kde pkgdesc = Qt5 Configuration Utility, patched to work correctly with KDE applications - pkgver = 1.3 + pkgver = 1.5 pkgrel = 1 url = https://qt5ct.sourceforge.io/ arch = x86_64 @@ -10,9 +10,9 @@ pkgbase = qt5ct-kde depends = qqc2-desktop-style provides = qt5ct conflicts = qt5ct - source = https://downloads.sourceforge.net/project/qt5ct/qt5ct-1.3.tar.bz2 + source = https://downloads.sourceforge.net/project/qt5ct/qt5ct-1.5.tar.bz2 source = qt5ct-shenanigans.patch - sha256sums = dd443b14e590aff76a16e1316d56e688882e3248c470df4f71bc952569f3c3bc - sha256sums = bdac1e0bf247e2ae054f3ad5f8069b41f84ac60740a1afa9e9433908c71ae0f4 + sha256sums = d63d0ce16e02427207d86531f70a71c5b9c850044dd5b2dcb2285531f416e490 + sha256sums = 3e9d5ed24366a674fa5ab2df52d1e01fb956598b27ffb4e8e2d06ba7bb355aa0 pkgname = qt5ct-kde @@ -4,7 +4,7 @@ pkgname=qt5ct-kde _pkgname=qt5ct -pkgver=1.3 +pkgver=1.5 pkgrel=1 pkgdesc='Qt5 Configuration Utility, patched to work correctly with KDE applications' arch=(x86_64) @@ -16,8 +16,8 @@ conflicts=(qt5ct) provides=(qt5ct) source=(https://downloads.sourceforge.net/project/$_pkgname/$_pkgname-$pkgver.tar.bz2 qt5ct-shenanigans.patch) -sha256sums=('dd443b14e590aff76a16e1316d56e688882e3248c470df4f71bc952569f3c3bc' - 'bdac1e0bf247e2ae054f3ad5f8069b41f84ac60740a1afa9e9433908c71ae0f4') +sha256sums=('d63d0ce16e02427207d86531f70a71c5b9c850044dd5b2dcb2285531f416e490' + '3e9d5ed24366a674fa5ab2df52d1e01fb956598b27ffb4e8e2d06ba7bb355aa0') prepare() { patch -d $_pkgname-$pkgver -p1 < qt5ct-shenanigans.patch # The magic diff --git a/qt5ct-shenanigans.patch b/qt5ct-shenanigans.patch index 650a04380e27..48ea67f3ffbc 100644 --- a/qt5ct-shenanigans.patch +++ b/qt5ct-shenanigans.patch @@ -1,6 +1,6 @@ Index: qt5ct/CMakeLists.txt =================================================================== ---- qt5ct/CMakeLists.txt (revision 600) +--- qt5ct/CMakeLists.txt (revision 622) +++ qt5ct/CMakeLists.txt (working copy) @@ -24,8 +24,11 @@ @@ -28,7 +28,7 @@ Index: qt5ct/CMakeLists.txt message(STATUS "Generating translations ...") Index: qt5ct/src/qt5ct/appearancepage.cpp =================================================================== ---- qt5ct/src/qt5ct/appearancepage.cpp (revision 600) +--- qt5ct/src/qt5ct/appearancepage.cpp (revision 622) +++ qt5ct/src/qt5ct/appearancepage.cpp (working copy) @@ -86,6 +86,8 @@ #else @@ -50,7 +50,7 @@ Index: qt5ct/src/qt5ct/appearancepage.cpp { Index: qt5ct/src/qt5ct/qt5ct.cpp =================================================================== ---- qt5ct/src/qt5ct/qt5ct.cpp (revision 600) +--- qt5ct/src/qt5ct/qt5ct.cpp (revision 622) +++ qt5ct/src/qt5ct/qt5ct.cpp (working copy) @@ -111,6 +111,7 @@ for(const QString &p : QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation)) @@ -62,24 +62,24 @@ Index: qt5ct/src/qt5ct/qt5ct.cpp paths.removeDuplicates(); Index: qt5ct/src/qt5ct-qtplugin/CMakeLists.txt =================================================================== ---- qt5ct/src/qt5ct-qtplugin/CMakeLists.txt (revision 600) +--- qt5ct/src/qt5ct-qtplugin/CMakeLists.txt (revision 622) +++ qt5ct/src/qt5ct-qtplugin/CMakeLists.txt (working copy) @@ -10,5 +10,5 @@ add_library(qt5ct-qtplugin MODULE ${app_SRCS}) set_target_properties(qt5ct-qtplugin PROPERTIES OUTPUT_NAME qt5ct) -target_link_libraries(qt5ct-qtplugin PRIVATE Qt5::Widgets Qt5::GuiPrivate Qt5::DBus Qt5::ThemeSupportPrivate) -+target_link_libraries(qt5ct-qtplugin PRIVATE Qt5::Widgets Qt5::GuiPrivate Qt5::DBus Qt::QuickControls2 Qt5::ThemeSupportPrivate KF5::ConfigCore KF5::ConfigWidgets KF5::IconThemes) ++target_link_libraries(qt5ct-qtplugin PRIVATE Qt5::Widgets Qt5::GuiPrivate Qt5::DBus Qt5::QuickControls2 Qt5::ThemeSupportPrivate KF5::ConfigCore KF5::ConfigWidgets KF5::IconThemes) install(TARGETS qt5ct-qtplugin DESTINATION ${PLUGINDIR}/platformthemes) Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp =================================================================== ---- qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp (revision 600) +--- qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp (revision 622) +++ qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp (working copy) @@ -45,6 +45,7 @@ #endif #include <QFile> #include <QFileSystemWatcher> -+#include <QtQuickControls2/QQuickStyle> ++#include <QQuickStyle> #include <qt5ct/qt5ct.h> #include "qt5ctplatformtheme.h" @@ -106,7 +106,15 @@ Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp } qCDebug(lqt5ct) << "using qt5ct plugin"; #ifdef QT_WIDGETS_LIB -@@ -192,6 +202,11 @@ +@@ -81,6 +91,7 @@ + if(!QStyleFactory::keys().contains("qt5ct-style")) + qCCritical(lqt5ct) << "unable to find qt5ct proxy style"; + #endif ++ QCoreApplication::instance()->installEventFilter(this); + } + + Qt5CTPlatformTheme::~Qt5CTPlatformTheme() +@@ -195,6 +206,11 @@ } #endif @@ -117,26 +125,60 @@ Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp + void Qt5CTPlatformTheme::applySettings() { - if(!QGuiApplication::desktopSettingsAware()) -@@ -306,7 +321,12 @@ + if(!QGuiApplication::desktopSettingsAware() || m_isIgnored) +@@ -313,7 +329,15 @@ if(!schemePath.isEmpty() && settings.value("custom_palette", false).toBool()) { schemePath = Qt5CT::resolvePath(schemePath); //replace environment variables - m_palette = new QPalette(loadColorScheme(schemePath)); -+ if(schemePath.endsWith(".colors")) { ++ if(schemePath.endsWith(".colors")) ++ { + m_palette = new QPalette(KColorScheme::createApplicationPalette(KSharedConfig::openConfig(schemePath))); + qApp->setProperty("KDE_COLOR_SCHEME_PATH", schemePath); -+ } else { ++ } ++ else ++ { + m_palette = new QPalette(loadColorScheme(schemePath)); + } } m_iconTheme = settings.value("icon_theme").toString(); //load dialogs +@@ -480,3 +504,30 @@ + + return customPalette; + } ++ ++bool Qt5CTPlatformTheme::eventFilter(QObject *obj, QEvent *e) ++{ ++ if(obj == qApp && e->type() == QEvent::DynamicPropertyChange) ++ { ++ QDynamicPropertyChangeEvent *ee = static_cast<QDynamicPropertyChangeEvent*>(e); ++ if(ee->propertyName() == "KDE_COLOR_SCHEME_PATH") ++ { ++ if(qApp->property("KDE_COLOR_SCHEME_PATH").isNull()) ++ { ++ QSettings settings(Qt5CT::configFile(), QSettings::IniFormat); ++ settings.beginGroup("Appearance"); ++ QString schemePath = settings.value("color_scheme_path").toString(); ++ if(!schemePath.isEmpty() && settings.value("custom_palette", false).toBool()) ++ { ++ schemePath = Qt5CT::resolvePath(schemePath); //replace environment variables ++ if(schemePath.endsWith(".colors")) ++ { ++ qApp->setProperty("KDE_COLOR_SCHEME_PATH", schemePath); ++ applySettings(); ++ } ++ } ++ } ++ } ++ } ++ return QObject::eventFilter(obj, e); ++} Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h =================================================================== ---- qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h (revision 600) +--- qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h (revision 622) +++ qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h (working copy) -@@ -91,7 +91,7 @@ +@@ -91,10 +91,13 @@ //virtual QPixmap fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &size, // QPlatformTheme::IconOptions iconOptions = 0) const; @@ -145,3 +187,9 @@ Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h //virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const; //virtual QString standardButtonText(int button) const; ++protected: ++ bool eventFilter(QObject *obj, QEvent *e) override; ++ + private slots: + void applySettings(); + #ifdef QT_WIDGETS_LIB |