[lxqt-qtplugin: 3/3] - Missing files from upstream tarball
Helio Chissini de Castro
heliocastro at fedoraproject.org
Sun Feb 8 15:41:12 UTC 2015
commit 1372180bff4d01a63006770c1ce133efcd9a76fc
Author: Helio Chissini de Castro <helio at kde.org>
Date: Sun Feb 8 13:40:52 2015 -0200
- Missing files from upstream tarball
lxqt-qtplugin-missing-upstream.patch | 60 ++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/lxqt-qtplugin-missing-upstream.patch b/lxqt-qtplugin-missing-upstream.patch
new file mode 100644
index 0000000..a8e2ac2
--- /dev/null
+++ b/lxqt-qtplugin-missing-upstream.patch
@@ -0,0 +1,60 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index be8b01a..6bb3e57 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ set(CMAKE_AUTOMOC ON)
+ find_package(Qt5Widgets REQUIRED QUIET)
+ find_package(Qt5LinguistTools REQUIRED QUIET)
+
+-find_package(lxqt-qt5 REQUIRED QUIET)
++find_package(lxqt REQUIRED QUIET)
+
+ include(${LXQT_USE_FILE})
+
+diff --git a/src/lxqtplatformtheme.cpp b/src/lxqtplatformtheme.cpp
+index fb2b858..a7b5edc 100644
+--- a/src/lxqtplatformtheme.cpp
++++ b/src/lxqtplatformtheme.cpp
+@@ -67,7 +67,7 @@ void LXQtPlatformTheme::initWatch()
+ {
+ settingsWatcher_ = new QFileSystemWatcher();
+ settingsWatcher_->addPath(settingsFile_);
+- connect(settingsWatcher_, SIGNAL(fileChanged(QString)), SLOT(onSettingsChanged()));
++ connect(settingsWatcher_, &QFileSystemWatcher::fileChanged, this, &LXQtPlatformTheme::onSettingsChanged);
+ }
+
+ void LXQtPlatformTheme::loadSettings() {
+@@ -126,7 +126,21 @@ void LXQtPlatformTheme::loadSettings() {
+
+ // this is called whenever the config file is changed.
+ void LXQtPlatformTheme::onSettingsChanged() {
+- // qDebug() << "onSettingsChanged";
++ // D*mn! yet another Qt 5.4 regression!!!
++ // See the bug report: https://github.com/lxde/lxqt/issues/441
++ // Since Qt 5.4, QSettings uses QSaveFile to save the config files.
++ // https://github.com/qtproject/qtbase/commit/8d15068911d7c0ba05732e2796aaa7a90e34a6a1#diff-e691c0405f02f3478f4f50a27bdaecde
++ // QSaveFile will save the content to a new temp file, and replace the old file later.
++ // Hence the existing config file is not changed. Instead, it's deleted and then replaced.
++ // This new behaviour unfortunately breaks QFileSystemWatcher.
++ // After file deletion, we can no longer receive any new change notifications.
++ // The most ridiculous thing is, QFileSystemWatcher does not provide a
++ // way for us to know if a file is deleted. WT*?
++ // Luckily, I found a workaround: If the file path no longer exists
++ // in the watcher's files(), this file is deleted.
++ bool file_deleted = !settingsWatcher_->files().contains(settingsFile_);
++ if(file_deleted) // if our config file is already deleted, reinstall a new watcher
++ settingsWatcher_->addPath(settingsFile_);
+
+ // NOTE: in Qt4, Qt monitors the change of _QT_SETTINGS_TIMESTAMP root property and
+ // reload Trolltech.conf when the value is changed. Then, it automatically
+@@ -145,8 +159,9 @@ void LXQtPlatformTheme::onSettingsChanged() {
+ if(style_ != oldStyle) // the widget style is changed
+ qApp->setStyle(style_); // ask Qt5 to apply the new style
+
+- if(iconTheme_ != oldIconTheme) // the icon theme is changed
++ if(iconTheme_ != oldIconTheme) { // the icon theme is changed
+ QIconLoader::instance()->updateSystemTheme(); // this is a private internal API of Qt5.
++ }
+
+ // if font is changed
+ if(oldFont != fontStr_ || oldFixedFont != fixedFontStr_){
More information about the scm-commits
mailing list