summaryrefslogtreecommitdiff
path: root/client/test/testcomboboxedit.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-12 10:57:04 +0000
committerdeva <deva>2010-08-12 10:57:04 +0000
commitd9338083192084613e5530b02710b796252d342b (patch)
treee0ec2b36e0de62328e5fd5d3b597f6ee71d1b18f /client/test/testcomboboxedit.cc
parentdbab8458dcce186e7eb7a114a83f759d7db5445a (diff)
New scripting system part2.
Diffstat (limited to 'client/test/testcomboboxedit.cc')
-rw-r--r--client/test/testcomboboxedit.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/client/test/testcomboboxedit.cc b/client/test/testcomboboxedit.cc
index 7fdbfb1..76a9792 100644
--- a/client/test/testcomboboxedit.cc
+++ b/client/test/testcomboboxedit.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,21 @@ private slots:
QDomDocument doc; doc.setContent(xml_select);
QDomElement e = doc.documentElement();
- ComboBox cmb(e, NULL);
-
- 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"));
+ ComboBox cmb(e, createMacroWindow());
+ 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);
}
};