summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-01-16 12:02:14 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-18 12:51:18 +0100
commit44cf5592acf97ecb2c83e9d7451de08b97498036 (patch)
treea9127444b50906e10f036edc718bdb8b74feaf80 /tests
parent4f25e66f7a7269af0002bfe4b1c5caa941c6ee64 (diff)
Replace Q_WS_MAC with Q_OS_MAC in tests/auto/gui
Change-Id: I6d69ac96597f27575dd40e4c80c982f06fa88f51 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp8
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp18
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp4
-rw-r--r--tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp2
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp2
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp8
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp4
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp16
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp6
9 files changed, 34 insertions, 34 deletions
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index fcba0958e7..d46e04956e 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -46,7 +46,7 @@
#include <QtCore/QDir>
#include <QtGui/QGuiApplication>
#include <QtGui/QClipboard>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
#endif
@@ -74,7 +74,7 @@ void tst_QClipboard::init()
bool tst_QClipboard::nativeClipboardWorking()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)
@@ -295,7 +295,7 @@ void tst_QClipboard::setMimeData()
QCOMPARE(spySelection.count(), 1);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 0);
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
QCOMPARE(spySelection.count(), 0);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 1);
@@ -328,7 +328,7 @@ void tst_QClipboard::setMimeData()
QCOMPARE(spySelection.count(), 1);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 0);
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
QCOMPARE(spySelection.count(), 0);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 1);
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index fcc30a7afe..52f4652a56 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -47,7 +47,7 @@
#include <QTranslator>
#include <QLibraryInfo>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
struct MacSpecialKey {
int key;
@@ -144,7 +144,7 @@ private slots:
private:
QTranslator *ourTranslator;
QTranslator *qtTranslator;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static const QString MacCtrl;
static const QString MacMeta;
static const QString MacAlt;
@@ -154,7 +154,7 @@ private:
};
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
const QString tst_QKeySequence::MacCtrl = QString(QChar(0x2318));
const QString tst_QKeySequence::MacMeta = QString(QChar(0x2303));
const QString tst_QKeySequence::MacAlt = QString(QChar(0x2325));
@@ -195,7 +195,7 @@ void tst_QKeySequence::operatorQString_data()
QTest::newRow( "No modifier" ) << 0 << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "\x0c5" );
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::newRow( "Ctrl+Left" ) << int(Qt::CTRL) << int(Qt::Key_Left) << QString( "Ctrl+Left" );
QTest::newRow( "Ctrl+," ) << int(Qt::CTRL) << int(Qt::Key_Comma) << QString( "Ctrl+," );
QTest::newRow( "Alt+Left" ) << int(Qt::ALT) << int(Qt::Key_Left) << QString( "Alt+Left" );
@@ -339,7 +339,7 @@ void tst_QKeySequence::standardKeys_data()
QTest::newRow("zoomOut") << (int)QKeySequence::ZoomOut<< QString("CTRL+-");
QTest::newRow("whatsthis") << (int)QKeySequence::WhatsThis<< QString("SHIFT+F1");
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_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+{");
@@ -371,7 +371,7 @@ void tst_QKeySequence::keyBindings()
{
QList<QKeySequence> bindings = QKeySequence::keyBindings(QKeySequence::Copy);
QList<QKeySequence> expected;
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
expected << QKeySequence("CTRL+C");
#elif defined Q_WS_X11
expected << QKeySequence("CTRL+C") << QKeySequence("F16") << QKeySequence("CTRL+INSERT");
@@ -402,7 +402,7 @@ void tst_QKeySequence::mnemonic_data()
void tst_QKeySequence::mnemonic()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("mnemonics are not used on Mac OS X");
#endif
QFETCH(QString, string);
@@ -429,7 +429,7 @@ void tst_QKeySequence::toString_data()
QTest::addColumn<QString>("platformString");
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::newRow("Ctrl+Left") << QString("Ctrl+Left") << QString("Ctrl+Left") << QString("Ctrl+Left");
QTest::newRow("Alt+Left") << QString("Alt+Left") << QString("Alt+Left") << QString("Alt+Left");
QTest::newRow("Alt+Shift+Left") << QString("Alt+Shift+Left") << QString("Alt+Shift+Left") << QString("Alt+Shift+Left");
@@ -608,7 +608,7 @@ void tst_QKeySequence::translated()
{
QFETCH(QString, transKey);
QFETCH(QString, compKey);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("No need to translate modifiers on Mac OS X");
#elif defined(Q_OS_WINCE)
QSKIP("No need to translate modifiers on WinCE");
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 4abaa34df8..1cd0a072fd 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -453,7 +453,7 @@ QRgb qt_compose_alpha(QRgb source, QRgb dest)
*/
void tst_QPainter::drawPixmap_comp()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("Mac has other ideas about alpha composition");
#endif
QFETCH(uint, dest);
@@ -1363,7 +1363,7 @@ void tst_QPainter::drawRoundRect()
QFETCH(QRect, rect);
QFETCH(bool, usePen);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (QTest::currentDataTag() == QByteArray("rect(6, 12, 3, 14) with pen") ||
QTest::currentDataTag() == QByteArray("rect(6, 17, 3, 25) with pen") ||
QTest::currentDataTag() == QByteArray("rect(10, 6, 10, 3) with pen") ||
diff --git a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
index 6ffdc63e6c..216ca253d3 100644
--- a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
+++ b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
@@ -90,7 +90,7 @@ void tst_QPrinterInfo::macFixNameFormat(QString *printerName)
{
// Modify the format of the printer name to match Qt, lpstat returns
// foo___domain_no, Qt returns foo @ domain.no
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
printerName->replace(QLatin1String("___"), QLatin1String(" @ "));
printerName->replace(QLatin1String("_"), QLatin1String("."));
#else
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index c3d41a27bf..424a19c752 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -613,7 +613,7 @@ void tst_QFont::lastResortFont()
void tst_QFont::styleName()
{
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
QSKIP("Only tested on Mac");
#else
QFont font("Helvetica Neue");
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index e7bbfbceff..edaaf33a39 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -63,7 +63,7 @@ private slots:
void fixedPitch_data();
void fixedPitch();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void trickyFonts_data();
void trickyFonts();
#endif
@@ -132,7 +132,7 @@ void tst_QFontDatabase::fixedPitch_data()
QTest::newRow( "Andale Mono" ) << QString( "Andale Mono" ) << true;
QTest::newRow( "Courier" ) << QString( "Courier" ) << true;
QTest::newRow( "Courier New" ) << QString( "Courier New" ) << true;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::newRow( "Script" ) << QString( "Script" ) << false;
QTest::newRow( "Lucida Console" ) << QString( "Lucida Console" ) << true;
QTest::newRow( "DejaVu Sans" ) << QString( "DejaVu Sans" ) << false;
@@ -162,7 +162,7 @@ void tst_QFontDatabase::fixedPitch()
QCOMPARE(fi.fixedPitch(), fixedPitch);
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void tst_QFontDatabase::trickyFonts_data()
{
QTest::addColumn<QString>("font");
@@ -247,7 +247,7 @@ void tst_QFontDatabase::addAppFont()
#endif
QCOMPARE(fontDbChangedSpy.count(), 1);
// addApplicationFont is supported on Mac, don't skip the test if it breaks.
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
if (id == -1)
QSKIP("Skip the test since app fonts are not supported on this system");
#endif
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index a0cda39c27..a61f625fde 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -98,7 +98,7 @@ private slots:
void rawFontSetPixelSize_data();
void rawFontSetPixelSize();
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
+#if defined(Q_WS_X11) || defined(Q_OS_MAC)
void multipleRawFontsFromData();
#endif
private:
@@ -867,7 +867,7 @@ void tst_QRawFont::rawFontSetPixelSize()
QCOMPARE(rawFont.pixelSize(), 24.0);
}
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
+#if defined(Q_WS_X11) || defined(Q_OS_MAC)
void tst_QRawFont::multipleRawFontsFromData()
{
QFile file(testFont);
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index e816b04153..2c972bdee8 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -300,7 +300,7 @@ void tst_QTextLayout::simpleBoundingRect()
void tst_QTextLayout::threeLineBoundingRect()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
/* stricter check. break text into three lines */
@@ -419,7 +419,7 @@ void tst_QTextLayout::forcedBreaks()
void tst_QTextLayout::breakAny()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString text = "ABCD";
@@ -461,7 +461,7 @@ void tst_QTextLayout::breakAny()
void tst_QTextLayout::noWrap()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString text = "AB CD";
@@ -605,7 +605,7 @@ void tst_QTextLayout::charWordStopOnLineSeparator()
void tst_QTextLayout::xToCursorAtEndOfLine()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString text = "FirstLine SecondLine";
@@ -667,7 +667,7 @@ void tst_QTextLayout::charStopForSurrogatePairs()
void tst_QTextLayout::tabStops()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString txt("Hello there\tworld");
@@ -1461,7 +1461,7 @@ void tst_QTextLayout::textWidthWithLineSeparator()
void tst_QTextLayout::cursorInLigatureWithMultipleLines()
{
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
QSKIP("This test can only be run on Mac");
#endif
QTextLayout layout("first line finish", QFont("Times", 20));
@@ -1477,7 +1477,7 @@ void tst_QTextLayout::cursorInLigatureWithMultipleLines()
void tst_QTextLayout::xToCursorForLigatures()
{
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
QSKIP("This test can only be run on Mac");
#endif
QTextLayout layout("fi", QFont("Times", 20));
@@ -1501,7 +1501,7 @@ void tst_QTextLayout::xToCursorForLigatures()
void tst_QTextLayout::cursorInNonStopChars()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("This test can not be run on Mac");
#endif
QTextLayout layout(QString::fromUtf8("\xE0\xA4\xA4\xE0\xA5\x8D\xE0\xA4\xA8"));
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 73678585d6..82a4e341b2 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -56,7 +56,7 @@
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
+#if defined(Q_WS_X11) || defined(Q_OS_MAC)
#define private public
#include <private/qtextengine_p.h>
#include <qtextlayout.h>
@@ -1163,7 +1163,7 @@ void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
void tst_QTextScriptEngine::combiningMarks_qtbug15675()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QString s;
s.append(QChar(0x0061));
s.append(QChar(0x0062));
@@ -1213,7 +1213,7 @@ void tst_QTextScriptEngine::mirroredChars_data()
void tst_QTextScriptEngine::mirroredChars()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("Not supported on Mac");
#endif
QFETCH(int, hintingPreference);