summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcssparser/tst_qcssparser.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-06 08:51:08 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-06 08:51:08 (GMT)
commit2dc7fae7ea38a0169c4c5c78d0534d688347aacb (patch)
treea32a448270ccd835b1aa670f2cfbbb98eecf2738 /tests/auto/qcssparser/tst_qcssparser.cpp
parentf1ea73bad48816222e192a95f8589493743f0c28 (diff)
parent7851cbd64d15d39a0e9cc99efa6c2d007c935ce9 (diff)
downloadQt-2dc7fae7ea38a0169c4c5c78d0534d688347aacb.zip
Qt-2dc7fae7ea38a0169c4c5c78d0534d688347aacb.tar.gz
Qt-2dc7fae7ea38a0169c4c5c78d0534d688347aacb.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: src/corelib/global/qglobal.h src/plugins/qpluginbase.pri src/qbase.pri tests/auto/qabstractitemview/tst_qabstractitemview.cpp tests/auto/qcssparser/qcssparser.pro tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'tests/auto/qcssparser/tst_qcssparser.cpp')
-rw-r--r--tests/auto/qcssparser/tst_qcssparser.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/qcssparser/tst_qcssparser.cpp b/tests/auto/qcssparser/tst_qcssparser.cpp
index c7f50d4..150f131 100644
--- a/tests/auto/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/qcssparser/tst_qcssparser.cpp
@@ -40,6 +40,9 @@
****************************************************************************/
#include <QtTest/QtTest>
#include <QtXml/QtXml>
+#if defined(Q_OS_WINCE)
+#include <QtGui/QFontDatabase>
+#endif
//TESTED_CLASS=QCss
//TESTED_FILES=gui/text/qcssparser.cpp gui/text/qcssparser_p.h
@@ -49,6 +52,11 @@
class tst_QCssParser : public QObject
{
Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
private slots:
void scanner_data();
void scanner();
@@ -91,8 +99,33 @@ private slots:
void extractBorder();
void noTextDecoration();
void quotedAndUnquotedIdentifiers();
+
+private:
+#if defined(Q_OS_WINCE)
+ int m_timesFontId;
+#endif
};
+void tst_QCssParser::initTestCase()
+{
+#if defined(Q_OS_WINCE)
+ QFontDatabase fontDB;
+ m_timesFontId = -1;
+ if (!fontDB.families().contains("Times New Roman")) {
+ m_timesFontId = QFontDatabase::addApplicationFont("times.ttf");
+ QVERIFY(m_timesFontId != -1);
+ }
+#endif
+}
+
+void tst_QCssParser::cleanupTestCase()
+{
+#if defined(Q_OS_WINCE)
+ if (m_timesFontId != -1)
+ QFontDatabase::removeApplicationFont(m_timesFontId);
+#endif
+}
+
void tst_QCssParser::scanner_data()
{
QTest::addColumn<QString>("input");