diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2010-09-08 19:03:05 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2010-09-08 19:58:02 (GMT) |
commit | c207a85d9d8e541a30f7dd7f0721f204757650e1 (patch) | |
tree | 60c2f4d4ac34044cdf1d5c5cdb137d3b916ccbed /src/gui/text/qfontdatabase_s60.cpp | |
parent | 0c49838016ab77d596f53774d8432f9f4d6b1188 (diff) | |
download | Qt-c207a85d9d8e541a30f7dd7f0721f204757650e1.zip Qt-c207a85d9d8e541a30f7dd7f0721f204757650e1.tar.gz Qt-c207a85d9d8e541a30f7dd7f0721f204757650e1.tar.bz2 |
Moved font list getter to qfontdatabase_s60.cpp. Reusable.
Preparations for Application font support on Symbian
Task-Number: QTBUG-6611
Diffstat (limited to 'src/gui/text/qfontdatabase_s60.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index f9d8d31..b73555f 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -58,6 +58,21 @@ QT_BEGIN_NAMESPACE +QStringList qt_symbian_fontFamiliesOnFontServer() // Also used in qfont_s60.cpp +{ + QStringList result; + QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); + const int numTypeFaces = S60->screenDevice()->NumTypefaces(); + for (int i = 0; i < numTypeFaces; i++) { + TTypefaceSupport typefaceSupport; + S60->screenDevice()->TypefaceSupport(typefaceSupport, i); + const QString familyName((const QChar *)typefaceSupport.iTypeface.iName.Ptr(), typefaceSupport.iTypeface.iName.Length()); + result.append(familyName); + } + lock.relock(); + return result; +} + QFileInfoList alternativeFilePaths(const QString &path, const QStringList &nameFilters, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::NoSort, bool uniqueFileNames = true) |