summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/util/qcompleter
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-08-14 09:05:42 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-08-14 09:06:31 +0200
commit5c23199d4e8ff21661dfa5aacc13149178e78cab (patch)
tree322aee61581d7c85f1ccb65e47d1e79eba1ba6c9 /tests/auto/widgets/util/qcompleter
parent252bad7c589e03d3e12df02354b00a84d8e3159a (diff)
parentc8d9b17367cfdcb034d11f8a168ca4ae3993e7c3 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
Diffstat (limited to 'tests/auto/widgets/util/qcompleter')
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index d7050033f3..3a6fca7146 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -608,7 +608,7 @@ void tst_QCompleter::directoryModel_data()
#elif defined (Q_OS_MAC)
QTest::newRow("()") << "" << "" << "/" << "/";
QTest::newRow("(/a)") << "/a" << "" << "Applications" << "/Applications";
- QTest::newRow("(/d)") << "/d" << "" << "Developer" << "/Developer";
+ QTest::newRow("(/u)") << "/u" << "" << "Users" << "/Users";
#else
QTest::newRow("()") << "" << "" << "/" << "/";
#if !defined(Q_OS_IRIX) && !defined(Q_OS_AIX) && !defined(Q_OS_HPUX)
@@ -1305,10 +1305,15 @@ void tst_QCompleter::task246056_setCompletionPrefix()
comboBox.show();
QApplication::setActiveWindow(&comboBox);
QVERIFY(QTest::qWaitForWindowActive(&comboBox));
+ QSignalSpy spy(comboBox.completer(), SIGNAL(activated(QModelIndex)));
QTest::keyPress(&comboBox, 'a');
QTest::keyPress(comboBox.completer()->popup(), Qt::Key_Down);
QTest::keyPress(comboBox.completer()->popup(), Qt::Key_Down);
QTest::keyPress(comboBox.completer()->popup(), Qt::Key_Enter); // don't crash!
+ QCOMPARE(spy.count(), 1);
+ QList<QVariant> arguments = spy.at(0);
+ QModelIndex index = arguments.at(0).value<QModelIndex>();
+ QVERIFY(!index.isValid());
}
class task250064_TextEdit : public QTextEdit