[X2Go-Commits] [x2goclient] 01/01: helpdialog.cpp: use QT_VERSION macro to select either a monospaced or typewriter font (Qt < 4.7.0 only supports TypeWriter.)

git-admin at x2go.org git-admin at x2go.org
Thu Apr 23 19:22:00 CEST 2015


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

x2go pushed a commit to branch master
in repository x2goclient.

commit 8462740d63004494427ce3df1dbe2150c3cf74f5
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Apr 23 19:17:38 2015 +0200

    helpdialog.cpp: use QT_VERSION macro to select either a monospaced or typewriter font (Qt < 4.7.0 only supports TypeWriter.)
---
 debian/changelog   |    2 ++
 src/helpdialog.cpp |    5 +++++
 2 files changed, 7 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 72886f3..a305ee3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -296,6 +296,8 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
     - help.cpp: use new git_changelog_extract_commit_sha() helper while
       building the help prelude.
     - helpdialog.cpp: change to monospaced font.
+    - helpdialog.cpp: use QT_VERSION macro to select either a monospaced or
+      typewriter font (Qt < 4.7.0 only supports TypeWriter.)
 
   [ Fernando Pedemonte ]
   * New upstream release (4.0.4.0):
diff --git a/src/helpdialog.cpp b/src/helpdialog.cpp
index 67b118c..3fa478f 100644
--- a/src/helpdialog.cpp
+++ b/src/helpdialog.cpp
@@ -16,6 +16,7 @@
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/
 
+#include <QtGlobal>
 #include "helpdialog.h"
 
 HelpDialog::HelpDialog (QWidget *parent): QDialog (parent) {
@@ -24,7 +25,11 @@ HelpDialog::HelpDialog (QWidget *parent): QDialog (parent) {
 
 void HelpDialog::setText (QString text) {
     QFont font ("monospace");
+#if QT_VERSION >= 0x040700
     font.setStyleHint (QFont::Monospace);
+#else
+    font.setStyleHint (QFont::TypeWriter);
+#endif
     plainTextEdit->setFont (font);
 
     plainTextEdit->setTabStopWidth (30);

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list