summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-10-07 06:29:21 (GMT)
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-10-07 06:29:21 (GMT)
commit9cde8061eb5684285d086a03f0ee8de06f24c7e0 (patch)
tree9d182ec21381c3056ea7174328427c4c32a02e06 /src/plugins/platforms
parent33cdcafb24f21278d2ab34fa04cbf82ba57fa2aa (diff)
parentfb70a0a603baeae3cf6078aa92bb7a2a961d8c1f (diff)
downloadQt-9cde8061eb5684285d086a03f0ee8de06f24c7e0.zip
Qt-9cde8061eb5684285d086a03f0ee8de06f24c7e0.tar.gz
Qt-9cde8061eb5684285d086a03f0ee8de06f24c7e0.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-lighthouse
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.cpp2
-rw-r--r--src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp10
-rw-r--r--src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h4
-rw-r--r--src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp11
-rw-r--r--src/plugins/platforms/platforms.pro17
5 files changed, 18 insertions, 26 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
index 64b98db..1b3e035 100644
--- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
@@ -71,7 +71,7 @@ QDirectFbScreen::QDirectFbScreen(int display)
m_geometry = QRect(0,0,config.width,config.height);
const int dpi = 72;
const qreal inch = 25.4;
- m_depth = 32;
+ m_depth = QDirectFbConvenience::colorDepthForSurface(config.pixelformat);
m_physicalSize = QSize(qRound(config.width * inch / dpi), qRound(config.height *inch / dpi));
cursor = new QDirectFBCursor(this);
diff --git a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp b/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp
index 5b8ca63..5b6f69a 100644
--- a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp
+++ b/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp
@@ -204,9 +204,9 @@ QStringList QBasicUnixFontDatabase::fallbacksForFamily(const QString family, con
return QStringList();
}
-void QBasicUnixFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
+QStringList QBasicUnixFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
{
- addTTFile(fontData,fileName.toLocal8Bit());
+ return addTTFile(fontData,fileName.toLocal8Bit());
}
void QBasicUnixFontDatabase::releaseHandle(void *handle)
@@ -215,13 +215,14 @@ void QBasicUnixFontDatabase::releaseHandle(void *handle)
delete file;
}
-void QBasicUnixFontDatabase::addTTFile(const QByteArray &fontData, const QByteArray &file)
+QStringList QBasicUnixFontDatabase::addTTFile(const QByteArray &fontData, const QByteArray &file)
{
extern FT_Library qt_getFreetype();
FT_Library library = qt_getFreetype();
int index = 0;
int numFaces = 0;
+ QStringList families;
do {
FT_Face face;
FT_Error error;
@@ -275,7 +276,10 @@ void QBasicUnixFontDatabase::addTTFile(const QByteArray &fontData, const QByteAr
registerFont(family,"",weight,style,100,true,true,0,writingSystems,fontFile);
+ families.append(family);
+
FT_Done_Face(face);
++index;
} while (index < numFaces);
+ return families;
}
diff --git a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h b/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h
index 401a4aa..95015df 100644
--- a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h
+++ b/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h
@@ -17,10 +17,10 @@ public:
void populateFontDatabase();
QFontEngine *fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle);
QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QUnicodeTables::Script &script) const;
- void addApplicationFont(const QByteArray &fontData, const QString &fileName);
+ QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName);
void releaseHandle(void *handle);
- static void addTTFile(const QByteArray &fontData, const QByteArray &file);
+ static QStringList addTTFile(const QByteArray &fontData, const QByteArray &file);
};
#endif // QBASICUNIXFONTDATABASE_H
diff --git a/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 562cb2d..85515ed 100644
--- a/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -392,10 +392,13 @@ void QFontconfigDatabase::populateFontDatabase()
++f;
}
- const FcDefaultFont *s = defaults;
- QFont font("Sans Serif");
- font.setPointSize(9);
- QApplication::setFont(font);
+ //Lighthouse has very lazy population of the font db. We want it to be initialized when
+ //QApplication is constructed, so that the population procedure can do something like this to
+ //set the default font
+// const FcDefaultFont *s = defaults;
+// QFont font("Sans Serif");
+// font.setPointSize(9);
+// QApplication::setFont(font);
}
QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, QUnicodeTables::Script script, void *usrPtr)
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
index 3446e81..26ccd44 100644
--- a/src/plugins/platforms/platforms.pro
+++ b/src/plugins/platforms/platforms.pro
@@ -1,19 +1,4 @@
TEMPLATE = subdirs
-contains(QT_CONFIG, openvg):contains(QT_CONFIG, egl) {
- SUBDIRS += openvglite
-}
- SUBDIRS += minimal
+SUBDIRS += minimal
-contains(QT_CONFIG, mitshm) {
- SUBDIRS += testlite
-}
-
-linux {
- SUBDIRS += linuxfb
-}
-
-unix {
- SUBDIRS += vnc \
- qvfb
-}