diff options
author | Kevin Krammer <kevin.krammer.qnx@kdab.com> | 2012-04-03 10:34:42 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-04 12:51:35 (GMT) |
commit | d4858c581eaf23c57577dc7e12b48f392ed0463f (patch) | |
tree | 2e759019f4cd45bed705c5e1397baea40560e5fe /src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp | |
parent | cd626dad3e92475c2a8f6a894046a14c95711d50 (diff) | |
download | Qt-d4858c581eaf23c57577dc7e12b48f392ed0463f.zip Qt-d4858c581eaf23c57577dc7e12b48f392ed0463f.tar.gz Qt-d4858c581eaf23c57577dc7e12b48f392ed0463f.tar.bz2 |
Move handling of rotation changes from event handler to screen
Have the navigator event handler emit the new rotation as a signal argument
and let the screen class handle all parts of the change, i.e. also notifying
the window system about the geometry change.
This also allows to rotate all screens, not just the primary screen, if this
should be necessary.
Backport of 45b7b0599cd1ebdfe17487215b36ff766068f0e8
Change-Id: Ia3e3ff321bc2d7a23e64950d15d88d007f9766dd
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp')
-rw-r--r-- | src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp b/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp index 877e91c..bac680a 100644 --- a/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp +++ b/src/plugins/platforms/blackberry/qbbnavigatoreventhandler.cpp @@ -41,7 +41,6 @@ #include "qbbnavigatoreventhandler.h" -#include "qbbscreen.h" #include <QtCore/private/qcore_unix_p.h> #include <QtGui/QApplication> @@ -61,8 +60,8 @@ #define NAV_CONTROL_PATH "/pps/services/navigator/control" #define PPS_BUFFER_SIZE 4096 -QBBNavigatorEventHandler::QBBNavigatorEventHandler(QBBScreen& primaryScreen) - : mPrimaryScreen(primaryScreen), +QBBNavigatorEventHandler::QBBNavigatorEventHandler(QObject *parent) + : QObject(parent), mFd(-1), mReadNotifier(0) { @@ -201,8 +200,7 @@ void QBBNavigatorEventHandler::handleMessage(const QByteArray &msg, const QByteA #if defined(QBBNAVIGATOREVENTHANDLER_DEBUG) qDebug() << "PPS: orientation, o=" << dat; #endif - mPrimaryScreen.setRotation( dat.toInt() ); - QWindowSystemInterface::handleScreenGeometryChange(0); + emit rotationChanged(dat.toInt()); replyPPS(msg, id, ""); } else if (msg == "SWIPE_DOWN") { |