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/dialogs | |
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/dialogs')
6 files changed, 14 insertions, 19 deletions
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp index 604717a53d..3babddc2ab 100644 --- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp +++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp @@ -53,7 +53,7 @@ public: tst_QColorDialog(); virtual ~tst_QColorDialog(); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC public slots: void postKeyReturn(); private slots: @@ -125,7 +125,7 @@ void tst_QColorDialog::cleanup() { } -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC //copied from QFontDialogTest void tst_QColorDialog::postKeyReturn() { QWidgetList list = QApplication::topLevelWidgets(); diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index e9d389436a..95a0f01c0d 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -440,7 +440,7 @@ public slots: void tst_QDialog::throwInExec() { -#if defined(Q_WS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_)) +#if defined(Q_OS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_)) QSKIP("Throwing exceptions in exec() is not supported on this platform."); #endif #if defined(Q_OS_LINUX) diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp index 19904f0134..ebac2c7ce3 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp @@ -909,7 +909,7 @@ void tst_QFiledialog::selectFiles() QVERIFY(listView); for (int i = 0; i < list.count(); ++i) { fd.selectFile(fd.directory().path() + "/" + list.at(i)); -#if defined(Q_WS_MAC) || defined(Q_WS_WIN) +#if defined(Q_OS_MAC) || defined(Q_WS_WIN) QEXPECT_FAIL("", "This test does not work on Mac or Windows", Abort); #endif QTRY_VERIFY(!listView->selectionModel()->selectedRows().isEmpty()); @@ -1223,7 +1223,7 @@ void tst_QFiledialog::clearLineEdit() list->setEditFocus(true); #endif QTest::keyClick(list, Qt::Key_Down); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QTest::keyClick(list, Qt::Key_Return); #else QTest::keyClick(list, Qt::Key_O, Qt::ControlModifier); @@ -1240,7 +1240,7 @@ void tst_QFiledialog::clearLineEdit() QTest::qWait(1000); QTest::keyClick(list, Qt::Key_Down); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC QTest::keyClick(list, Qt::Key_Return); #else QTest::keyClick(list, Qt::Key_O, Qt::ControlModifier); diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp index c8b1b1cc17..4c7efc1d3e 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp +++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp @@ -102,7 +102,6 @@ void tst_QFontDialog::cleanup() void tst_QFontDialog::postKeyReturn() { -#ifndef Q_WS_MAC QWidgetList list = QApplication::topLevelWidgets(); for (int i=0; i<list.count(); ++i) { QFontDialog *dialog = qobject_cast<QFontDialog*>(list[i]); @@ -111,10 +110,6 @@ void tst_QFontDialog::postKeyReturn() { return; } } -#else - extern void click_cocoa_button(); - click_cocoa_button(); -#endif } void tst_QFontDialog::defaultOkButton() diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 8e2b1882d5..b598c00434 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -48,7 +48,7 @@ #include <QApplication> #include <QPushButton> #include <QDialogButtonBox> -#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC) #include <QMacStyle> #endif #if !defined(QT_NO_STYLE_CLEANLOOKS) @@ -363,7 +363,7 @@ void tst_QMessageBox::statics() void tst_QMessageBox::shortcut() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QSKIP("shortcuts are not used on MAC OS X"); #endif QMessageBox msgBox; @@ -380,7 +380,7 @@ void tst_QMessageBox::about() QMessageBox::about(0, "Caption", "This is an auto test"); // On Mac, about and aboutQt are not modal, so we need to // explicitly run the event loop -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTRY_COMPARE(keyToSend, -1); #else QCOMPARE(keyToSend, -1); @@ -393,7 +393,7 @@ void tst_QMessageBox::about() #endif sendKeySoon(); QMessageBox::aboutQt(0, "Caption"); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QTRY_COMPARE(keyToSend, -1); #else QCOMPARE(keyToSend, -1); @@ -409,7 +409,7 @@ void tst_QMessageBox::staticSourceCompat() sendKeySoon(); ret = QMessageBox::information(0, "title", "text", QMessageBox::Yes, QMessageBox::No); int expectedButton = int(QMessageBox::Yes); -#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC) if (qobject_cast<QMacStyle *>(qApp->style())) expectedButton = int(QMessageBox::No); #elif !defined(QT_NO_STYLE_CLEANLOOKS) @@ -481,7 +481,7 @@ void tst_QMessageBox::instanceSourceCompat() QCOMPARE(exec(&mb, Qt::Key_Enter), int(QMessageBox::Yes)); QCOMPARE(exec(&mb, Qt::Key_Escape), int(QMessageBox::Cancel)); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC // mnemonics are not used on Mac OS X QCOMPARE(exec(&mb, Qt::ALT + Qt::Key_R), 0); QCOMPARE(exec(&mb, Qt::ALT + Qt::Key_Z), 1); diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index d6e810fbb9..56b5abaa71 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -441,7 +441,7 @@ void tst_QWizard::setPixmap() QVERIFY(wizard.pixmap(QWizard::BannerPixmap).isNull()); QVERIFY(wizard.pixmap(QWizard::LogoPixmap).isNull()); QVERIFY(wizard.pixmap(QWizard::WatermarkPixmap).isNull()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3) QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull() == false); else // fall through since the image doesn't exist on a 10.3 system. @@ -453,7 +453,7 @@ void tst_QWizard::setPixmap() QVERIFY(page->pixmap(QWizard::BannerPixmap).isNull()); QVERIFY(page->pixmap(QWizard::LogoPixmap).isNull()); QVERIFY(page->pixmap(QWizard::WatermarkPixmap).isNull()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3) QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull() == false); else // fall through since the image doesn't exist on a 10.3 system. |