diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-01-16 11:49:53 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-23 09:32:43 +0100 |
commit | ba21ca7b5b4b92996c93a0dc4137ea181c4eb79c (patch) | |
tree | dec5949a8ff5ed31bb847718c3766907687b7057 /tests/auto/widgets/widgets | |
parent | fdedb49b76b8f9ad69611fbfea6b8371ae1ec3a1 (diff) |
Replace Q_WS_MAC with Q_OS_MAC in tests/auto/widgets
tst_qwidget.cpp will not build/link without tst_qwidget_mac_helpers.mm,
so re-add it to the build as well.
Change-Id: I55130f62c215c4b82683d90456e31fdb09f833a8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests/auto/widgets/widgets')
21 files changed, 127 insertions, 127 deletions
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp index df0e89f6ba..c01a09e924 100644 --- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp +++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp @@ -125,7 +125,7 @@ public: opt.palette = palette(); opt.state = QStyle::State_None; style()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, &p, this); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC p.setPen(Qt::red); p.drawRect(r); #endif @@ -361,17 +361,17 @@ void tst_QAbstractButton::setText() QCOMPARE( testWidget->text(), QString("simple") ); testWidget->setText("&ersand"); QCOMPARE( testWidget->text(), QString("&ersand") ); -#ifndef Q_WS_MAC // no mneonics on Mac. +#ifndef Q_OS_MAC // no mneonics on Mac. QCOMPARE( testWidget->shortcut(), QKeySequence("ALT+A")); #endif testWidget->setText("te&st"); QCOMPARE( testWidget->text(), QString("te&st") ); -#ifndef Q_WS_MAC // no mneonics on Mac. +#ifndef Q_OS_MAC // no mneonics on Mac. QCOMPARE( testWidget->shortcut(), QKeySequence("ALT+S")); #endif testWidget->setText("foo"); QCOMPARE( testWidget->text(), QString("foo") ); -#ifndef Q_WS_MAC // no mneonics on Mac. +#ifndef Q_OS_MAC // no mneonics on Mac. QCOMPARE( testWidget->shortcut(), QKeySequence()); #endif } diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp index 1307be315f..c046f9f471 100644 --- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp +++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp @@ -732,7 +732,7 @@ void tst_QAbstractSlider::wheelEvent_data() << 1 // delta << int(Qt::Vertical) // orientation of slider << int(Qt::Vertical) // orientation of wheel -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC << 1 // expected position after #else // We don't restrict scrolling to pageStep on Mac @@ -750,7 +750,7 @@ void tst_QAbstractSlider::wheelEvent_data() << 1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Vertical) // orientation of wheel -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC << 1 // expected position after #else // We don't restrict scrolling to pageStep on Mac @@ -769,7 +769,7 @@ void tst_QAbstractSlider::wheelEvent_data() << 1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Vertical) // orientation of wheel -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC << 1 // expected position after #else // We don't restrict scrolling to pageStep on Mac diff --git a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp index 322be4b77d..d5885dd8bc 100644 --- a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp +++ b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp @@ -53,7 +53,7 @@ #include <qpushbutton.h> #include <qlineedit.h> #include <qtoolbutton.h> -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <qsettings.h> #endif diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 4695ac3eb3..6e2d3e74b8 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -58,7 +58,7 @@ #include <qtablewidget.h> #include <qscrollbar.h> #include <qboxlayout.h> -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <qmacstyle_mac.h> #elif defined Q_WS_X11 #include <private/qt_x11_p.h> @@ -455,7 +455,7 @@ void tst_QComboBox::setEditable() void tst_QComboBox::setPalette() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (qobject_cast<QMacStyle *>(testWidget->style())) { QSKIP("This test doesn't make sense for pixmap-based styles"); } diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index efd7ac5c91..e6d07cb027 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -780,7 +780,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys() testWidget->setDate(QDate(2004, 05, 11)); testWidget->setDisplayFormat("dd/MM/yyyy"); testWidget->show(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -819,7 +819,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys() QCOMPARE(testWidget->lineEdit()->selectedText(), QString("2004")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -846,7 +846,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys() QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11/05/2004")); QTest::keyClick(testWidget, Qt::Key_Left, Qt::ShiftModifier); QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11/05/2004")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -862,7 +862,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys() QCOMPARE(testWidget->currentSection(), QDateTimeEdit::DaySection); QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -882,7 +882,7 @@ void tst_QDateTimeEdit::backspaceKey() testWidget->setDate(QDate(2004, 05, 11)); testWidget->setDisplayFormat("d/MM/yyyy"); testWidget->show(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -896,7 +896,7 @@ void tst_QDateTimeEdit::backspaceKey() for (int i=0;i<3;i++) QTest::keyClick(testWidget, Qt::Key_Left); QCOMPARE(testWidget->text(), QString("11/05/2004")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -911,7 +911,7 @@ void tst_QDateTimeEdit::backspaceKey() QTest::keyClick(testWidget, Qt::Key_Backspace); QCOMPARE(testWidget->text(), QString("11/0/2004")); testWidget->interpretText(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -945,7 +945,7 @@ void tst_QDateTimeEdit::deleteKey() qApp->setActiveWindow(testWidget); testWidget->setDate(QDate(2004, 05, 11)); testWidget->setDisplayFormat("d/MM/yyyy"); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -1019,21 +1019,21 @@ void tst_QDateTimeEdit::enterKey() testWidget->setDisplayFormat("prefix d/MM/yyyy 'suffix'"); testWidget->lineEdit()->setFocus(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); #endif QTest::keyClick(testWidget, Qt::Key_Enter); QVERIFY(!testWidget->lineEdit()->hasSelectedText()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); #endif QTest::keyClick(testWidget, Qt::Key_Enter); QVERIFY(!testWidget->lineEdit()->hasSelectedText()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -1096,7 +1096,7 @@ void tst_QDateTimeEdit::specialValueText() QCOMPARE(testWidget->date(), QDate(2000, 1, 1)); QCOMPARE(testWidget->text(), QString("fOo")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -1107,7 +1107,7 @@ void tst_QDateTimeEdit::specialValueText() QTest::keyClick(testWidget, Qt::Key_Down); QCOMPARE(testWidget->text(), QString("fOo")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -2538,7 +2538,7 @@ void tst_QDateTimeEdit::newCase() testWidget->setDisplayFormat("MMMM'a'MbMMMcMM"); testWidget->setDate(QDate(2005, 6, 1)); QCOMPARE(testWidget->text(), QString("Junea6bJunc06")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -2546,7 +2546,7 @@ void tst_QDateTimeEdit::newCase() QTest::keyClick(testWidget, Qt::Key_Up); QCOMPARE(testWidget->text(), QString("Julya7bJulc07")); QCOMPARE(testWidget->lineEdit()->selectedText(), QString("July")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -2619,7 +2619,7 @@ void tst_QDateTimeEdit::cursorPos() //l.exec(); QTest::keyClick(testWidget, Qt::Key_Y); QCOMPARE(testWidget->lineEdit()->cursorPosition(), 11); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -2649,7 +2649,7 @@ void tst_QDateTimeEdit::newCase5() testWidget->setDateTime(QDateTime(QDate(2005, 10, 7), QTime(17, 44, 13, 100))); testWidget->show(); QCOMPARE(testWidget->lineEdit()->displayText(), QString("2005-10-07 17:44:13 100 ms")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -2672,7 +2672,7 @@ void tst_QDateTimeEdit::newCase6() testWidget->setDate(QDate(2005, 10, 7)); testWidget->show(); QCOMPARE(testWidget->lineEdit()->displayText(), QString("7-2005-10-07")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -2745,7 +2745,7 @@ void tst_QDateTimeEdit::setCurrentSection() QCOMPARE(setCurrentSections.size(), expectedCursorPositions.size()); testWidget->setDisplayFormat(format); testWidget->setDateTime(dateTime); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -2765,7 +2765,7 @@ void tst_QDateTimeEdit::setSelectedSection() testWidget->setDisplayFormat("mm.ss.zzz('ms') m"); testWidget->setTime(QTime(0, 0, 9)); testWidget->show(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_Home); @@ -2882,7 +2882,7 @@ void tst_QDateTimeEdit::reverseTest() testWidget->setDisplayFormat("dd/MM/yyyy"); testWidget->setDate(QDate(2001, 3, 30)); QCOMPARE(testWidget->lineEdit()->displayText(), QString("2001/03/30")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -3033,7 +3033,7 @@ void tst_QDateTimeEdit::ddMMMMyyyy() testWidget->setCurrentSection(QDateTimeEdit::YearSection); QTest::keyClick(testWidget, Qt::Key_Enter); QCOMPARE(testWidget->lineEdit()->selectedText(), QString("2000")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(testWidget, Qt::Key_End); @@ -3322,7 +3322,7 @@ void tst_QDateTimeEdit::potentialYYValueBug() edit.setDate(edit.minimumDate()); edit.lineEdit()->setFocus(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&edit, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(&edit, Qt::Key_End); @@ -3337,7 +3337,7 @@ void tst_QDateTimeEdit::textSectionAtEnd() edit.setDisplayFormat("MMMM"); edit.setDate(QDate(2000, 1, 1)); edit.lineEdit()->setFocus(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&edit, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(&edit, Qt::Key_End); @@ -3363,7 +3363,7 @@ void tst_QDateTimeEdit::keypadAutoAdvance() EditorDateEdit edit; edit.setDate(QDate(2000, 2, 1)); edit.setDisplayFormat("dd/MM"); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&edit, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(&edit, Qt::Key_Home); diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp index 597ec808f7..fc393c6a0e 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp @@ -268,7 +268,7 @@ void tst_QDoubleSpinBox::setTracking_data() QTestEventList keys; QStringList texts1; QStringList texts2; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier); #else keys.addKeyClick(Qt::Key_End); @@ -343,7 +343,7 @@ void tst_QDoubleSpinBox::setWrapping_data() keys.clear(); values.clear(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier); #else keys.addKeyClick(Qt::Key_End); @@ -358,7 +358,7 @@ void tst_QDoubleSpinBox::setWrapping_data() keys.clear(); values.clear(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keys.addKeyClick(Qt::Key_Left, Qt::ControlModifier); #else keys.addKeyClick(Qt::Key_Home); @@ -625,7 +625,7 @@ void tst_QDoubleSpinBox::setDecimals() QCOMPARE(spin.text(), expected); if (spin.decimals() > 0) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(&spin, Qt::Key_End); @@ -830,13 +830,13 @@ void tst_QDoubleSpinBox::removeAll() spin.setValue(0.2); spin.setDecimals(1); spin.show(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(&spin, Qt::Key_Home); #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier|Qt::ShiftModifier); #else QTest::keyClick(&spin, Qt::Key_End, Qt::ShiftModifier); @@ -883,7 +883,7 @@ void tst_QDoubleSpinBox::germanTest() DoubleSpinBox spin; spin.show(); spin.setValue(2.12); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier); #else QTest::keyClick(&spin, Qt::Key_End); @@ -901,7 +901,7 @@ void tst_QDoubleSpinBox::doubleDot() spin.setValue(2.12); QTest::keyClick(&spin, Qt::Key_Backspace); QCOMPARE(spin.text(), QString("2.12")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(&spin, Qt::Key_Home); diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index 8366f61a2e..e94fd18bc6 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -53,7 +53,7 @@ #include "qclipboard.h" #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <Carbon/Carbon.h> // For the random function. #include <cstdlib> // For the random function. #endif @@ -1408,7 +1408,7 @@ void tst_QLineEdit::undo_keypressevents() #ifndef QT_NO_CLIPBOARD static bool nativeClipboardWorking() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC PasteboardRef pasteboard; OSStatus status = PasteboardCreate(0, &pasteboard); if (status == noErr) @@ -1811,7 +1811,7 @@ void tst_QLineEdit::isReadOnly() static void figureOutProperKey(Qt::Key &key, Qt::KeyboardModifiers &pressState) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC static bool tst_lineedit_randomized = false; // Mac has 3 different ways of accomplishing this (same for moving to the back) // So I guess we should just randomly do this for now. Which may get people mad, but if @@ -2015,14 +2015,14 @@ void tst_QLineEdit::cursorPositionChanged_data() keys.addKeyClick(Qt::Key_Home); keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier); QTest::newRow("abc efg<home><ctrl-right>") << keys -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC << 0 << 4; #else << 6 << 7; #endif keys.clear(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keys.addKeyClick(Qt::Key_A); keys.addKeyClick(Qt::Key_B); keys.addKeyClick(Qt::Key_C); @@ -2045,13 +2045,13 @@ void tst_QLineEdit::cursorPositionChanged_data() keys.addKeyClick(Qt::Key_F); keys.addKeyClick(Qt::Key_Left, Qt::ControlModifier); QTest::newRow("abc efg<ctrl-left>") << keys << 7 -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC << 4; #else << 0; #endif keys.clear(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keys.addKeyClick(Qt::Key_A); keys.addKeyClick(Qt::Key_B); keys.addKeyClick(Qt::Key_C); @@ -2793,7 +2793,7 @@ void tst_QLineEdit::setSelection() #ifndef QT_NO_CLIPBOARD void tst_QLineEdit::cut() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC { PasteboardRef pasteboard; OSStatus status = PasteboardCreate(0, &pasteboard); @@ -3123,7 +3123,7 @@ void tst_QLineEdit::inlineCompletion() QCOMPARE(testWidget->selectedText(), QString("tem1")); Qt::KeyboardModifiers keyboardModifiers = Qt::ControlModifier; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keyboardModifiers |= Qt::AltModifier; #endif QTest::keyClick(testWidget, Qt::Key_Down, keyboardModifiers); diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index 6e1524c055..1b373fe1ce 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -101,7 +101,7 @@ static bool tabBetweenSubWindowsIn(QMdiArea *mdiArea, int tabCount = -1, bool re Qt::KeyboardModifiers modifiers = reverse ? Qt::ShiftModifier : Qt::NoModifier; Qt::Key key; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC key = Qt::Key_Meta; modifiers |= Qt::MetaModifier; #else @@ -194,7 +194,7 @@ static bool verifyArrangement(QMdiArea *mdiArea, Arrangement arrangement, const QStyleOptionTitleBar options; options.initFrom(firstSubWindow); int titleBarHeight = firstSubWindow->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // ### Remove this after the mac style has been fixed if (qobject_cast<QMacStyle *>(firstSubWindow->style())) titleBarHeight -= 4; @@ -444,7 +444,7 @@ void tst_QMdiArea::subWindowActivated() } } -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <Security/AuthSession.h> bool macHasAccessToWindowsServer() { @@ -519,7 +519,7 @@ void tst_QMdiArea::subWindowActivated2() mdiArea.showMinimized(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&mdiArea); -#elif defined (Q_WS_MAC) +#elif defined (Q_OS_MAC) if (!macHasAccessToWindowsServer()) QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort); #endif @@ -657,7 +657,7 @@ void tst_QMdiArea::changeWindowTitle() #else widget->setWindowState(Qt::WindowMaximized); #endif -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) ); #endif @@ -667,7 +667,7 @@ void tst_QMdiArea::changeWindowTitle() qApp->processEvents(); QTest::qWaitForWindowShown(mw); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) ); #endif @@ -685,7 +685,7 @@ void tst_QMdiArea::changeWindowTitle() widget->setWindowState(Qt::WindowMaximized); #endif qApp->processEvents(); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) ); widget->setWindowTitle( wc2 ); QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc2) ); @@ -703,7 +703,7 @@ void tst_QMdiArea::changeWindowTitle() #endif qApp->processEvents(); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) ); #endif #ifdef USE_SHOW @@ -712,7 +712,7 @@ void tst_QMdiArea::changeWindowTitle() widget->setWindowState(Qt::WindowNoState); #endif qApp->processEvents(); -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) QCOMPARE(mw->windowTitle(), mwc); #else QCOMPARE( mw->windowTitle(), mwc2 ); @@ -724,7 +724,7 @@ void tst_QMdiArea::changeWindowTitle() widget->setWindowState(Qt::WindowMaximized); #endif qApp->processEvents(); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) ); #endif @@ -773,7 +773,7 @@ void tst_QMdiArea::changeModified() QCOMPARE( mw->isWindowModified(), false); QCOMPARE( widget->isWindowModified(), true); widget->setWindowState(Qt::WindowMaximized); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QCOMPARE( mw->isWindowModified(), true); #endif QCOMPARE( widget->isWindowModified(), true); @@ -783,7 +783,7 @@ void tst_QMdiArea::changeModified() QCOMPARE( widget->isWindowModified(), true); widget->setWindowState(Qt::WindowMaximized); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QCOMPARE( mw->isWindowModified(), true); #endif QCOMPARE( widget->isWindowModified(), true); @@ -793,7 +793,7 @@ void tst_QMdiArea::changeModified() QCOMPARE( widget->isWindowModified(), false); widget->setWindowModified(true); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QCOMPARE( mw->isWindowModified(), true); #endif QCOMPARE( widget->isWindowModified(), true); @@ -1029,7 +1029,7 @@ void tst_QMdiArea::activeSubWindow() qApp->setActiveWindow(&mainWindow); QCOMPARE(mdiArea->activeSubWindow(), subWindow); -#if !defined(Q_WS_MAC) && !defined(Q_WS_WIN) +#if !defined(Q_OS_MAC) && !defined(Q_WS_WIN) qApp->setActiveWindow(0); QVERIFY(!mdiArea->activeSubWindow()); #endif @@ -1114,7 +1114,7 @@ void tst_QMdiArea::currentSubWindow() QVERIFY(mdiArea.activeSubWindow()); QVERIFY(mdiArea.currentSubWindow()); -#if !defined(Q_WS_MAC) && !defined(Q_WS_WIN) +#if !defined(Q_OS_MAC) && !defined(Q_WS_WIN) qApp->setActiveWindow(0); QVERIFY(!mdiArea.activeSubWindow()); QVERIFY(mdiArea.currentSubWindow()); @@ -2042,7 +2042,7 @@ void tst_QMdiArea::delayedPlacement() void tst_QMdiArea::iconGeometryInMenuBar() { -#if !defined (Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined(Q_OS_WINCE) QMainWindow mainWindow; QMenuBar *menuBar = mainWindow.menuBar(); QMdiArea *mdiArea = new QMdiArea; diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index 8f4c2a9806..5f799e12a1 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -59,7 +59,7 @@ #include <QStyleOptionTitleBar> #include <QPushButton> #include <QSizeGrip> -#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC) #include <QMacStyle> #endif @@ -189,7 +189,7 @@ private slots: void setWindowTitle(); void resizeEvents_data(); void resizeEvents(); -#if defined(Q_WS_MAC) +#if defined(Q_OS_MAC) void defaultSizeGrip(); #endif void hideAndShow(); @@ -197,7 +197,7 @@ private slots: void explicitlyHiddenWidget(); void resizeTimer(); void fixedMinMaxSize(); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) void replaceMenuBarWhileMaximized(); void closeOnDoubleClick(); #endif @@ -374,7 +374,7 @@ void tst_QMdiSubWindow::mainWindowSupport() qApp->setActiveWindow(&mainWindow); // QMainWindow's window title is empty -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) { QCOMPARE(mainWindow.windowTitle(), QString()); QMdiSubWindow *window = workspace->addSubWindow(new QPushButton(QLatin1String("Test"))); @@ -426,7 +426,7 @@ void tst_QMdiSubWindow::mainWindowSupport() window->showMaximized(); qApp->processEvents(); QVERIFY(window->isMaximized()); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QVERIFY(window->maximizedButtonsWidget()); QCOMPARE(window->maximizedButtonsWidget(), mainWindow.menuBar()->cornerWidget(Qt::TopRightCorner)); QVERIFY(window->maximizedSystemMenuIconWidget()); @@ -448,13 +448,13 @@ void tst_QMdiSubWindow::mainWindowSupport() QVERIFY(!nestedWindow->maximizedButtonsWidget()); QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget()); -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]") .arg(originalWindowTitle, window->widget()->windowTitle())); #endif } -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) return; #endif @@ -605,7 +605,7 @@ void tst_QMdiSubWindow::showShaded() int offset = window->style()->pixelMetric(QStyle::PM_MDIFrameWidth) / 2; QPoint mousePosition(window->width() - qMax(offset, 2), window->height() - qMax(offset, 2)); QWidget *mouseReceiver = 0; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (qobject_cast<QMacStyle*>(window->style())) mouseReceiver = qFindChild<QSizeGrip *>(window); else @@ -789,7 +789,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove() QStyleOptionTitleBar options; options.initFrom(window); int height = window->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options); -#if defined(Q_WS_MAC) +#if defined(Q_OS_MAC) // ### Remove this after mac style has been fixed height -= 4; #endif @@ -1039,7 +1039,7 @@ void tst_QMdiSubWindow::setSystemMenu() systemMenu->hide(); QVERIFY(!qApp->activePopupWidget()); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) // System menu in menu bar. subWindow->showMaximized(); QVERIFY(subWindow->isMaximized()); @@ -1072,7 +1072,7 @@ void tst_QMdiSubWindow::setSystemMenu() systemMenu->hide(); QVERIFY(!qApp->activePopupWidget()); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) // System menu in menu bar in reverse mode. subWindow->showMaximized(); QVERIFY(subWindow->isMaximized()); @@ -1422,7 +1422,7 @@ void tst_QMdiSubWindow::resizeEvents() QCOMPARE(widgetResizeEventSpy.count(), expectedWidgetResizeEvents); } -#if defined(Q_WS_MAC) +#if defined(Q_OS_MAC) void tst_QMdiSubWindow::defaultSizeGrip() { if (!qApp->style()->inherits("QMacStyle")) @@ -1463,7 +1463,7 @@ void tst_QMdiSubWindow::hideAndShow() QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner)); QMdiSubWindow *subWindow = mdiArea->addSubWindow(new QTextEdit); subWindow->showMaximized(); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner)); QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget()); #endif @@ -1478,7 +1478,7 @@ void tst_QMdiSubWindow::hideAndShow() // Show QMdiArea. tabWidget->setCurrentIndex(0); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner)); QVERIFY(subWindow->maximizedButtonsWidget()); QVERIFY(subWindow->maximizedSystemMenuIconWidget()); @@ -1500,7 +1500,7 @@ void tst_QMdiSubWindow::hideAndShow() QVERIFY(subWindow); QCOMPARE(mdiArea->activeSubWindow(), subWindow); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner)); QVERIFY(subWindow->maximizedButtonsWidget()); QVERIFY(subWindow->maximizedSystemMenuIconWidget()); @@ -1515,7 +1515,7 @@ void tst_QMdiSubWindow::hideAndShow() QCOMPARE(window->size(), window->sizeHint()); subWindow->showMaximized(); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget()); #endif @@ -1525,7 +1525,7 @@ void tst_QMdiSubWindow::hideAndShow() QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner)); subWindow->show(); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) QVERIFY(subWindow->maximizedButtonsWidget()); QVERIFY(subWindow->maximizedSystemMenuIconWidget()); QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget()); @@ -1539,7 +1539,7 @@ void tst_QMdiSubWindow::hideAndShow() // Show QMainWindow. mainWindow.show(); -#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) QVERIFY(subWindow->maximizedButtonsWidget()); QVERIFY(subWindow->maximizedSystemMenuIconWidget()); QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget()); @@ -1686,7 +1686,7 @@ void tst_QMdiSubWindow::fixedMinMaxSize() QStyleOptionTitleBar options; options.initFrom(subWindow); int minimizedHeight = subWindow->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options); -#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC) // ### Remove this after mac style has been fixed if (qobject_cast<QMacStyle *>(subWindow->style())) minimizedHeight -= 4; @@ -1720,7 +1720,7 @@ void tst_QMdiSubWindow::fixedMinMaxSize() QCOMPARE(subWindow->size(), minimumSize); } -#if !defined( Q_WS_MAC) && !defined( Q_OS_WINCE) +#if !defined( Q_OS_MAC) && !defined( Q_OS_WINCE) void tst_QMdiSubWindow::replaceMenuBarWhileMaximized() { @@ -1894,7 +1894,7 @@ void tst_QMdiSubWindow::mdiArea() void tst_QMdiSubWindow::task_182852() { -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QMdiArea *workspace = new QMdiArea; QMainWindow mainWindow; diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp index b61398a8df..9263ad0b87 100644 --- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp +++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp @@ -365,7 +365,7 @@ void tst_QMenu::keyboardNavigation() QCOMPARE(highlighted, (QAction *)0); } -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QT_BEGIN_NAMESPACE extern bool qt_tab_all_widgets; // from qapplication.cpp QT_END_NAMESPACE @@ -378,7 +378,7 @@ void tst_QMenu::focus() menu.addAction("Two"); menu.addAction("Three"); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (!qt_tab_all_widgets) QSKIP("Computer is currently set up to NOT tab to all widgets," " this test assumes you can tab to all widgets"); @@ -418,7 +418,7 @@ void tst_QMenu::overrideMenuAction() // On Mac and Windows CE, we need to create native key events to test menu // action activation, so skip this part of the test. -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) QAction *aQuit = new QAction("Quit", &w); aQuit->setShortcut(QKeySequence("Ctrl+X")); m->addAction(aQuit); diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp index 5747f0ba76..ff8da6e20d 100644 --- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp @@ -330,7 +330,7 @@ void tst_QMenuBar::onActivated( QAction* action ) void tst_QMenuBar::accel() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("On Mac/WinCE, native key events are needed to test menu action activation"); #endif @@ -348,7 +348,7 @@ void tst_QMenuBar::accel() void tst_QMenuBar::activatedCount() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("On Mac/WinCE, native key events are needed to test menu action activation"); #endif // create a popup menu with menu items set the accelerators later... @@ -562,7 +562,7 @@ void tst_QMenuBar::insertItem_QString_QObject() void tst_QMenuBar::check_accelKeys() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("On Mac/WinCE, native key events are needed to test menu action activation"); #endif initComplexMenubar(); @@ -631,7 +631,7 @@ void tst_QMenuBar::check_accelKeys() void tst_QMenuBar::check_cursorKeys1() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("Qt/Mac,WinCE does not use the native popups/menubar"); #endif @@ -662,7 +662,7 @@ void tst_QMenuBar::check_cursorKeys1() void tst_QMenuBar::check_cursorKeys2() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("Qt/Mac,WinCE does not use the native popups/menubar"); #endif @@ -692,7 +692,7 @@ void tst_QMenuBar::check_cursorKeys2() */ void tst_QMenuBar::check_cursorKeys3() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("Qt/Mac,WinCE does not use the native popups/menubar"); #endif @@ -796,7 +796,7 @@ void tst_QMenuBar::check_endKey() void tst_QMenuBar::check_escKey() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("Qt/Mac,WinCE does not use the native popups/menubar"); #endif @@ -939,7 +939,7 @@ void tst_QMenuBar::check_escKey() void tst_QMenuBar::allowActiveAndDisabled() { -#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE_WM) +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE_WM) mb->hide(); mb->clear(); @@ -977,7 +977,7 @@ tst_QMenuBar::allowActiveAndDisabled() QCOMPARE(mb->activeAction()->text(), fileMenu.title()); mb->hide(); -#endif //Q_WS_MAC +#endif //Q_OS_MAC } void tst_QMenuBar::check_altPress() @@ -999,7 +999,7 @@ void tst_QMenuBar::check_altPress() void tst_QMenuBar::check_shortcutPress() { -#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM) +#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM) QSKIP("Qt/Mac,WinCE does not use the native popups/menubar"); #endif @@ -1020,7 +1020,7 @@ void tst_QMenuBar::check_shortcutPress() void tst_QMenuBar::check_menuPosition() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QSKIP("Qt/Mac does not use the native popups/menubar"); #endif #ifdef Q_OS_WINCE_WM @@ -1234,7 +1234,7 @@ void tst_QMenuBar::menubarSizeHint() void tst_QMenuBar::taskQTBUG4965_escapeEaten() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QSKIP("On Mac, do not test the menubar with escape key"); #endif QMenuBar menubar; diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index ae00a9c60e..87eaa444b9 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -66,7 +66,7 @@ Q_DECLARE_METATYPE(pairListType); Q_DECLARE_METATYPE(keyPairType); Q_DECLARE_METATYPE(QList<bool>); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <Carbon/Carbon.h> #endif @@ -161,7 +161,7 @@ private: bool tst_QPlainTextEdit::nativeClipboardWorking() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC PasteboardRef pasteboard; OSStatus status = PasteboardCreate(0, &pasteboard); if (status == noErr) @@ -286,14 +286,14 @@ void tst_QPlainTextEdit::createSelection() { QTest::keyClicks(ed, "Hello World"); /* go to start */ -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QTest::keyClick(ed, Qt::Key_Home, Qt::ControlModifier); #else QTest::keyClick(ed, Qt::Key_Home); #endif QCOMPARE(ed->textCursor().position(), 0); /* select until end of text */ -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QTest::keyClick(ed, Qt::Key_End, Qt::ControlModifier | Qt::ShiftModifier); #else QTest::keyClick(ed, Qt::Key_End, Qt::ShiftModifier); @@ -1008,7 +1008,7 @@ void tst_QPlainTextEdit::copyAvailable() QFETCH(QList<bool>, copyAvailable); QFETCH(QString, function); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QSKIP("QTBUG-22283: copyAvailable has never passed on Mac"); #endif ed->clear(); diff --git a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp index a5f5162dd1..da63157279 100644 --- a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp +++ b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp @@ -176,7 +176,7 @@ void tst_QProgressBar::format() bar.setFormat("%v of %m (%p%)"); qApp->processEvents(); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC // Animated scroll bars get paint events all the time #ifdef Q_OS_WIN if (QSysInfo::WindowsVersion < QSysInfo::WV_VISTA) diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp index c9150cba68..c888f632b6 100644 --- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp +++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp @@ -136,7 +136,7 @@ void tst_QScrollBar::task_209492() QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent); // Check that the action was triggered once. -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QEXPECT_FAIL("", "Fix does does not work on Mac due to paint architechure differences.", Abort); #endif QCOMPARE(scrollArea.scrollCount, 1); diff --git a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp index 87067ac885..eedc5ce3b3 100644 --- a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp +++ b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp @@ -137,7 +137,7 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange() QVERIFY(sizeGrip->isVisible()); widget->showMaximized(); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QVERIFY(!sizeGrip->isVisible()); #else QVERIFY(sizeGrip->isVisible()); diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index a58705f224..9fef691688 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -378,7 +378,7 @@ void tst_QSpinBox::setTracking_data() QStringList texts1; QStringList texts2; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier); #else keys.addKeyClick(Qt::Key_End); @@ -824,13 +824,13 @@ void tst_QSpinBox::removeAll() spin.setSuffix("bar"); spin.setValue(2); spin.show(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(&spin, Qt::Key_Home); #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier|Qt::ShiftModifier); #else QTest::keyClick(&spin, Qt::Key_End, Qt::ShiftModifier); @@ -845,7 +845,7 @@ void tst_QSpinBox::startWithDash() { SpinBox spin(0); spin.show(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier); #else QTest::keyClick(&spin, Qt::Key_Home); diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp index 76ff4e157b..9471f9c167 100644 --- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp +++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp @@ -261,7 +261,7 @@ void tst_QStatusBar::QTBUG4334_hiddenOnMaximizedWindow() main.setStatusBar(&statusbar); main.showMaximized(); QTest::qWaitForWindowShown(&main); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QVERIFY(!statusbar.findChild<QSizeGrip*>()->isVisible()); #endif main.showNormal(); diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp index b857af63bb..5278ff7062 100644 --- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp +++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp @@ -579,7 +579,7 @@ void tst_QTabWidget::paintEventCount() 4; #elif defined(Q_WS_WIN) 2; -#elif defined(Q_WS_MAC) +#elif defined(Q_OS_MAC) 5; #else 2; diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index c16f39aaea..afa0d84ce7 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -70,13 +70,13 @@ Q_DECLARE_METATYPE(keyPairType); Q_DECLARE_METATYPE(QList<bool>); Q_DECLARE_METATYPE(QList<int>); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <Carbon/Carbon.h> #endif bool nativeClipboardWorking() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC PasteboardRef pasteboard; OSStatus status = PasteboardCreate(0, &pasteboard); if (status == noErr) @@ -215,7 +215,7 @@ private: bool tst_QTextEdit::nativeClipboardWorking() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC PasteboardRef pasteboard; OSStatus status = PasteboardCreate(0, &pasteboard); if (status == noErr) @@ -475,14 +475,14 @@ void tst_QTextEdit::createSelection() { QTest::keyClicks(ed, "Hello World"); /* go to start */ -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QTest::keyClick(ed, Qt::Key_Home, Qt::ControlModifier); #else QTest::keyClick(ed, Qt::Key_Home); #endif QCOMPARE(ed->textCursor().position(), 0); /* select until end of text */ -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QTest::keyClick(ed, Qt::Key_End, Qt::ControlModifier | Qt::ShiftModifier); #else QTest::keyClick(ed, Qt::Key_End, Qt::ShiftModifier); @@ -1355,7 +1355,7 @@ void tst_QTextEdit::copyAvailable() QFETCH(QList<bool>, copyAvailable); QFETCH(QString, function); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QSKIP("QTBUG-22283: copyAvailable has never passed on Mac"); #endif ed->clear(); diff --git a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp index d06ac59100..c99309f21e 100644 --- a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp +++ b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp @@ -1020,7 +1020,7 @@ void tst_QToolBar::widgetAction() void tst_QToolBar::accel() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC extern void qt_set_sequence_auto_mnemonic(bool b); qt_set_sequence_auto_mnemonic(true); #endif @@ -1040,7 +1040,7 @@ void tst_QToolBar::accel() QTest::qWait(300); QTRY_COMPARE(spy.count(), 1); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC qt_set_sequence_auto_mnemonic(false); #endif } diff --git a/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp b/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp index 5ba606639b..7dcc6a9619 100644 --- a/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp +++ b/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp @@ -230,7 +230,7 @@ void tst_QWorkspace::windowActivated() workspace->addWindow(widget); widget->showMaximized(); qApp->sendPostedEvents(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QEXPECT_FAIL("", "This test has never passed on Mac. QWorkspace is obsoleted -> won't fix", Abort); #endif QCOMPARE(spy.count(), 0); |