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>
This commit is contained in:
parent
4f25e66f7a
commit
44cf5592ac
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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") ||
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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"));
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user