Merge lp:~fboucault/ubuntu-ui-toolkit/revert_658_fixes_crash into lp:ubuntu-ui-toolkit

Proposed by Florian Boucault
Status: Merged
Approved by: MichaƂ Sawicz
Approved revision: 660
Merged at revision: 661
Proposed branch: lp:~fboucault/ubuntu-ui-toolkit/revert_658_fixes_crash
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 79 lines (+0/-36)
3 files modified
modules/Ubuntu/Components/OrientationHelper.qml (+0/-8)
modules/Ubuntu/Components/plugin/plugin.cpp (+0/-22)
modules/Ubuntu/Components/plugin/plugin.h (+0/-6)
To merge this branch: bzr merge lp:~fboucault/ubuntu-ui-toolkit/revert_658_fixes_crash
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Pending
Review via email: mp+177254@code.launchpad.net

Commit message

Reverted revision 658 introducing reporting of content orientation. Was causing crashes on x86.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'modules/Ubuntu/Components/OrientationHelper.qml'
--- modules/Ubuntu/Components/OrientationHelper.qml 2013-07-24 18:16:10 +0000
+++ modules/Ubuntu/Components/OrientationHelper.qml 2013-07-27 12:15:31 +0000
@@ -91,14 +91,6 @@
9191
92 Component.onCompleted: orientationTransition.enabled = transitionEnabled92 Component.onCompleted: orientationTransition.enabled = transitionEnabled
9393
94 /*!
95 \internal
96
97 Report the current orientation of the application via QWindow::contentOrientation.
98 http://qt-project.org/doc/qt-5.0/qtgui/qwindow.html#contentOrientation-prop
99 */
100 onOrientationAngleChanged: window.contentOrientation = Screen.orientation
101
102 Item {94 Item {
103 id: stateWrapper95 id: stateWrapper
10496
10597
=== modified file 'modules/Ubuntu/Components/plugin/plugin.cpp'
--- modules/Ubuntu/Components/plugin/plugin.cpp 2013-07-26 11:33:12 +0000
+++ modules/Ubuntu/Components/plugin/plugin.cpp 2013-07-27 12:15:31 +0000
@@ -100,26 +100,6 @@
100 }100 }
101}101}
102102
103void UbuntuComponentsPlugin::registerWindowContextProperty()
104{
105 setWindowContextProperty(QGuiApplication::focusWindow());
106
107 // listen to QGuiApplication::focusWindowChanged
108 QGuiApplication* application = static_cast<QGuiApplication*>(QCoreApplication::instance());
109 QObject::connect(application, SIGNAL(focusWindowChanged(QWindow*)),
110 this, SLOT(setWindowContextProperty(QWindow*)));
111
112}
113
114void UbuntuComponentsPlugin::setWindowContextProperty(QWindow* focusWindow)
115{
116 QQuickView* view = qobject_cast<QQuickView*>(focusWindow);
117
118 if (view != NULL) {
119 view->rootContext()->setContextProperty("window", view);
120 }
121}
122
123void UbuntuComponentsPlugin::registerTypes(const char *uri)103void UbuntuComponentsPlugin::registerTypes(const char *uri)
124{104{
125 Q_ASSERT(uri == QLatin1String("Ubuntu.Components"));105 Q_ASSERT(uri == QLatin1String("Ubuntu.Components"));
@@ -184,6 +164,4 @@
184 Qt::LandscapeOrientation |164 Qt::LandscapeOrientation |
185 Qt::InvertedPortraitOrientation |165 Qt::InvertedPortraitOrientation |
186 Qt::InvertedLandscapeOrientation);166 Qt::InvertedLandscapeOrientation);
187
188 registerWindowContextProperty();
189}167}
190168
=== modified file 'modules/Ubuntu/Components/plugin/plugin.h'
--- modules/Ubuntu/Components/plugin/plugin.h 2013-07-26 11:32:55 +0000
+++ modules/Ubuntu/Components/plugin/plugin.h 2013-07-27 12:15:31 +0000
@@ -22,8 +22,6 @@
22#include <QtQml/QQmlEngine>22#include <QtQml/QQmlEngine>
23#include <QtQml/QQmlExtensionPlugin>23#include <QtQml/QQmlExtensionPlugin>
2424
25class QWindow;
26
27class UbuntuComponentsPlugin : public QQmlExtensionPlugin25class UbuntuComponentsPlugin : public QQmlExtensionPlugin
28{26{
29 Q_OBJECT27 Q_OBJECT
@@ -34,10 +32,6 @@
34 void initializeEngine(QQmlEngine *engine, const char *uri);32 void initializeEngine(QQmlEngine *engine, const char *uri);
35 QUrl baseUrl(QStringList importPathList, const char* uri);33 QUrl baseUrl(QStringList importPathList, const char* uri);
36 void registerQmlSingletonType(QQmlEngine *engine, const char* uri, const char* typeName, const char* qmlFile);34 void registerQmlSingletonType(QQmlEngine *engine, const char* uri, const char* typeName, const char* qmlFile);
37
38private Q_SLOTS:
39 void registerWindowContextProperty();
40 void setWindowContextProperty(QWindow* focusWindow);
41};35};
42#endif // UBUNTU_COMPONENTS_PLUGIN_H36#endif // UBUNTU_COMPONENTS_PLUGIN_H
4337

Subscribers

People subscribed via source and target branches

to status/vote changes: