aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarosław <jaroslaw.jaryszew@teleca.com>2011-01-04 14:36:09 +0100
committerAdrian Yanes <ext-adrian.yanes@nokia.com>2011-01-13 13:19:49 +0200
commitbb116f49f44dcc438ee58eb2a87f180b45dfd76e (patch)
treea5315de473a4fe4977dc6e4291451d95917d925e
parent7755f5393d78a41778fa37ee52484bd02159e1b6 (diff)
Fixes: NB#217676 - Unableto open picture from search results.
-rwxr-xr-xconfigure2
-rw-r--r--debian/control4
-rw-r--r--src/corelib/events/mkeyboardstatetracker.cpp4
-rw-r--r--src/corelib/events/morientationtracker.cpp10
-rw-r--r--src/corelib/widgets/mwindow.cpp11
-rw-r--r--tests/ut_morientationtracker/ut_morientationtracker.cpp8
6 files changed, 16 insertions, 23 deletions
diff --git a/configure b/configure
index 8dee1fce..3abcddac 100755
--- a/configure
+++ b/configure
@@ -389,7 +389,7 @@ fi
which pkg-config > /dev/null
if [ $? -eq 0 ]; then
- pkg-config --exists contextsubscriber-1.0
+ pkg-config --atleast-version=0.5.25 contextsubscriber-1.0
if [ $? -eq 0 ]; then
HAVE_CONTEXTSUBSCRIBER=yes
fi
diff --git a/debian/control b/debian/control
index fa6daec1..855bae71 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: libmeegotouch
Section: libs
Priority: extra
Maintainer: Tomas Junnonen <tomas.junnonen@nokia.com>
-Build-Depends: debhelper (>= 5), libqt4-dev (>= 4.7.0~git20100716-0maemo1+0m6), libicu-dev, libx11-dev, doxygen (>=1.5.9), libgconf2-dev, libcontextsubscriber-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgles2-sgx-img-dev [arm armel], opengles-sgx-img-common-dev [arm armel], libgl-dev [i386], libgl1 [i386], libqt4-opengl-dev, pkg-config (>= 0.22), libxdamage-dev, xsltproc, libqtm-serviceframework-dev
+Build-Depends: debhelper (>= 5), libqt4-dev (>= 4.7.0~git20100716-0maemo1+0m6), libicu-dev, libx11-dev, doxygen (>=1.5.9), libgconf2-dev, libcontextsubscriber-dev (>= 0.5.25), libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgles2-sgx-img-dev [arm armel], opengles-sgx-img-common-dev [arm armel], libgl-dev [i386], libgl1 [i386], libqt4-opengl-dev, pkg-config (>= 0.22), libxdamage-dev, xsltproc, libqtm-serviceframework-dev
Standards-Version: 3.7.2
Package: libmeegotouchcore0
@@ -81,7 +81,7 @@ Description: libmeegotouch debug package
Package: libmeegotouch-dev
Section: devel
Architecture: any
-Depends: libmeegotouchcore0 (= ${Source-Version}), libmeegotouchextensions0 (= ${Source-Version}), libmeegotouchsettings0 (= ${Source-Version}), libmeegotouchviews0 (= ${Source-Version}), meegotouch-dev-tools (=${Source-Version}), libqt4-dev (>= 4.6.0), libx11-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgconf2-dev, libcontextsubscriber-dev, libxdamage-dev
+Depends: libmeegotouchcore0 (= ${Source-Version}), libmeegotouchextensions0 (= ${Source-Version}), libmeegotouchsettings0 (= ${Source-Version}), libmeegotouchviews0 (= ${Source-Version}), meegotouch-dev-tools (=${Source-Version}), libqt4-dev (>= 4.6.0), libx11-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgconf2-dev, libcontextsubscriber-dev (>= 0.5.25), libxdamage-dev
Description: MeeGo Touch development files
Development files for MeeGo Touch
diff --git a/src/corelib/events/mkeyboardstatetracker.cpp b/src/corelib/events/mkeyboardstatetracker.cpp
index 7a8dd523..6ea7676e 100644
--- a/src/corelib/events/mkeyboardstatetracker.cpp
+++ b/src/corelib/events/mkeyboardstatetracker.cpp
@@ -44,13 +44,15 @@ MKeyboardStateTrackerPrivate::MKeyboardStateTrackerPrivate(MKeyboardStateTracker
QObject::connect(&keyboardOpenConf, SIGNAL(valueChanged()),
q, SIGNAL(stateChanged()));
#endif
+
+ initContextSubscriber();
}
void MKeyboardStateTrackerPrivate::initContextSubscriber()
{
#ifdef HAVE_CONTEXTSUBSCRIBER
//waiting for properties to synchronize
- keyboardOpenProperty.waitForSubscription();
+ keyboardOpenProperty.waitForSubscription(true);
// TODO: use actual ContextProperty for present, which is still unready.
present = true;
#elif defined(M_OS_MAEMO5)
diff --git a/src/corelib/events/morientationtracker.cpp b/src/corelib/events/morientationtracker.cpp
index ade3fe2a..3a714530 100644
--- a/src/corelib/events/morientationtracker.cpp
+++ b/src/corelib/events/morientationtracker.cpp
@@ -88,6 +88,7 @@ MOrientationTrackerPrivate::MOrientationTrackerPrivate(MOrientationTracker *cont
connect(MKeyboardStateTracker::instance(), SIGNAL(stateChanged()),
this, SLOT(updateOrientationAngle()));
+ waitForSensorPropertiesToSubscribe();
#endif //HAVE_CONTEXTSUBSCRIBER
isCoveredChanged();
@@ -338,11 +339,10 @@ void MOrientationTrackerPrivate::unsubscribeToSensorProperties()
void MOrientationTrackerPrivate::waitForSensorPropertiesToSubscribe()
{
- topEdgeProperty->waitForSubscription();
- isCoveredProperty->waitForSubscription();
- videoRouteProperty->waitForSubscription();
- isFlatProperty->waitForSubscription();
- MKeyboardStateTracker::instance()->d_ptr->initContextSubscriber();
+ topEdgeProperty->waitForSubscription(true);
+ isCoveredProperty->waitForSubscription(true);
+ videoRouteProperty->waitForSubscription(true);
+ isFlatProperty->waitForSubscription(true);
isSubscribed = true;
hasJustSubscribed = true;
}
diff --git a/src/corelib/widgets/mwindow.cpp b/src/corelib/widgets/mwindow.cpp
index f1364e17..f6cc299b 100644
--- a/src/corelib/widgets/mwindow.cpp
+++ b/src/corelib/widgets/mwindow.cpp
@@ -111,9 +111,7 @@ MWindowPrivate::MWindowPrivate() :
if (window)
angle = window->orientationAngle();
else
- //only create instance of orientation tracker at the moment
- MOrientationTracker::instance();
-
+ angle = MOrientationTracker::instance()->orientationAngle();
timeSinceLastPaintInSwitcher.invalidate();
}
@@ -608,7 +606,7 @@ void MWindowPrivate::ensureOrientationAngleIsUpToDateBeforeShowing()
#ifdef HAVE_CONTEXTSUBSCRIBER
// We are about to be shown but our orientation angle is outdated.
- MOrientationTracker::instance()->d_ptr->subscribeToSensorProperies();
+ MOrientationTracker::instance()->d_ptr->updateOrientationAngle();
#endif
MOnDisplayChangeEvent ev(true, QRectF(QPointF(0, 0), q->visibleSceneSize()));
@@ -1271,11 +1269,6 @@ 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);
diff --git a/tests/ut_morientationtracker/ut_morientationtracker.cpp b/tests/ut_morientationtracker/ut_morientationtracker.cpp
index e88f212c..f0435861 100644
--- a/tests/ut_morientationtracker/ut_morientationtracker.cpp
+++ b/tests/ut_morientationtracker/ut_morientationtracker.cpp
@@ -49,9 +49,7 @@ bool MDeviceProfile::orientationAngleIsSupported(M::OrientationAngle angle, bool
void Ut_MOrientationTracker::init()
{
window1 = new MWindow;
- window1->show();
window2 = new MWindow;
- window2->show();
}
void Ut_MOrientationTracker::cleanup()
@@ -329,13 +327,13 @@ void Ut_MOrientationTracker::testFollowCurrentWindow()
setAllAngles(&supportedAnglesStubLists[KeyboardOpen]);
setAllAngles(&supportedAnglesStubLists[KeyboardClosed]);
- //make window2 start following _MEEGOTOUCH_CURRENT_APP_WINDOW
- window2->setProperty("followsCurrentApplicationWindowOrientation", 1);
-
//create app window and set it as _MEEGOTOUCH_CURRENT_APP_WINDOW;
MApplicationWindow appWindow;
setCurrentWindowXPropertyOnRootWindow(appWindow.effectiveWinId());
+ //make window2 start following _MEEGOTOUCH_CURRENT_APP_WINDOW
+ window2->setProperty("followsCurrentApplicationWindowOrientation", 1);
+
//since there is no MApplication instance we have to run this handler manualy
mTracker->handleCurrentAppWindowChange();