summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-18 07:51:13 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-19 08:00:09 (GMT)
commit6c121991f85164d257208b14845c7ff913a687f4 (patch)
treee65e401b540cf9100f7fe04bd42e5e19c933ff18 /tests
parent47819dc7257c60e0feb1d02177622593ec0c2d15 (diff)
downloadQt-6c121991f85164d257208b14845c7ff913a687f4.zip
Qt-6c121991f85164d257208b14845c7ff913a687f4.tar.gz
Qt-6c121991f85164d257208b14845c7ff913a687f4.tar.bz2
Make sure #ifdef'd tests still have main() function
Otherwise it won't link on QWS Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qglyphs/tst_qglyphs.cpp10
-rw-r--r--tests/auto/qrawfont/tst_qrawfont.cpp8
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/auto/qglyphs/tst_qglyphs.cpp b/tests/auto/qglyphs/tst_qglyphs.cpp
index a9ae556..ffa0d00 100644
--- a/tests/auto/qglyphs/tst_qglyphs.cpp
+++ b/tests/auto/qglyphs/tst_qglyphs.cpp
@@ -46,14 +46,13 @@
#include <qtextlayout.h>
#include <qfontdatabase.h>
-#if !defined(QT_NO_RAWFONT)
-
// #define DEBUG_SAVE_IMAGE
class tst_QGlyphs: public QObject
{
Q_OBJECT
+#if !defined(QT_NO_RAWFONT)
private slots:
void initTestCase();
void cleanupTestCase();
@@ -77,8 +76,12 @@ private slots:
private:
int m_testFontId;
QFont m_testFont;
+#endif // QT_NO_RAWFONT
+
};
+#if !defined(QT_NO_RAWFONT)
+
Q_DECLARE_METATYPE(QGlyphs);
void tst_QGlyphs::initTestCase()
@@ -572,7 +575,8 @@ void tst_QGlyphs::drawRightToLeft()
}
+#endif // QT_NO_RAWFONT
+
QTEST_MAIN(tst_QGlyphs)
#include "tst_qglyphs.moc"
-#endif // QT_NO_RAWFONT
diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp
index c20b41d..3aa4006 100644
--- a/tests/auto/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/qrawfont/tst_qrawfont.cpp
@@ -44,12 +44,11 @@
#include <qrawfont.h>
#include <private/qrawfont_p.h>
-#if !defined(QT_NO_RAWFONT)
-
class tst_QRawFont: public QObject
{
Q_OBJECT
+#if !defined(QT_NO_RAWFONT)
private slots:
void invalidRawFont();
@@ -92,8 +91,10 @@ private slots:
void unsupportedWritingSystem_data();
void unsupportedWritingSystem();
+#endif // QT_NO_RAWFONT
};
+#if !defined(QT_NO_RAWFONT)
Q_DECLARE_METATYPE(QFont::HintingPreference)
Q_DECLARE_METATYPE(QFont::Style)
Q_DECLARE_METATYPE(QFont::Weight)
@@ -806,7 +807,8 @@ void tst_QRawFont::unsupportedWritingSystem()
fontDatabase.removeApplicationFont(id);
}
+#endif // QT_NO_RAWFONT
+
QTEST_MAIN(tst_QRawFont)
#include "tst_qrawfont.moc"
-#endif // QT_NO_RAWFONT