diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-31 01:46:11 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-31 01:46:11 (GMT) |
commit | 1e48d40597bbe12321a5a3e42b3595dc17a7f8e7 (patch) | |
tree | 16bc5824f55124f1be742cc5c3f55f94e223fee1 /tests/auto/qrawfont | |
parent | c57195dc899ca732083487ed069ef813c340c0b5 (diff) | |
parent | e95de30977291a251660f72baa84b5ff244711fb (diff) | |
download | Qt-1e48d40597bbe12321a5a3e42b3595dc17a7f8e7.zip Qt-1e48d40597bbe12321a5a3e42b3595dc17a7f8e7.tar.gz Qt-1e48d40597bbe12321a5a3e42b3595dc17a7f8e7.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
don't crash when destroying the shortcuts
Disable activeqt on win32-g++ (it doesn't build).
fix warning
remove unused functions
Make the DBus timeout configurable in QDBusAbstractInterface.
Fix a typo in qt-conf docs.
Revert "Fix build with the Clang compiler"
Added missing no_include_pwd check
Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'
Fix build with the Clang compiler
Change spacing of title in offline style.
Add support for rawFonts loaded from data in FaceId
examples: fix compilation with namespaced Qt.
Russian translation update
Update Japanese translations for Qt 4.8.
directfb: Include directfbgl.h directly
tests: fix QNetworkProxyFactory test
don't detach until the list is going to be modified
optimize QList::removeAll()
Diffstat (limited to 'tests/auto/qrawfont')
-rw-r--r-- | tests/auto/qrawfont/tst_qrawfont.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp index e0680c4..eb78057 100644 --- a/tests/auto/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/qrawfont/tst_qrawfont.cpp @@ -47,7 +47,6 @@ class tst_QRawFont: public QObject { Q_OBJECT - #if !defined(QT_NO_RAWFONT) private slots: void invalidRawFont(); @@ -94,6 +93,11 @@ private slots: void rawFontSetPixelSize_data(); void rawFontSetPixelSize(); + +#if defined(Q_WS_X11) || defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) + void multipleRawFontsFromData(); +#endif + #endif // QT_NO_RAWFONT }; @@ -843,6 +847,25 @@ void tst_QRawFont::rawFontSetPixelSize() QCOMPARE(rawFont.pixelSize(), 24.0); } +#if defined(Q_WS_X11) || defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) +void tst_QRawFont::multipleRawFontsFromData() +{ + QFile file(QString::fromLatin1(SRCDIR "testfont.ttf")); + QRawFont testFont; + if (file.open(QIODevice::ReadOnly)) { + testFont.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting); + file.close(); + } + file.setFileName(QLatin1String(SRCDIR "testfont_bold_italic.ttf")); + QRawFont testFontBoldItalic; + if (file.open(QIODevice::ReadOnly)) + testFontBoldItalic.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting); + + QVERIFY(testFont.familyName() != (testFontBoldItalic.familyName()) + || testFont.styleName() != (testFontBoldItalic.styleName())); +} +#endif + #endif // QT_NO_RAWFONT QTEST_MAIN(tst_QRawFont) |