summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Fedin2024-03-28 05:17:33 +0400
committerIlya Fedin2024-03-28 05:17:33 +0400
commit54c5be653556d0b885abb838c9181e12c921a5ca (patch)
tree508fcea60c383aa37c4ac67dcd9b49decfa5b278
parent4e596c308e4e9a3e6e3a1c155f2100f936a26e1d (diff)
downloadaur-54c5be653556d0b885abb838c9181e12c921a5ca.tar.gz
Patch cosmetic improvements
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--qt5ct-shenanigans.patch54
3 files changed, 51 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1810d6c89ee3..4416833b9ded 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = qt5ct-kde
pkgdesc = Qt5 Configuration Utility, patched to work correctly with KDE applications
pkgver = 1.8
- pkgrel = 2
+ pkgrel = 3
url = https://qt5ct.sourceforge.io/
arch = x86_64
license = BSD
@@ -13,6 +13,6 @@ pkgbase = qt5ct-kde
source = https://downloads.sourceforge.net/project/qt5ct/qt5ct-1.8.tar.bz2
source = qt5ct-shenanigans.patch
sha256sums = 23b74054415ea4124328772ef9a6f95083a9b86569e128034a3ff75dfad808e9
- sha256sums = 63c51ffc1fbad13020fb61358b811fa249b173d41d7b573e9b1374e77a2a64f8
+ sha256sums = 0d7ed1e56fa9c7e97db01ccc8d0223b4835ab44c512593f0344894d4d23d1c97
pkgname = qt5ct-kde
diff --git a/PKGBUILD b/PKGBUILD
index 6b1b44602277..58277d5fbde9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=qt5ct-kde
_pkgname=qt5ct
pkgver=1.8
-pkgrel=2
+pkgrel=3
pkgdesc='Qt5 Configuration Utility, patched to work correctly with KDE applications'
arch=(x86_64)
url='https://qt5ct.sourceforge.io/'
@@ -17,7 +17,7 @@ provides=($_pkgname)
source=(https://downloads.sourceforge.net/project/$_pkgname/$_pkgname-$pkgver.tar.bz2
$_pkgname-shenanigans.patch)
sha256sums=('23b74054415ea4124328772ef9a6f95083a9b86569e128034a3ff75dfad808e9'
- '63c51ffc1fbad13020fb61358b811fa249b173d41d7b573e9b1374e77a2a64f8')
+ '0d7ed1e56fa9c7e97db01ccc8d0223b4835ab44c512593f0344894d4d23d1c97')
prepare() {
patch -d $_pkgname-$pkgver -p1 < $_pkgname-shenanigans.patch # The magic
diff --git a/qt5ct-shenanigans.patch b/qt5ct-shenanigans.patch
index a9a1d0df588f..fb677a993a4d 100644
--- a/qt5ct-shenanigans.patch
+++ b/qt5ct-shenanigans.patch
@@ -26,11 +26,32 @@ Index: qt5ct/CMakeLists.txt
message(STATUS "Plugin path: " ${PLUGINDIR})
message(STATUS "Generating translations ...")
+Index: qt5ct/src/qt5ct/CMakeLists.txt
+===================================================================
+--- qt5ct/src/qt5ct/CMakeLists.txt (revision 690)
++++ qt5ct/src/qt5ct/CMakeLists.txt (working copy)
+@@ -28,6 +28,6 @@
+ )
+
+ add_executable(qt5ct ${app_SRCS})
+-target_link_libraries(qt5ct PRIVATE Qt5::Widgets Qt5::Concurrent Qt5::WidgetsPrivate qt5ct-common)
++target_link_libraries(qt5ct PRIVATE Qt5::Widgets Qt5::Concurrent Qt5::WidgetsPrivate KF5::ConfigCore qt5ct-common)
+ install(TARGETS qt5ct DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES qt5ct.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
Index: qt5ct/src/qt5ct/appearancepage.cpp
===================================================================
--- qt5ct/src/qt5ct/appearancepage.cpp (revision 690)
+++ qt5ct/src/qt5ct/appearancepage.cpp (working copy)
-@@ -378,7 +378,7 @@
+@@ -35,6 +35,8 @@
+ #include <QMenu>
+ #include <QIcon>
+ #include <QStringList>
++#include <KSharedConfig>
++#include <KConfigGroup>
+ #include <qpa/qplatformthemefactory_p.h>
+ #include "qt5ct.h"
+ #include "appearancepage.h"
+@@ -378,11 +380,22 @@
{
QDir dir(path);
dir.setFilter(QDir::Files);
@@ -39,6 +60,22 @@ Index: qt5ct/src/qt5ct/appearancepage.cpp
for(const QFileInfo &info : dir.entryInfoList())
{
+- m_ui->colorSchemeComboBox->addItem(info.baseName(), info.filePath());
++ QString name;
++ QString path = info.filePath();
++ if(info.suffix() == "colors") {
++ KSharedConfigPtr config = KSharedConfig::openConfig(path, KConfig::SimpleConfig);
++ KConfigGroup group(config, "General");
++ name = group.readEntry("Name", info.baseName()) + " (KColorScheme)";
++ }
++ else
++ {
++ name = info.baseName();
++ }
++ m_ui->colorSchemeComboBox->addItem(name, path);
+ }
+ }
+
Index: qt5ct/src/qt5ct-common/qt5ct.cpp
===================================================================
--- qt5ct/src/qt5ct-common/qt5ct.cpp (revision 690)
@@ -80,10 +117,10 @@ Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
#include <QStringList>
#include <qpa/qplatformthemefactory_p.h>
-+#include <ksharedconfig.h>
-+#include <kcolorscheme.h>
-+#include <kiconengine.h>
-+#include <kiconloader.h>
++#include <KSharedConfig>
++#include <KColorScheme>
++#include <KIconEngine>
++#include <KIconLoader>
+
Q_LOGGING_CATEGORY(lqt5ct, "qt5ct", QtWarningMsg)
@@ -92,7 +129,7 @@ Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
QMetaObject::invokeMethod(this, "createFSWatcher", Qt::QueuedConnection);
#endif
QGuiApplication::setFont(m_generalFont);
-+ //if the user has explicitly set something else, don't interfere
++ //don't override the value explicitly set by the user
+ if (QQuickStyle::name().isEmpty()) {
+ QQuickStyle::setStyle(QLatin1String("org.kde.desktop"));
+ }
@@ -136,11 +173,14 @@ Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
}
m_iconTheme = settings.value("icon_theme").toString();
//load dialogs
-@@ -414,3 +438,30 @@
+@@ -414,3 +438,33 @@
content.replace(regExp, "\n");
return content;
}
+
++//There's such a thing as KColorSchemeManager that lets the user to change the color scheme
++//application-wide and we should re-apply the color scheme if KCSM resets it to the default
++//which leads KColorScheme to get the color scheme from kdeglobals which won't help us.
+bool Qt5CTPlatformTheme::eventFilter(QObject *obj, QEvent *e)
+{
+ if(obj == qApp && e->type() == QEvent::DynamicPropertyChange)