DirectFB Provide a native interface

Using the same multiple inheiritance that is used in the EGLFS platform
plugin.

Change-Id: I016f904bfc365bec6266c3f5d638ab15ecefe63b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
bb10
Andy Nichols 2014-08-20 14:15:12 +02:00
parent e3ef095469
commit 8917d0be00
2 changed files with 8 additions and 2 deletions

View File

@ -165,4 +165,9 @@ QPlatformServices *QDirectFbIntegration::services() const
return m_services.data();
}
QPlatformNativeInterface *QDirectFbIntegration::nativeInterface() const
{
return const_cast<QDirectFbIntegration *>(this);
}
QT_END_NAMESPACE

View File

@ -46,6 +46,7 @@
#include "qdirectfbscreen.h"
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformnativeinterface.h>
#include <directfb.h>
#include <directfb_version.h>
@ -54,7 +55,7 @@ QT_BEGIN_NAMESPACE
class QThread;
class QAbstractEventDispatcher;
class QDirectFbIntegration : public QPlatformIntegration
class QDirectFbIntegration : public QPlatformIntegration, public QPlatformNativeInterface
{
public:
QDirectFbIntegration();
@ -71,6 +72,7 @@ public:
QPlatformFontDatabase *fontDatabase() const;
QPlatformServices *services() const;
QPlatformInputContext *inputContext() const { return m_inputContext; }
QPlatformNativeInterface *nativeInterface() const;
protected:
virtual void initializeDirectFB();
@ -85,7 +87,6 @@ protected:
QScopedPointer<QPlatformFontDatabase> m_fontDb;
QScopedPointer<QPlatformServices> m_services;
QPlatformInputContext *m_inputContext;
};
QT_END_NAMESPACE