diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-13 18:04:17 +0200 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-13 18:04:17 +0200 |
commit | f7837e28b5f83d116fa43d0401b7188ce27fc346 (patch) | |
tree | 3de2560e4259f22224f334be17618386860decc7 /src/plugins/platforms/qnx | |
parent | 8b0624182bd4998d32c23eded5dbe6dccfd26d5b (diff) | |
parent | 44a58de2aea6d2ac71efe7261a398effbf139f3f (diff) |
Merge branch 'stable' into dev
Conflicts:
src/concurrent/qtconcurrentmedian.h
src/corelib/itemmodels/qabstractitemmodel.cpp
Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnativeinterface.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnativeinterface.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.cpp | 5 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.h | 4 |
4 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp index e147ca72e5..4dd3444832 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp @@ -62,4 +62,12 @@ void *QQnxNativeInterface::nativeResourceForWindow(const QByteArray &resource, Q return 0; } +void *QQnxNativeInterface::nativeResourceForScreen(const QByteArray &resource, QScreen *screen) +{ + if (resource == "QObject*" && screen) + return static_cast<QObject*>(static_cast<QQnxScreen*>(screen->handle())); + + return 0; +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.h b/src/plugins/platforms/qnx/qqnxnativeinterface.h index d84df205e5..6692da2576 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.h +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.h @@ -50,6 +50,7 @@ class QQnxNativeInterface : public QPlatformNativeInterface { public: void *nativeResourceForWindow(const QByteArray &resource, QWindow *window); + void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen); }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index d940b35861..69e672aefc 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -573,8 +573,10 @@ void QQnxScreen::addUnderlayWindow(screen_window_t window) void QQnxScreen::removeOverlayOrUnderlayWindow(screen_window_t window) { const int numRemoved = m_overlays.removeAll(window) + m_underlays.removeAll(window); - if (numRemoved > 0) + if (numRemoved > 0) { updateHierarchy(); + Q_EMIT foreignWindowClosed(window); + } } void QQnxScreen::newWindowCreated(void *window) @@ -608,6 +610,7 @@ void QQnxScreen::newWindowCreated(void *window) addUnderlayWindow(windowHandle); else addOverlayWindow(windowHandle); + Q_EMIT foreignWindowCreated(windowHandle); } } } diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h index e498d27c14..fd97e2e58f 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.h +++ b/src/plugins/platforms/qnx/qqnxscreen.h @@ -98,6 +98,10 @@ public: QPlatformCursor *cursor() const; +Q_SIGNALS: + void foreignWindowCreated(void *window); + void foreignWindowClosed(void *window); + public Q_SLOTS: void setRotation(int rotation); void newWindowCreated(void *window); |