[X2Go-Commits] [x2gothinclient] 03/03: cdmanager/powerej/eject.cpp: use PlastiqueStyle with Qt4 and Fusion with Qt5.

git-admin at x2go.org git-admin at x2go.org
Fri Nov 23 03:55:44 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gothinclient.

commit a1ae2f493a0be6e77e838857d7d96079345a0557
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Nov 23 03:54:28 2018 +0100

    cdmanager/powerej/eject.cpp: use PlastiqueStyle with Qt4 and Fusion with Qt5.
---
 cdmanager/powerej/eject.cpp | 10 +++++++++-
 debian/changelog            |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/cdmanager/powerej/eject.cpp b/cdmanager/powerej/eject.cpp
index 4d723a4..57aa542 100644
--- a/cdmanager/powerej/eject.cpp
+++ b/cdmanager/powerej/eject.cpp
@@ -28,14 +28,22 @@
 #include <QLocale>
 #include <QFrame>
 #include <mb.h>
-#include <QPlastiqueStyle>
 #include <QDesktopWidget>
 
+#if QT_VERSION < 0x050000
+#include <QPlastiqueStyle>
+#endif
+
 using namespace std;
 int main(int argc, char *argv[])
 {
   QApplication app(argc,argv);
+
+#if QT_VERSION < 0x050000
   app.setStyle(new QPlastiqueStyle());
+#else
+  app.setStyle(QStyleFactory::create("fusion"));
+#endif
 
 // QFrame*fr =new QFrame(0,Qt::WindowStaysOnTopHint|Qt::X11BypassWindowManagerHint);
   MPushButton*fr =new MPushButton();
diff --git a/debian/changelog b/debian/changelog
index fdc4466..b62ea87 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -122,6 +122,8 @@ x2gothinclient (1.5.0.0-0x2go1) UNRELEASED; urgency=low
     - misc manpages: pre-release version and date updates.
     - cdmanager/powerej/mb.{cpp,h}: whitespace only.
     - cdmanager/powerej/powerej.pro: regenerate with Qt5's qmake and merge.
+    - cdmanager/powerej/eject.cpp: use PlastiqueStyle with Qt4 and Fusion with
+      Qt5.
   * usbmount/x2gousbmount:
     - Fix typo int -> print. Fixes: #840.
     - Update copyright notice.

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gothinclient.git


More information about the x2go-commits mailing list