Package: gnuradio / 3.7.13.4-4

qt5-maint-0007-qtgui-Fixes-for-edit_box_msg-to-work-with-QT5.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 1dae9e033016f35416cb433a8a129b4f011eb8c1 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <tom@trondeau.com>
Date: Thu, 28 Apr 2016 10:53:12 -0400
Subject: [PATCH 07/22] qtgui: Fixes for edit_box_msg to work with QT5.

---
 gr-qtgui/examples/c++/CMakeLists.txt | 20 +++++++++++---------
 gr-qtgui/grc/qtgui_edit_box_msg.xml  |  2 +-
 gr-qtgui/lib/edit_box_msg_impl.cc    |  4 ----
 3 files changed, 12 insertions(+), 14 deletions(-)

--- a/gr-qtgui/examples/c++/CMakeLists.txt
+++ b/gr-qtgui/examples/c++/CMakeLists.txt
@@ -18,14 +18,14 @@
 # Boston, MA 02110-1301, USA.
 
 include_directories(
-  ${GR_QTGUI_INCLUDE_DIRS}
-  ${GR_ANALOG_INCLUDE_DIRS}
-  ${GR_FILTER_INCLUDE_DIRS}
-  ${GR_BLOCKS_INCLUDE_DIRS}
-  ${GR_FFT_INCLUDE_DIRS}
-  ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-  ${QT_INCLUDE_DIRS}
-  ${Boost_INCLUDE_DIRS}
+	${GR_QTGUI_INCLUDE_DIRS}
+	${GR_ANALOG_INCLUDE_DIRS}
+	${GR_FILTER_INCLUDE_DIRS}
+	${GR_BLOCKS_INCLUDE_DIRS}
+	${GR_FFT_INCLUDE_DIRS}
+	${GNURADIO_RUNTIME_INCLUDE_DIRS}
+        ${Qt5Widgets_INCLUDE_DIRS}
+        ${Boost_INCLUDE_DIRS}
 )
 
 list(APPEND QTGUI_LIBRARIES
@@ -35,9 +35,11 @@
   gnuradio-blocks
   gnuradio-fft
   gnuradio-runtime
+  ${QWT_LIBRARY_DIRS}
+  ${Qt5Widgets_LIBRARIES}
 )
 
-QT4_WRAP_CPP(qtgui_moc_sources display_qt.h)
+QT5_WRAP_CPP(qtgui_moc_sources display_qt.h)
 add_executable(display_qt display_qt.cc ${qtgui_moc_sources})
 target_link_libraries(display_qt ${QTGUI_LIBRARIES})
 
--- a/gr-qtgui/grc/qtgui_edit_box_msg.xml
+++ b/gr-qtgui/grc/qtgui_edit_box_msg.xml
@@ -7,7 +7,7 @@
 <block>
   <name>QT GUI Message Edit Box</name>
   <key>qtgui_edit_box_msg</key>
-  <import>from PyQt4 import Qt</import>
+  <import>from PyQt5 import Qt</import>
   <import>from gnuradio import qtgui</import>
   <import>import sip</import>
   <make>#set $win = 'self._%s_win'%$id
--- a/gr-qtgui/lib/edit_box_msg_impl.cc
+++ b/gr-qtgui/lib/edit_box_msg_impl.cc
@@ -66,10 +66,6 @@
 	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);
       }