[arch-commits] Commit in qt5ct/trunk (PKGBUILD qt5.15-palette.patch)

2020-06-01 Thread Antonio Rojas via arch-commits
Date: Monday, June 1, 2020 @ 12:57:50
  Author: arojas
Revision: 637817

Add upstream QPalette fixes for Qt 5.15

Added:
  qt5ct/trunk/qt5.15-palette.patch
Modified:
  qt5ct/trunk/PKGBUILD

--+
 PKGBUILD |   13 +-
 qt5.15-palette.patch |   95 +
 2 files changed, 105 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-06-01 12:55:10 UTC (rev 637816)
+++ PKGBUILD2020-06-01 12:57:50 UTC (rev 637817)
@@ -4,7 +4,7 @@
 
 pkgname=qt5ct
 pkgver=0.41
-pkgrel=3
+pkgrel=4
 pkgdesc="Qt5 Configuration Utility"
 arch=(x86_64)
 url="https://qt5ct.sourceforge.io/";
@@ -11,9 +11,16 @@
 license=(BSD)
 depends=(qt5-svg)
 makedepends=(qt5-tools)
-source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2";)
-sha256sums=('f24030e90d8b923b60c320b2db5b4c0fcc47f9f35ac4c52060ab3c6e423057dc')
+source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2";
+ qt5.15-palette.patch)
+sha256sums=('f24030e90d8b923b60c320b2db5b4c0fcc47f9f35ac4c52060ab3c6e423057dc'
+'62c52be677fa133b46134d5f7713f46b4db382721e66480c5810706cafb31c44')
 
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p3 -i ../qt5.15-palette.patch # Fix QPalette use with Qt 5.15
+}
+
 build() {
   cd $pkgname-$pkgver
   qmake-qt5 $pkgname.pro 

Added: qt5.15-palette.patch
===
--- qt5.15-palette.patch(rev 0)
+++ qt5.15-palette.patch2020-06-01 12:57:50 UTC (rev 637817)
@@ -0,0 +1,95 @@
+--- a/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
 b/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
+@@ -84,8 +84,8 @@
+ 
+ Qt5CTPlatformTheme::~Qt5CTPlatformTheme()
+ {
+-if(m_customPalette)
+-delete m_customPalette;
++if(m_palette)
++delete m_palette;
+ 
+ }
+ 
+@@ -134,7 +134,7 @@
+ const QPalette *Qt5CTPlatformTheme::palette(QPlatformTheme::Palette type) 
const
+ {
+ Q_UNUSED(type);
+-return (m_usePalette ? m_customPalette : nullptr);
++return (m_usePalette ? m_palette : nullptr);
+ }
+ 
+ const QFont *Qt5CTPlatformTheme::font(QPlatformTheme::Font type) const
+@@ -226,13 +226,12 @@
+ if(m_update && qApp->style()->objectName() == "qt5ct-style") //ignore 
application style
+ qApp->setStyle("qt5ct-style"); //recreate style object
+ 
++if(!m_palette)
++m_palette = new QPalette(qApp->style()->standardPalette());
++
+ if(m_update && m_usePalette)
+-{
+-if(m_customPalette)
+-qApp->setPalette(*m_customPalette);
+-else
+-qApp->setPalette(qApp->style()->standardPalette());
+-}
++qApp->setPalette(*m_palette);
++
+ 
+ //do not override application style
+ if(m_prevStyleSheet == qApp->styleSheet())
+@@ -244,12 +243,12 @@
+ #endif
+ QGuiApplication::setFont(m_generalFont); //apply font
+ QIcon::setThemeName(m_iconTheme); //apply icons
+-if(m_customPalette && m_usePalette)
+-QGuiApplication::setPalette(*m_customPalette); //apply palette
+-
+-#ifdef QT_WIDGETS_LIB
+-if(m_customPalette && m_usePalette && !m_update)
+-qApp->setPalette(*m_customPalette);
++if(m_palette && m_usePalette)
++QGuiApplication::setPalette(*m_palette); //apply palette
++
++#ifdef QT_WIDGETS_LIB
++if(m_palette && m_usePalette && !m_update)
++qApp->setPalette(*m_palette);
+ 
+ if(hasWidgets())
+ {
+@@ -288,10 +287,10 @@
+ 
+ void Qt5CTPlatformTheme::readSettings()
+ {
+-if(m_customPalette)
+-{
+-delete m_customPalette;
+-m_customPalette = nullptr;
++if(m_palette)
++{
++delete m_palette;
++m_palette = nullptr;
+ }
+ 
+ QSettings settings(Qt5CT::configFile(), QSettings::IniFormat);
+@@ -302,7 +301,7 @@
+ if(!schemePath.isEmpty() && settings.value("custom_palette", 
false).toBool())
+ {
+ schemePath = Qt5CT::resolvePath(schemePath); //replace environment 
variables
+-m_customPalette = new QPalette(loadColorScheme(schemePath));
++m_palette = new QPalette(loadColorScheme(schemePath));
+ }
+ m_iconTheme = settings.value("icon_theme").toString();
+ //load dialogs
+--- a/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h
 b/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h
+@@ -110,7 +110,7 @@
+ QString loadStyleSheets(const QStringList &paths);
+ QPalette loadColorScheme(const QString &filePath);
+ QString m_style, m_iconTheme, m_userStyleSheet, m_prevStyleSheet;
+-QPalette *m_customPalette = nullptr;
++QPalette *m_palette = nullptr;
+ QFont m_generalFont, m_fixedFont;
+ int m_doubleClickInterval;
+ int m_cursorFlashTime;


[arch-commits] Commit in qt5ct/trunk (PKGBUILD qt5.15-palette.patch)

2020-06-04 Thread Antonio Rojas via arch-commits
Date: Thursday, June 4, 2020 @ 20:48:10
  Author: arojas
Revision: 639043

Fix crashes in multiple applications (FS#66883)

Modified:
  qt5ct/trunk/PKGBUILD
  qt5ct/trunk/qt5.15-palette.patch

--+
 PKGBUILD |4 ++--
 qt5.15-palette.patch |   13 +
 2 files changed, 15 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-06-04 20:03:05 UTC (rev 639042)
+++ PKGBUILD2020-06-04 20:48:10 UTC (rev 639043)
@@ -4,7 +4,7 @@
 
 pkgname=qt5ct
 pkgver=0.41
-pkgrel=4
+pkgrel=5
 pkgdesc="Qt5 Configuration Utility"
 arch=(x86_64)
 url="https://qt5ct.sourceforge.io/";
@@ -14,7 +14,7 @@
 
source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2";
  qt5.15-palette.patch)
 sha256sums=('f24030e90d8b923b60c320b2db5b4c0fcc47f9f35ac4c52060ab3c6e423057dc'
-'62c52be677fa133b46134d5f7713f46b4db382721e66480c5810706cafb31c44')
+'98e87d63bd3873decf7364fe1ba70c075eee94f561a0aad06e78bd66b61149e1')
 
 prepare() {
   cd $pkgname-$pkgver

Modified: qt5.15-palette.patch
===
--- qt5.15-palette.patch2020-06-04 20:03:05 UTC (rev 639042)
+++ qt5.15-palette.patch2020-06-04 20:48:10 UTC (rev 639043)
@@ -93,3 +93,16 @@
  QFont m_generalFont, m_fixedFont;
  int m_doubleClickInterval;
  int m_cursorFlashTime;
+--- a/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
 b/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
+@@ -133,8 +133,7 @@
+ 
+ const QPalette *Qt5CTPlatformTheme::palette(QPlatformTheme::Palette type) 
const
+ {
+-Q_UNUSED(type);
+-return (m_usePalette ? m_palette : nullptr);
++return (m_usePalette && m_palette) ? m_palette : 
QPlatformTheme::palette(type);
+ }
+ 
+ const QFont *Qt5CTPlatformTheme::font(QPlatformTheme::Font type) const
+


[arch-commits] Commit in qt5ct/trunk (PKGBUILD qt5.15-palette.patch)

2020-06-10 Thread Antonio Rojas via arch-commits
Date: Wednesday, June 10, 2020 @ 17:45:36
  Author: arojas
Revision: 641834

Update to 1.0

Modified:
  qt5ct/trunk/PKGBUILD
Deleted:
  qt5ct/trunk/qt5.15-palette.patch

--+
 PKGBUILD |   15 +-
 qt5.15-palette.patch |  108 -
 2 files changed, 4 insertions(+), 119 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-06-10 17:39:01 UTC (rev 641833)
+++ PKGBUILD2020-06-10 17:45:36 UTC (rev 641834)
@@ -3,8 +3,8 @@
 # Contributor: Zatherz 
 
 pkgname=qt5ct
-pkgver=0.41
-pkgrel=5
+pkgver=1.0
+pkgrel=1
 pkgdesc="Qt5 Configuration Utility"
 arch=(x86_64)
 url="https://qt5ct.sourceforge.io/";
@@ -11,16 +11,9 @@
 license=(BSD)
 depends=(qt5-svg)
 makedepends=(qt5-tools)
-source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2";
- qt5.15-palette.patch)
-sha256sums=('f24030e90d8b923b60c320b2db5b4c0fcc47f9f35ac4c52060ab3c6e423057dc'
-'98e87d63bd3873decf7364fe1ba70c075eee94f561a0aad06e78bd66b61149e1')
+source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2";)
+sha256sums=('a92c7bbdaf8182ce38c1a49e34d30f5b79ec75bd70a4bfabeb9b7cb0e0971a85')
 
-prepare() {
-  cd $pkgname-$pkgver
-  patch -p3 -i ../qt5.15-palette.patch # Fix QPalette use with Qt 5.15
-}
-
 build() {
   cd $pkgname-$pkgver
   qmake-qt5 $pkgname.pro 

Deleted: qt5.15-palette.patch
===
--- qt5.15-palette.patch2020-06-10 17:39:01 UTC (rev 641833)
+++ qt5.15-palette.patch2020-06-10 17:45:36 UTC (rev 641834)
@@ -1,108 +0,0 @@
 a/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
-+++ b/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
-@@ -84,8 +84,8 @@
- 
- Qt5CTPlatformTheme::~Qt5CTPlatformTheme()
- {
--if(m_customPalette)
--delete m_customPalette;
-+if(m_palette)
-+delete m_palette;
- 
- }
- 
-@@ -134,7 +134,7 @@
- const QPalette *Qt5CTPlatformTheme::palette(QPlatformTheme::Palette type) 
const
- {
- Q_UNUSED(type);
--return (m_usePalette ? m_customPalette : nullptr);
-+return (m_usePalette ? m_palette : nullptr);
- }
- 
- const QFont *Qt5CTPlatformTheme::font(QPlatformTheme::Font type) const
-@@ -226,13 +226,12 @@
- if(m_update && qApp->style()->objectName() == "qt5ct-style") //ignore 
application style
- qApp->setStyle("qt5ct-style"); //recreate style object
- 
-+if(!m_palette)
-+m_palette = new QPalette(qApp->style()->standardPalette());
-+
- if(m_update && m_usePalette)
--{
--if(m_customPalette)
--qApp->setPalette(*m_customPalette);
--else
--qApp->setPalette(qApp->style()->standardPalette());
--}
-+qApp->setPalette(*m_palette);
-+
- 
- //do not override application style
- if(m_prevStyleSheet == qApp->styleSheet())
-@@ -244,12 +243,12 @@
- #endif
- QGuiApplication::setFont(m_generalFont); //apply font
- QIcon::setThemeName(m_iconTheme); //apply icons
--if(m_customPalette && m_usePalette)
--QGuiApplication::setPalette(*m_customPalette); //apply palette
--
--#ifdef QT_WIDGETS_LIB
--if(m_customPalette && m_usePalette && !m_update)
--qApp->setPalette(*m_customPalette);
-+if(m_palette && m_usePalette)
-+QGuiApplication::setPalette(*m_palette); //apply palette
-+
-+#ifdef QT_WIDGETS_LIB
-+if(m_palette && m_usePalette && !m_update)
-+qApp->setPalette(*m_palette);
- 
- if(hasWidgets())
- {
-@@ -288,10 +287,10 @@
- 
- void Qt5CTPlatformTheme::readSettings()
- {
--if(m_customPalette)
--{
--delete m_customPalette;
--m_customPalette = nullptr;
-+if(m_palette)
-+{
-+delete m_palette;
-+m_palette = nullptr;
- }
- 
- QSettings settings(Qt5CT::configFile(), QSettings::IniFormat);
-@@ -302,7 +301,7 @@
- if(!schemePath.isEmpty() && settings.value("custom_palette", 
false).toBool())
- {
- schemePath = Qt5CT::resolvePath(schemePath); //replace environment 
variables
--m_customPalette = new QPalette(loadColorScheme(schemePath));
-+m_palette = new QPalette(loadColorScheme(schemePath));
- }
- m_iconTheme = settings.value("icon_theme").toString();
- //load dialogs
 a/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h
-+++ b/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h
-@@ -110,7 +110,7 @@
- QString loadStyleSheets(const QStringList &paths);
- QPalette loadColorScheme(const QString &filePath);
- QString m_style, m_iconTheme, m_userStyleSheet, m_prevStyleSheet;
--QPalette *m_customPalette = nullptr;
-+QPalette *m_palette = nullptr;
- QFont m_generalFont, m_fixedFont;
- int m_doubleClickInterval;
- int m_cursorFlashTime;
 a/trunk/qt5ct/src/qt5ct-qtplugin/qt5ctplatformth