diff options
author | jasplin <qt-info@nokia.com> | 2009-04-23 12:26:19 (GMT) |
---|---|---|
committer | jasplin <qt-info@nokia.com> | 2009-04-23 12:36:09 (GMT) |
commit | b51dd5a7b328291c5dbda540ce228e7d867662cb (patch) | |
tree | 2ba45f66aec3d27d9881d6ec1d655d31deaf0de2 /tests/auto/qaction | |
parent | aa234610048a741cddc991be25b84d235f40e345 (diff) | |
download | Qt-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/qaction')
-rw-r--r-- | tests/auto/qaction/tst_qaction.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/auto/qaction/tst_qaction.cpp b/tests/auto/qaction/tst_qaction.cpp index 8e4ae86..34f2dfd 100644 --- a/tests/auto/qaction/tst_qaction.cpp +++ b/tests/auto/qaction/tst_qaction.cpp @@ -46,7 +46,6 @@ #include <qevent.h> #include <qaction.h> #include <qmenu.h> -#include <qlineedit.h> //TESTED_CLASS= //TESTED_FILES= @@ -75,7 +74,6 @@ private slots: void setStandardKeys(); void alternateShortcuts(); void enabledVisibleInteraction(); - void invisibleActionWithComplexShortcut(); void task200823_tooltip(); private: @@ -324,36 +322,5 @@ void tst_QAction::task200823_tooltip() QCOMPARE(action->toolTip(), ref); } -void tst_QAction::invisibleActionWithComplexShortcut() -{ - QAction action(0); - action.setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E, Qt::Key_1)); - - QLineEdit edit; - edit.addAction(&action); - edit.show(); - QTest::qWait(100); - - QSignalSpy spy(&action, SIGNAL(triggered())); - - action.setVisible(true); - QTest::keyPress(&edit, Qt::Key_E, Qt::ControlModifier); - QTest::keyRelease(&edit, Qt::Key_E, Qt::ControlModifier); - QTest::keyPress(&edit, Qt::Key_1, Qt::NoModifier); - QTest::keyRelease(&edit, Qt::Key_1, Qt::NoModifier); - QCOMPARE(spy.count(), 1); - QCOMPARE(edit.text(), QLatin1String("")); - - edit.clear(); - spy.clear(); - action.setVisible(false); - QTest::keyPress(&edit, Qt::Key_E, Qt::ControlModifier); - QTest::keyRelease(&edit, Qt::Key_E, Qt::ControlModifier); - QTest::keyPress(&edit, Qt::Key_1, Qt::NoModifier); - QTest::keyRelease(&edit, Qt::Key_1, Qt::NoModifier); - QCOMPARE(spy.count(), 0); - QCOMPARE(edit.text(), QLatin1String("1")); -} - QTEST_MAIN(tst_QAction) #include "tst_qaction.moc" |