DirectFB Add QGenericUnixServices and inputContext

The DirectFB platform plugin was missing support for services and
inputContext.

Change-Id: I010fdcbed5e172b019b4dce79f3beea0f9c5025d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
bb10
Andy Nichols 2014-08-18 13:26:18 +02:00
parent 30bb830fc1
commit e3ef095469
2 changed files with 14 additions and 0 deletions

View File

@ -48,6 +48,7 @@
#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtPlatformSupport/private/qgenericunixservices_p.h>
#include <QtGui/private/qpixmap_blitter_p.h>
#include <QtGui/private/qpixmap_raster_p.h>
@ -56,11 +57,13 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QThread>
#include <QtCore/QAbstractEventDispatcher>
#include <qpa/qplatforminputcontextfactory_p.h>
QT_BEGIN_NAMESPACE
QDirectFbIntegration::QDirectFbIntegration()
: m_fontDb(new QGenericUnixFontDatabase())
, m_services(new QGenericUnixServices)
{
}
@ -69,6 +72,8 @@ void QDirectFbIntegration::connectToDirectFb()
initializeDirectFB();
initializeScreen();
initializeInput();
m_inputContext = QPlatformInputContextFactory::create();
}
bool QDirectFbIntegration::hasCapability(Capability cap) const
@ -155,4 +160,9 @@ QPlatformFontDatabase *QDirectFbIntegration::fontDatabase() const
return m_fontDb.data();
}
QPlatformServices *QDirectFbIntegration::services() const
{
return m_services.data();
}
QT_END_NAMESPACE

View File

@ -69,6 +69,8 @@ public:
QAbstractEventDispatcher *createEventDispatcher() const;
QPlatformFontDatabase *fontDatabase() const;
QPlatformServices *services() const;
QPlatformInputContext *inputContext() const { return m_inputContext; }
protected:
virtual void initializeDirectFB();
@ -81,6 +83,8 @@ protected:
QScopedPointer<QDirectFbInput> m_input;
QScopedPointer<QThread> m_inputRunner;
QScopedPointer<QPlatformFontDatabase> m_fontDb;
QScopedPointer<QPlatformServices> m_services;
QPlatformInputContext *m_inputContext;
};