mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
address Nyall's comments:
- add TransferThis to parent argument - QSignalSpy always available with Qt5
This commit is contained in:
parent
4a4b3184ef
commit
fc4ce3c562
@ -23,7 +23,7 @@ class QgsCheckableComboBox : QComboBox
|
||||
|
||||
public:
|
||||
|
||||
QgsCheckableComboBox( QWidget *parent = 0 );
|
||||
QgsCheckableComboBox( QWidget *parent /TransferThis/ = 0 );
|
||||
%Docstring
|
||||
Constructor for QgsCheckableComboBox.
|
||||
\param parent parent object
|
||||
|
@ -124,7 +124,7 @@ class GUI_EXPORT QgsCheckableComboBox : public QComboBox
|
||||
/** Constructor for QgsCheckableComboBox.
|
||||
* \param parent parent object
|
||||
*/
|
||||
QgsCheckableComboBox( QWidget *parent = nullptr );
|
||||
QgsCheckableComboBox( QWidget *parent SIP_TRANSFERTHIS = nullptr );
|
||||
|
||||
/** Returns separator used to separate items in the display text.
|
||||
* \see setSeparator()
|
||||
|
@ -15,14 +15,9 @@ __revision__ = '$Format:%H$'
|
||||
import qgis # NOQA
|
||||
|
||||
from qgis.PyQt.QtCore import Qt
|
||||
from qgis.PyQt.QtTest import QSignalSpy
|
||||
|
||||
from qgis.gui import QgsCheckableComboBox
|
||||
|
||||
try:
|
||||
from qgis.PyQt.QtTest import QSignalSpy
|
||||
use_signal_spy = True
|
||||
except:
|
||||
use_signal_spy = False
|
||||
|
||||
from qgis.testing import start_app, unittest
|
||||
|
||||
start_app()
|
||||
@ -51,7 +46,6 @@ class TestQgsCheckableComboBox(unittest.TestCase):
|
||||
w.setItemCheckState(2, Qt.Unchecked)
|
||||
self.assertEqual(w.itemCheckState(2), Qt.Unchecked)
|
||||
|
||||
@unittest.skipIf(not use_signal_spy, "No QSignalSpy available")
|
||||
def test_ChangedSignals(self):
|
||||
""" test that signals are correctly emitted when clearing"""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user