summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-09-10 13:27:31 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-09-10 13:27:31 (GMT)
commit0bf1b83cd7d972a69388cdbd759dbba8b1baffd2 (patch)
treed02066b60d9c47a9405c2385d08b64334825a28f /src
parent41243160f7a9fb5e2eea365ec9757f5496d0387f (diff)
downloadQt-0bf1b83cd7d972a69388cdbd759dbba8b1baffd2.zip
Qt-0bf1b83cd7d972a69388cdbd759dbba8b1baffd2.tar.gz
Qt-0bf1b83cd7d972a69388cdbd759dbba8b1baffd2.tar.bz2
Lighthouse: Adding QGenericUnixFontDatabase to OpenKODE
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/openkode/openkode.pro2
-rw-r--r--src/plugins/platforms/openkode/qopenkodeintegration.cpp10
-rw-r--r--src/plugins/platforms/openkode/qopenkodeintegration.h4
3 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/platforms/openkode/openkode.pro b/src/plugins/platforms/openkode/openkode.pro
index 5f2c1cc..c8ae415 100644
--- a/src/plugins/platforms/openkode/openkode.pro
+++ b/src/plugins/platforms/openkode/openkode.pro
@@ -19,6 +19,8 @@ HEADERS = qopenkodeintegration.h \
qopenkodeeventloopintegration.h \
openkodekeytranslator.h
+include (../fontdatabases/genericunix/genericunix.pri)
+
RESOURCES = resources.qrc
target.path += $$[QT_INSTALL_PLUGINS]/platforms
diff --git a/src/plugins/platforms/openkode/qopenkodeintegration.cpp b/src/plugins/platforms/openkode/qopenkodeintegration.cpp
index f8b715f..0c29a33 100644
--- a/src/plugins/platforms/openkode/qopenkodeintegration.cpp
+++ b/src/plugins/platforms/openkode/qopenkodeintegration.cpp
@@ -52,6 +52,8 @@
#include <QtCore/qthread.h>
#include <QtCore/qfile.h>
+#include "qgenericunixfontdatabase.h"
+
#include <KD/kd.h>
#include <KD/NV_display.h>
#include <KD/NV_initialize.h>
@@ -120,7 +122,7 @@ QOpenKODEScreen::QOpenKODEScreen(KDDisplayNV *kdDisplay, KDDesktopNV *kdDesktop
}
QOpenKODEIntegration::QOpenKODEIntegration()
- : mEventLoopIntegration(0)
+ : mEventLoopIntegration(0), mFontDb(new QGenericUnixFontDatabase())
{
if (kdInitializeNV() == KD_ENOTINITIALIZED) {
qFatal("Did not manage to initialize openkode");
@@ -180,6 +182,7 @@ QOpenKODEIntegration::QOpenKODEIntegration()
QOpenKODEIntegration::~QOpenKODEIntegration()
{
delete mEventLoopIntegration;
+ delete mFontDb;
}
QPixmapData *QOpenKODEIntegration::createPixmapData(QPixmapData::PixelType type) const
@@ -228,5 +231,10 @@ QPlatformEventLoopIntegration *QOpenKODEIntegration::createEventLoopIntegration(
return mEventLoopIntegration;
}
+QPlatformFontDatabase *QOpenKODEIntegration::fontDatabase() const
+{
+ return mFontDb;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/openkode/qopenkodeintegration.h b/src/plugins/platforms/openkode/qopenkodeintegration.h
index 939cae3..907b7e2 100644
--- a/src/plugins/platforms/openkode/qopenkodeintegration.h
+++ b/src/plugins/platforms/openkode/qopenkodeintegration.h
@@ -49,6 +49,7 @@
#include <QtGui/QPlatformIntegration>
#include <QtGui/QPlatformScreen>
#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformFontDatabase>
#include <GLES2/gl2.h>
#include <EGL/egl.h>
@@ -97,6 +98,8 @@ public:
QPlatformEventLoopIntegration *createEventLoopIntegration() const;
+ QPlatformFontDatabase *fontDatabase() const;
+
virtual QList<QPlatformScreen *> screens() const { return mScreens; }
static GLuint blitterProgram();
@@ -104,6 +107,7 @@ public:
private:
QList<QPlatformScreen *> mScreens;
QOpenKODEEventLoopIntegration *mEventLoopIntegration;
+ QPlatformFontDatabase *mFontDb;
};
QT_END_NAMESPACE