Package: gnuradio / 3.7.13.4-4

qt5-maint-0024-gr-qtgui-restoreGeometry.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
74
75
76
77
78
79
80
81
82
83
84
85
From b65bf73bc174183d6aec476c2fb161a4911c2351 Mon Sep 17 00:00:00 2001
From: Vasil Velichkov <vvvelichkov@gmail.com>
Date: Thu, 11 Jan 2018 00:32:37 +0000
Subject: [PATCH 27/27] Fix AttributeError: 'NoneType' object has no attribute
 'toByteArray'

Debian Bug #886807
---
 gr-uhd/apps/uhd_fft                | 6 +++---
 gr-uhd/apps/uhd_siggen_gui         | 4 ++--
 grc/blocks/options.xml             | 2 +-
 grc/core/generator/flow_graph.tmpl | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

--- a/gr-uhd/apps/uhd_fft
+++ b/gr-uhd/apps/uhd_fft
@@ -40,7 +40,7 @@
 import threading
 import time
 from distutils.version import StrictVersion
-from PyQt5 import Qt
+from PyQt5 import Qt, QtCore
 from gnuradio import eng_notation
 from gnuradio import eng_arg
 from gnuradio import gr
@@ -60,7 +60,7 @@
     """
     def __init__(self, args):
         gr.top_block.__init__(self, "UHD FFT")
-        Qt.QWidget.__init__(self)
+        Qt.QWidget.__init__(self, args=args)
         UHDApp.__init__(self, args=args, prefix="UHD FFT")
         ##################################################
         # Init QT App
@@ -82,7 +82,7 @@
         self.top_grid_layout = Qt.QGridLayout()
         self.top_layout.addLayout(self.top_grid_layout)
         self.settings = Qt.QSettings("GNU Radio", "uhd_fft")
-        self.restoreGeometry(self.settings.value("geometry").toByteArray())
+        self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray))
 
         ##################################################
         # Parameters
--- a/gr-uhd/apps/uhd_siggen_gui
+++ b/gr-uhd/apps/uhd_siggen_gui
@@ -39,7 +39,7 @@
 import time
 from distutils.version import StrictVersion
 from PyQt5 import Qt
-from PyQt5.QtCore import pyqtSlot
+from PyQt5.QtCore import pyqtSlot, QByteArray
 from gnuradio import analog
 from gnuradio import eng_notation
 from gnuradio import gr
@@ -85,7 +85,7 @@
         self.top_grid_layout = Qt.QGridLayout()
         self.top_layout.addLayout(self.top_grid_layout)
         self.settings = Qt.QSettings("GNU Radio", "uhd_siggen_gui")
-        self.restoreGeometry(self.settings.value("geometry").toByteArray())
+        self.restoreGeometry(self.settings.value("geometry", type=QByteArray))
 
         ##################################################
         # Widgets + Controls
--- a/grc/blocks/options.xml
+++ b/grc/blocks/options.xml
@@ -16,7 +16,7 @@
 import wx
 #end if
 #if $generate_options() == 'qt_gui'
-from PyQt5 import Qt
+from PyQt5 import Qt, QtCore
 import sys
 #end if
 #if $generate_options() == 'bokeh_gui'
--- a/grc/core/generator/flow_graph.tmpl
+++ b/grc/core/generator/flow_graph.tmpl
@@ -122,7 +122,7 @@
         self.top_layout.addLayout(self.top_grid_layout)
 
         self.settings = Qt.QSettings("GNU Radio", "$class_name")
-        self.restoreGeometry(self.settings.value("geometry"))
+        self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray))
 
 #elif $generate_options == 'bokeh_gui'