From a89c7e4020591e27ba265fa082b83440f2afa3b2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 16 Jul 2012 14:46:08 +0200 Subject: Replace Q_WS_ in tests by Q_OS_ or check platform names. Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc Reviewed-by: Joerg Bornemann --- tests/auto/gui/text/qfont/tst_qfont.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'tests/auto/gui/text/qfont') 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()); -- cgit v1.2.3