diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2009-12-04 07:08:36 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2009-12-04 07:08:36 (GMT) |
commit | 96434723135f5aa757ce5d58fe5bb6c0755462c1 (patch) | |
tree | b1b4496eb08835dc6172b279266d7b3d3bc150b3 /tests/auto/qsoftkeymanager | |
parent | 7661f40f286c1693a0cab440271f7a5c384a63eb (diff) | |
parent | 108ab335537d20bc74aa9115d46cf91243223c4e (diff) | |
download | Qt-96434723135f5aa757ce5d58fe5bb6c0755462c1.zip Qt-96434723135f5aa757ce5d58fe5bb6c0755462c1.tar.gz Qt-96434723135f5aa757ce5d58fe5bb6c0755462c1.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into qt-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (268 commits)
Better check for EGL extension strings
Some doc fixes
Fixes broken selection with Shift and extended selection
Add extra auto-test for topLevel list corruption.
QCompleter wouldn't emit highlighted() and activated() signals
Stabilize tests on X11
Fix tst_QSystemLock::processes
qreal-ization
Fixes transformation problems with QGraphicsProxyWidget.
Fixed softkey merging/traversing over window boundaries.
Fixed crash on Symbian when using QProgressDialog::setCancelButton(0).
Fixed "illegal empty declaration" warning from \tools\xmlpatterns
qreal-ization
Reduce double-copying of textures when flipping upside down
Fix crash in QVector::reserve when reserving smaller size on a shared vector
QWindowStyle: make sure there is no duplicate in the list of scrollbar.
Fixed a potential crash in QDockWidget
Clarify the docs a bit when setting focus.
Minor doc update for known-issues wiki link.
Bump version to 4.6.1
...
Diffstat (limited to 'tests/auto/qsoftkeymanager')
-rw-r--r-- | tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp index 87e0533..f923739 100644 --- a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp +++ b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp @@ -73,6 +73,7 @@ private slots: void updateSoftKeysCompressed(); void handleCommand(); void checkSoftkeyEnableStates(); + void noMergingOverWindowBoundary(); private: // utils inline void simulateSymbianCommand(int command) @@ -235,5 +236,66 @@ void tst_QSoftKeyManager::checkSoftkeyEnableStates() QCOMPARE(spy1.count(), 5); } +/* + This tests that the softkeys are not merged over window boundaries. I.e. dialogs + don't get softkeys of base widget by default - QTBUG-6163. +*/ +void tst_QSoftKeyManager::noMergingOverWindowBoundary() +{ + // Create base window against which the dialog softkeys will ve verified + QWidget base; + + QAction* baseLeft = new QAction(tr("BaseLeft"), &base); + baseLeft->setSoftKeyRole(QAction::PositiveSoftKey); + base.addAction(baseLeft); + + QAction* baseRight = new QAction(tr("BaseRight"), &base); + baseRight->setSoftKeyRole(QAction::NegativeSoftKey); + base.addAction(baseRight); + + base.showMaximized(); + QApplication::processEvents(); + + QSignalSpy baseLeftSpy(baseLeft, SIGNAL(triggered())); + QSignalSpy baseRightSpy(baseRight, SIGNAL(triggered())); + + //Verify that both base softkeys emit triggered signals + simulateSymbianCommand(s60CommandStart); + simulateSymbianCommand(s60CommandStart + 1); + + QCOMPARE(baseLeftSpy.count(), 1); + QCOMPARE(baseRightSpy.count(), 1); + baseLeftSpy.clear(); + baseRightSpy.clear(); + + // Verify that no softkey merging when using dialog without parent + QDialog dlg; + dlg.show(); + + QApplication::processEvents(); + + simulateSymbianCommand(s60CommandStart); + simulateSymbianCommand(s60CommandStart + 1); + + QCOMPARE(baseLeftSpy.count(), 0); + QCOMPARE(baseRightSpy.count(), 0); + + // Ensure base view has focus again + dlg.hide(); + base.showMaximized(); + + // Verify that no softkey merging when using dialog with parent + QDialog dlg2(&base); + dlg2.show(); + + QApplication::processEvents(); + + simulateSymbianCommand(s60CommandStart); + simulateSymbianCommand(s60CommandStart + 1); + + QCOMPARE(baseLeftSpy.count(), 0); + QCOMPARE(baseRightSpy.count(), 0); +} + QTEST_MAIN(tst_QSoftKeyManager) #include "tst_qsoftkeymanager.moc" |