summaryrefslogtreecommitdiffstats
path: root/tests/auto/qshortcut
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2009-04-23 12:26:19 (GMT)
committerjasplin <qt-info@nokia.com>2009-04-23 12:36:09 (GMT)
commitb51dd5a7b328291c5dbda540ce228e7d867662cb (patch)
tree2ba45f66aec3d27d9881d6ec1d655d31deaf0de2 /tests/auto/qshortcut
parentaa234610048a741cddc991be25b84d235f40e345 (diff)
downloadQt-b51dd5a7b328291c5dbda540ce228e7d867662cb.zip
Qt-b51dd5a7b328291c5dbda540ce228e7d867662cb.tar.gz
Qt-b51dd5a7b328291c5dbda540ce228e7d867662cb.tar.bz2
Revert "Fixed key sequence eating behavior for QShortcut and QAction."
This reverts commit 031adeaf42ddaef8d01338f6c59ba97170be5d53. The patch had some unforeseen side-effects for Creator. It may also affect other existing applications in a similar way. For now, this behavior (eating key sequences for disabled shortcuts) should be achieved using a local workaround in creator. Reviewed-by: mariusSO Task-number: 251246
Diffstat (limited to 'tests/auto/qshortcut')
-rw-r--r--tests/auto/qshortcut/tst_qshortcut.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qshortcut/tst_qshortcut.cpp b/tests/auto/qshortcut/tst_qshortcut.cpp
index cd80204..69ebf74 100644
--- a/tests/auto/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/qshortcut/tst_qshortcut.cpp
@@ -987,16 +987,17 @@ void tst_QShortcut::keypressConsumption()
cut1->setEnabled(false);
cut2->setEnabled(false);
- edit->clear();
+ // Make sure keypresses is passed on, since all multiple keysequences
+ // with Ctrl+I are disabled
sendKeyEvents(edit, Qt::CTRL + Qt::Key_I, 0); // Send key to edit
QCOMPARE( currentResult, NoResult );
QCOMPARE( ambigResult, NoResult );
- QVERIFY(edit->toPlainText().isEmpty());
+ QVERIFY(edit->toPlainText().endsWith("<Ctrl+I>"));
sendKeyEvents(edit, Qt::Key_A, 'a'); // Send key to edit
QCOMPARE( currentResult, NoResult );
QCOMPARE( ambigResult, NoResult );
- QVERIFY(edit->toPlainText().isEmpty());
+ QVERIFY(edit->toPlainText().endsWith("<Ctrl+I>a"));
clearAllShortcuts();
}