[Pkg-owncloud-commits] [owncloud-client] 66/218: Tray: Enable workaround for Qt5 only #3765
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 17 14:30:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit c6794afc3a3d650481a72859aa0dad9e5e087ee5
Author: Christian Kamm <mail at ckamm.de>
Date: Mon Sep 7 07:44:07 2015 +0200
Tray: Enable workaround for Qt5 only #3765
---
src/gui/owncloudgui.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index 359baeb..0aa7d43 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -395,12 +395,19 @@ void ownCloudGui::setupContextMenu()
// In particular QTBUG-47863 #3672 (tray menu fails to update and
// becomes unresponsive) and QTBUG-48068 #3722 (click signal is
// emitted several times)
+ // The Qt version check intentionally uses 5.0.0 (where platformMenu()
+ // was introduced) instead of 5.5.0 to avoid issues where the Qt
+ // version used to build is different from the one used at runtime.
+#ifdef Q_OS_LINUX
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QObject* platformMenu = reinterpret_cast<QObject*>(_tray->contextMenu()->platformMenu());
if (platformMenu
&& platformMenu->metaObject()->className() == QLatin1String("QDBusPlatformMenu")) {
_qdbusmenuWorkaround = true;
qDebug() << "Enabled QDBusPlatformMenu workaround";
}
+#endif
+#endif
}
_contextMenu->setTitle(Theme::instance()->appNameGUI() );
// We must call deleteLater because we might be called from the press in one of the action.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list