diff options
author | Stanislav Ionascu <stanislav.ionascu@nokia.com> | 2010-12-24 10:28:31 +0200 |
---|---|---|
committer | Stanislav Ionascu <stanislav.ionascu@nokia.com> | 2010-12-24 10:28:31 +0200 |
commit | 285172f4820db85bed325407723838e4f4328615 (patch) | |
tree | 9f9742abec2c08c001ad9f861b4f511d39bb75f5 | |
parent | 3d00f9aa41f8e8ab3ec69aabae7777fa77ca9b37 (diff) |
Changes: Fixes build break without context subscriber.
RevBy: TrustMe.
Details: Build break was introduced in 56ae58cece20edf526036567129e5b09433c47de.
-rw-r--r-- | src/corelib/events/mkeyboardstatetracker.cpp | 4 | ||||
-rw-r--r-- | src/corelib/widgets/mwindow.cpp | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/events/mkeyboardstatetracker.cpp b/src/corelib/events/mkeyboardstatetracker.cpp index 4cd784ab..7a8dd523 100644 --- a/src/corelib/events/mkeyboardstatetracker.cpp +++ b/src/corelib/events/mkeyboardstatetracker.cpp @@ -60,12 +60,16 @@ void MKeyboardStateTrackerPrivate::initContextSubscriber() void MKeyboardStateTrackerPrivate::subscribe() { +#ifdef HAVE_CONTEXTSUBSCRIBER keyboardOpenProperty.subscribe(); +#endif } void MKeyboardStateTrackerPrivate::unsubscribe() { +#ifdef HAVE_CONTEXTSUBSCRIBER keyboardOpenProperty.unsubscribe(); +#endif } MKeyboardStateTracker::MKeyboardStateTracker() : diff --git a/src/corelib/widgets/mwindow.cpp b/src/corelib/widgets/mwindow.cpp index a87ca7bc..22164b8c 100644 --- a/src/corelib/widgets/mwindow.cpp +++ b/src/corelib/widgets/mwindow.cpp @@ -605,9 +605,10 @@ void MWindowPrivate::ensureOrientationAngleIsUpToDateBeforeShowing() if (!q->isVisible() && !q->isOrientationAngleLocked() && MOrientationTracker::instance()->orientationAngle() != q->orientationAngle()) { +#ifdef HAVE_CONTEXTSUBSCRIBER // We are about to be shown but our orientation angle is outdated. - MOrientationTracker::instance()->d_ptr->subscribeToSensorProperies(); +#endif MOnDisplayChangeEvent ev(true, QRectF(QPointF(0, 0), q->visibleSceneSize())); MApplication::instance()->sendEvent(q, &ev); @@ -1269,9 +1270,11 @@ void MWindow::paintEvent(QPaintEvent *event) bool MWindow::event(QEvent *event) { Q_D(MWindow); +#ifdef HAVE_CONTEXTSUBSCRIBER if(event->type() == QEvent::Show) { MOrientationTracker::instance()->d_func()->waitForSensorPropertiesToSubscribe(); } +#endif if ((event->type() == QEvent::Show && !isMinimized()) || event->type() == QEvent::WindowActivate) { MComponentData::setActiveWindow(this); |