Skip to content
Permalink
Browse files
address Nyall's comments:
 - add TransferThis to parent argument
 - QSignalSpy always available with Qt5
  • Loading branch information
alexbruy committed Apr 8, 2017
1 parent 4a4b318 commit fc4ce3c5628235a40af5eb820f8b5ff9d0cf5e51
Showing with 4 additions and 10 deletions.
  1. +1 −1 python/gui/qgscheckablecombobox.sip
  2. +1 −1 src/gui/qgscheckablecombobox.h
  3. +2 −8 tests/src/python/test_qgscheckablecombobox.py
@@ -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 @@
import qgis # NOQA

from qgis.PyQt.QtCore import Qt
from qgis.gui import QgsCheckableComboBox

try:
from qgis.PyQt.QtTest import QSignalSpy
use_signal_spy = True
except:
use_signal_spy = False
from qgis.PyQt.QtTest import QSignalSpy

from qgis.gui import QgsCheckableComboBox
from qgis.testing import start_app, unittest

start_app()
@@ -51,7 +46,6 @@ def testGettersSetters(self):
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"""

0 comments on commit fc4ce3c

Please sign in to comment.