diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2010-09-08 19:01:21 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2010-09-08 19:57:51 (GMT) |
commit | 0c49838016ab77d596f53774d8432f9f4d6b1188 (patch) | |
tree | 330a5352bb23cd060fad485a923e2e61d359a920 /src/gui/text | |
parent | 526705430be6371166464689e970752a5ce41ed6 (diff) | |
download | Qt-0c49838016ab77d596f53774d8432f9f4d6b1188.zip Qt-0c49838016ab77d596f53774d8432f9f4d6b1188.tar.gz Qt-0c49838016ab77d596f53774d8432f9f4d6b1188.tar.bz2 |
Pulled some code from One long function into a short one
Preparations for Application font support on Symbian
Task-Number: QTBUG-6611
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 0b38aab..f9d8d31 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -99,6 +99,7 @@ public: ~QSymbianFontDatabaseExtrasImplementation(); const QSymbianTypeFaceExtras *extras(const QString &typeface, bool bold, bool italic) const; + void addFontFileToFontStore(const QFileInfo &fontFileInfo); #ifndef Q_SYMBIAN_HAS_FONTTABLE_API struct CFontFromFontStoreReleaser { @@ -150,11 +151,8 @@ QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementati m_store->InstallRasterizerL(m_rasterizer); CleanupStack::Pop(m_rasterizer);); - foreach (const QFileInfo &fontFileInfo, fontFiles) { - const QString fontFile = QDir::toNativeSeparators(fontFileInfo.absoluteFilePath()); - TPtrC fontFilePtr(qt_QString2TPtrC(fontFile)); - QT_TRAP_THROWING(m_store->AddFileL(fontFilePtr)); - } + foreach (const QFileInfo &fontFileInfo, fontFiles) + addFontFileToFontStore(fontFileInfo); #endif // !Q_SYMBIAN_HAS_FONTTABLE_API } @@ -250,6 +248,14 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c } return m_extrasHash.value(searchKey); } + +void QSymbianFontDatabaseExtrasImplementation::addFontFileToFontStore(const QFileInfo &fontFileInfo) +{ + const QString fontFile = QDir::toNativeSeparators(fontFileInfo.absoluteFilePath()); + TPtrC fontFilePtr(qt_QString2TPtrC(fontFile)); + QT_TRAP_THROWING(m_store->AddFileL(fontFilePtr)); +} + #else // QT_NO_FREETYPE class QFontEngineFTS60 : public QFontEngineFT { |