summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-16 14:46:08 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-16 16:30:55 +0200
commita89c7e4020591e27ba265fa082b83440f2afa3b2 (patch)
tree89e22e9c07e69d4ccd757e4cd7baa6e40cdd634a /tests/auto/gui
parent887607e956531dd1f51498367b0518c1f8602c90 (diff)
Replace Q_WS_ in tests by Q_OS_ or check platform names.
Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp17
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp3
2 files changed, 9 insertions, 11 deletions
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index b5cbe54354..3c2d54a6cd 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -149,16 +149,17 @@ void tst_QFont::exactMatch()
font = QFont( "BogusFont", 33 );
QVERIFY( !font.exactMatch() );
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
QSKIP("Exact matching on windows misses a lot because of the sample chars");
#endif
-#ifdef Q_WS_X11
- QVERIFY(QFont("sans").exactMatch());
- QVERIFY(QFont("sans-serif").exactMatch());
- QVERIFY(QFont("serif").exactMatch());
- QVERIFY(QFont("monospace").exactMatch());
-#endif
+
+ if (QGuiApplication::platformName() == QLatin1String("xcb")) {
+ QVERIFY(QFont("sans").exactMatch());
+ QVERIFY(QFont("sans-serif").exactMatch());
+ QVERIFY(QFont("serif").exactMatch());
+ QVERIFY(QFont("monospace").exactMatch());
+ }
QSKIP("This test is bogus on Unix with support for font aliases in fontconfig");
@@ -201,7 +202,7 @@ void tst_QFont::exactMatch()
continue;
}
-#ifdef Q_WS_WIN32
+#ifdef Q_OS_WIN
if (font.family().startsWith("MS ") || fontinfo.family().startsWith("MS ")) {
/* qDebug("Family matching skipped for MS-Alias font: %s, fontinfo: %s",
font.family().latin1(), fontinfo.family().latin1());
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index 9510b9719a..ef37b53430 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -145,9 +145,6 @@ void tst_QFontDatabase::fixedPitch_data()
void tst_QFontDatabase::fixedPitch()
{
-#ifdef Q_WS_QWS
- QSKIP("fixedPitch not implemented for Qtopia Core");
-#endif
QFETCH(QString, font);
QFETCH(bool, fixedPitch);