diff options
Diffstat (limited to 'client/test/testcomboboxselect.cc')
-rw-r--r-- | client/test/testcomboboxselect.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/client/test/testcomboboxselect.cc b/client/test/testcomboboxselect.cc index 1439440..3eaac00 100644 --- a/client/test/testcomboboxselect.cc +++ b/client/test/testcomboboxselect.cc @@ -36,10 +36,10 @@ private slots: { QDomDocument doc; doc.setContent(xml_search); QDomElement e = doc.documentElement(); - ComboBox cmb(e, NULL); + ComboBox cmb(e, createMacroWindow()); - QTest::keyClicks(&cmb, "Item 2"); - QCOMPARE(cmb.getValue(), QString("Item 2")); + QTest::keyClicks(cmb.qwidget(), "Item 2"); + QCOMPARE(cmb.value(), QString("Item 2")); } void arrowSelect() @@ -47,22 +47,22 @@ private slots: QDomDocument doc; doc.setContent(xml_select); QDomElement e = doc.documentElement(); - ComboBox cmb(e, NULL); + ComboBox cmb(e, createMacroWindow()); - cmb.setFocus(); - QTest::keyPress(&cmb, Qt::Key_Down); - QTest::keyPress(&cmb, Qt::Key_Down); - QTest::keyPress(&cmb, Qt::Key_Enter); - QCOMPARE(cmb.getValue(), QString("item3")); + cmb.qwidget()->setFocus(); + QTest::keyPress(cmb.qwidget(), Qt::Key_Down); + QTest::keyPress(cmb.qwidget(), Qt::Key_Down); + QTest::keyPress(cmb.qwidget(), Qt::Key_Enter); + QCOMPARE(cmb.value(), QString("item3")); } void changeEmits() { QDomDocument doc; doc.setContent(xml_search); QDomElement e = doc.documentElement(); - ComboBox cmb(e, NULL); + ComboBox cmb(e, createMacroWindow()); QSignalSpy spy(&cmb, SIGNAL(wasChanged())); - QTest::keyClicks(&cmb, "I"); + QTest::keyClicks(cmb.qwidget(), "I"); QCOMPARE(spy.count(), 1); } }; |