From 988c1520d5b6f763caa0164faef404185e7dbc85 Mon Sep 17 00:00:00 2001
From: Paul Cercueil <paul.cercueil@analog.com>
Date: Tue, 21 Jun 2016 18:30:21 +0200
Subject: [PATCH 11/22] gr-qtgui: Re-introduce some Qt4-specific code

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
---
 gr-qtgui/lib/const_sink_c_impl.cc       | 4 ++++
 gr-qtgui/lib/freq_sink_c_impl.cc        | 4 ++++
 gr-qtgui/lib/freq_sink_f_impl.cc        | 4 ++++
 gr-qtgui/lib/histogram_sink_f_impl.cc   | 4 ++++
 gr-qtgui/lib/sink_c_impl.cc             | 4 ++++
 gr-qtgui/lib/sink_f_impl.cc             | 4 ++++
 gr-qtgui/lib/time_raster_sink_b_impl.cc | 4 ++++
 gr-qtgui/lib/time_raster_sink_f_impl.cc | 4 ++++
 gr-qtgui/lib/time_sink_c_impl.cc        | 4 ++++
 gr-qtgui/lib/time_sink_f_impl.cc        | 4 ++++
 gr-qtgui/lib/vector_sink_f_impl.cc      | 4 ++++
 gr-qtgui/lib/waterfall_sink_c_impl.cc   | 4 ++++
 gr-qtgui/lib/waterfall_sink_f_impl.cc   | 4 ++++
 13 files changed, 52 insertions(+)

--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -127,6 +127,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -156,6 +156,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
         d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -155,6 +155,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
@@ -115,6 +115,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/sink_c_impl.cc
+++ b/gr-qtgui/lib/sink_c_impl.cc
@@ -131,6 +131,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/sink_f_impl.cc
+++ b/gr-qtgui/lib/sink_f_impl.cc
@@ -131,6 +131,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
@@ -130,6 +130,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
@@ -128,6 +128,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -134,6 +134,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -129,6 +129,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/vector_sink_f_impl.cc
+++ b/gr-qtgui/lib/vector_sink_f_impl.cc
@@ -140,6 +140,10 @@
         d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
         d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -159,6 +159,10 @@
 	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
 	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -155,6 +155,10 @@
  	d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500 && QT_VERSION < 0x050000
+        std::string style = prefs::singleton()->get_string("qtgui", "style", "raster");
+        QApplication::setGraphicsSystem(QString(style.c_str()));
+#endif
  	d_qApplication = new QApplication(d_argc, &d_argv);
       }
 
