[X2Go-Commits] [pinentry-x2go] 03/04: pinentry-x2go/main.cpp: use PlastiqueStyle with Qt4, Fusion with Qt5.
git-admin at x2go.org
git-admin at x2go.org
Fri Nov 23 04:26:52 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository pinentry-x2go.
commit 8af7a9ae4d4579f5ac5472b42f6092cc31054ebd
Author: Mihai Moldovan <ionic at ionic.de>
Date: Fri Nov 23 04:03:50 2018 +0100
pinentry-x2go/main.cpp: use PlastiqueStyle with Qt4, Fusion with Qt5.
---
debian/changelog | 1 +
pinentry-x2go/main.cpp | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 99e22f0..b5e5212 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ pinentry-x2go (0.7.5.10-0x2go1) UNRELEASED; urgency=low
[ Mihai Moldovan ]
* New upstream version (0.7.5.10):
- configure.ac: change mailing list address.
+ - pinentry-x2go/main.cpp: use PlastiqueStyle with Qt4, Fusion with Qt5.
* debian/control:
- Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
- Uploaders: add myself. Also, force a rebuild due to the changed
diff --git a/pinentry-x2go/main.cpp b/pinentry-x2go/main.cpp
index 4ac754e..1088d14 100644
--- a/pinentry-x2go/main.cpp
+++ b/pinentry-x2go/main.cpp
@@ -40,6 +40,12 @@
#include <QTranslator>
#include <QLocale>
+#if QT_VERSION < 0x050000
+#include <QPlastiqueStyle>
+#else
+#include <QStyleFactory>
+#endif
+
#include "pinentrydialog.h"
#include "pinentry.h"
@@ -216,7 +222,11 @@ main (int argc, char *argv[])
else
app->installTranslator(&qtTranslator);
- app->setStyle("fusion");
+#if QT_VERSION < 0x050000
+ app->setStyle(new QPlastiqueStyle());
+#else
+ app->setStyle(QStyleFactory::create("fusion"));
+#endif
/* Consumes all arguments. */
if (pinentry_parse_opts (argc, argv))
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pinentry-x2go.git
More information about the x2go-commits
mailing list