summaryrefslogtreecommitdiffstats
path: root/tests/auto/qkeysequence/tst_qkeysequence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qkeysequence/tst_qkeysequence.cpp')
-rw-r--r--tests/auto/qkeysequence/tst_qkeysequence.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp
index 8f16eb7..87d3955 100644
--- a/tests/auto/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp
@@ -270,7 +270,7 @@ void tst_QKeySequence::checkMultipleNames()
void tst_QKeySequence::ensureSorted()
{
//### accessing static members from private classes does not work on msvc at the moment
-#ifndef Q_WS_WIN
+#if defined(QT_BUILD_INTERNAL) && !defined(Q_WS_WIN)
uint N = QKeySequencePrivate::numberOfKeyBindings;
uint val = QKeySequencePrivate::keyBindings[0].shortcut;
for ( uint i = 1 ; i < N ; ++i) {
@@ -311,15 +311,7 @@ void tst_QKeySequence::standardKeys_data()
QTest::newRow("zoomOut") << (int)QKeySequence::ZoomOut<< QString("CTRL+-");
QTest::newRow("whatsthis") << (int)QKeySequence::WhatsThis<< QString("SHIFT+F1");
-#ifndef Q_WS_MAC
- QTest::newRow("help") << (int)QKeySequence::HelpContents<< QString("F1");
- QTest::newRow("nextChild") << (int)QKeySequence::NextChild<< QString("CTRL+Tab");
- QTest::newRow("previousChild") << (int)QKeySequence::PreviousChild<< QString("CTRL+SHIFT+BACKTAB");
- QTest::newRow("forward") << (int)QKeySequence::Forward << QString("ALT+RIGHT");
- QTest::newRow("backward") << (int)QKeySequence::Back << QString("ALT+LEFT");
- QTest::newRow("MoveToEndOfBlock") << (int)QKeySequence::MoveToEndOfBlock<< QString(""); //mac only
- QTest::newRow("SelectEndOfDocument") << (int)QKeySequence::SelectEndOfDocument<< QString("CTRL+SHIFT+END"); //mac only
-#else
+#if defined(Q_WS_MAC)
QTest::newRow("help") << (int)QKeySequence::HelpContents<< QString("Ctrl+?");
QTest::newRow("nextChild") << (int)QKeySequence::NextChild << QString("CTRL+}");
QTest::newRow("previousChild") << (int)QKeySequence::PreviousChild << QString("CTRL+{");
@@ -327,6 +319,17 @@ void tst_QKeySequence::standardKeys_data()
QTest::newRow("forward") << (int)QKeySequence::Forward << QString("CTRL+]");
QTest::newRow("backward") << (int)QKeySequence::Back << QString("CTRL+[");
QTest::newRow("SelectEndOfDocument") << (int)QKeySequence::SelectEndOfDocument<< QString("CTRL+SHIFT+DOWN"); //mac only
+#elif defined(Q_WS_S60)
+ QTest::newRow("help") << (int)QKeySequence::HelpContents<< QString("F2");
+ QTest::newRow("SelectEndOfDocument") << (int)QKeySequence::SelectEndOfDocument<< QString("CTRL+SHIFT+END"); //mac only
+#else
+ QTest::newRow("help") << (int)QKeySequence::HelpContents<< QString("F1");
+ QTest::newRow("nextChild") << (int)QKeySequence::NextChild<< QString("CTRL+Tab");
+ QTest::newRow("previousChild") << (int)QKeySequence::PreviousChild<< QString("CTRL+SHIFT+BACKTAB");
+ QTest::newRow("forward") << (int)QKeySequence::Forward << QString("ALT+RIGHT");
+ QTest::newRow("backward") << (int)QKeySequence::Back << QString("ALT+LEFT");
+ QTest::newRow("MoveToEndOfBlock") << (int)QKeySequence::MoveToEndOfBlock<< QString(""); //mac only
+ QTest::newRow("SelectEndOfDocument") << (int)QKeySequence::SelectEndOfDocument<< QString("CTRL+SHIFT+END"); //mac only
#endif
}
@@ -343,7 +346,7 @@ void tst_QKeySequence::keyBindings()
{
QList<QKeySequence> bindings = QKeySequence::keyBindings(QKeySequence::Copy);
QList<QKeySequence> expected;
-#ifdef Q_WS_MAC
+#if defined(Q_WS_MAC) || defined (Q_WS_S60)
expected << QKeySequence("CTRL+C");
#elif defined Q_WS_X11
expected << QKeySequence("CTRL+C") << QKeySequence("F16") << QKeySequence("CTRL+INSERT");
@@ -504,8 +507,8 @@ void tst_QKeySequence::translated()
QFETCH(QString, compKey);
#ifdef Q_WS_MAC
QSKIP("No need to translate modifiers on Mac OS X", SkipAll);
-#elif defined(Q_OS_WINCE)
- QSKIP("No need to translate modifiers on WinCE", SkipAll);
+#elif defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
+ QSKIP("No need to translate modifiers on WinCE or Symbian", SkipAll);
#endif
qApp->installTranslator(ourTranslator);