summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-04-15 15:52:34 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-04-15 15:52:34 (GMT)
commit5769a3bf3c14b08e83ee785a7877be0fd6a37376 (patch)
treefaf0273e1f0a9ddc31de9cfea9ce7cfce15108a6
parentdd14d7d1fb0327c702e548db794acca65628ac54 (diff)
downloadQt-5769a3bf3c14b08e83ee785a7877be0fd6a37376.zip
Qt-5769a3bf3c14b08e83ee785a7877be0fd6a37376.tar.gz
Qt-5769a3bf3c14b08e83ee785a7877be0fd6a37376.tar.bz2
Add platformNativeInterface assessor to QApplication
-rw-r--r--src/gui/kernel/qapplication.h6
-rw-r--r--src/gui/kernel/qapplication_qpa.cpp6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index aa62518..fb61d36 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -79,6 +79,8 @@ template <typename T> class QList;
class QLocale;
#if defined(Q_WS_QWS)
class QDecoration;
+#elif defined(Q_WS_QPA)
+class QPlatformNativeInterface;
#endif
#if defined(Q_OS_SYMBIAN)
class QSymbianEvent;
@@ -254,6 +256,10 @@ public:
#endif
#endif
+#if defined(Q_WS_QPA)
+ static QPlatformNativeInterface *platformNativeInterface();
+#endif
+
#if defined(Q_WS_WIN)
void winFocus(QWidget *, bool);
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp
index 1d4400a..b754cf7 100644
--- a/src/gui/kernel/qapplication_qpa.cpp
+++ b/src/gui/kernel/qapplication_qpa.cpp
@@ -444,6 +444,12 @@ void QApplication::alert(QWidget *, int)
{
}
+QPlatformNativeInterface *QApplication::platformNativeInterface()
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ return pi->nativeInterface();
+}
+
static void init_platform(const QString &name, const QString &platformPluginPath)
{
QApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, platformPluginPath);