commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/03: qtgui: bringing in line with require


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/03: qtgui: bringing in line with required Qt 4.4.
Date: Fri, 25 Jul 2014 22:00:37 +0000 (UTC)

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

trondeau pushed a commit to branch maint
in repository gnuradio.

commit 1fa94d7a10089b3907ffe428e9d374f442f0f596
Author: Tom Rondeau <address@hidden>
Date:   Fri Jul 25 17:59:31 2014 -0400

    qtgui: bringing in line with required Qt 4.4.
    
    setGraphicsSystem was introduced in 4.5; doing a version check before its 
use.
---
 gr-qtgui/lib/const_sink_c_impl.cc       | 2 ++
 gr-qtgui/lib/freq_sink_c_impl.cc        | 2 ++
 gr-qtgui/lib/freq_sink_f_impl.cc        | 2 ++
 gr-qtgui/lib/histogram_sink_f_impl.cc   | 2 ++
 gr-qtgui/lib/sink_c_impl.cc             | 2 ++
 gr-qtgui/lib/sink_f_impl.cc             | 2 ++
 gr-qtgui/lib/time_raster_sink_b_impl.cc | 2 ++
 gr-qtgui/lib/time_raster_sink_f_impl.cc | 2 ++
 gr-qtgui/lib/time_sink_c_impl.cc        | 2 ++
 gr-qtgui/lib/time_sink_f_impl.cc        | 2 ++
 gr-qtgui/lib/waterfall_sink_c_impl.cc   | 2 ++
 gr-qtgui/lib/waterfall_sink_f_impl.cc   | 2 ++
 grc/python/flow_graph.tmpl              | 4 +++-
 13 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/gr-qtgui/lib/const_sink_c_impl.cc 
b/gr-qtgui/lib/const_sink_c_impl.cc
index 93986d8..8d71cbb 100644
--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -115,8 +115,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc
index 4b43967..9f4a86f 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -140,8 +140,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc
index ab6167d..77eede0 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -140,8 +140,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/histogram_sink_f_impl.cc 
b/gr-qtgui/lib/histogram_sink_f_impl.cc
index bd43f86..923ea73 100644
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
@@ -109,8 +109,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc
index bcd2c44..ed2512b 100644
--- a/gr-qtgui/lib/sink_c_impl.cc
+++ b/gr-qtgui/lib/sink_c_impl.cc
@@ -130,8 +130,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc
index 67896b7..e2263f7 100644
--- a/gr-qtgui/lib/sink_f_impl.cc
+++ b/gr-qtgui/lib/sink_f_impl.cc
@@ -130,8 +130,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.cc 
b/gr-qtgui/lib/time_raster_sink_b_impl.cc
index ecd8ac3..afc5e90 100644
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
@@ -124,8 +124,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.cc 
b/gr-qtgui/lib/time_raster_sink_f_impl.cc
index 3a18985..7d271ab 100644
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
@@ -122,8 +122,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc
index e053806..0eb999b 100644
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -113,8 +113,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc
index 8424702..0a8a26f 100644
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -115,8 +115,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc 
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index 8cb3f1a..6c1583b 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -139,8 +139,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc 
b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index 1c1453c..22771e1 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -138,8 +138,10 @@ namespace gr {
        d_qApplication = qApp;
       }
       else {
+#if QT_VERSION >= 0x040500
         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);
       }
 
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 5258238..ace217c 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -58,6 +58,7 @@ class $(class_name)(grc_wxgui.top_block_gui):
         self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))
     #end if
 #elif $generate_options == 'qt_gui'
+from distutils.version import StrictVersion
 class $(class_name)(gr.top_block, Qt.QWidget):
 
     def __init__($param_str):
@@ -316,7 +317,8 @@ if __name__ == '__main__':
     tb.Wait()
         #end if
     #elif $generate_options == 'qt_gui'
-    
Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster'))
+    if(StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0")):
+        
Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster'))
     qapp = Qt.QApplication(sys.argv)
     tb = $(class_name)($(', '.join($params_eq_list)))
     #if $flow_graph.get_option('run')



reply via email to

[Prev in Thread] Current Thread [Next in Thread]