Merge lp:~gerboland/qtubuntu/exposeOrientation into lp:qtubuntu
- exposeOrientation
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Daniel d'Andrada |
Approved revision: | 249 |
Merged at revision: | 243 |
Proposed branch: | lp:~gerboland/qtubuntu/exposeOrientation |
Merge into: | lp:qtubuntu |
Diff against target: |
323 lines (+120/-54) 7 files modified
debian/control (+1/-1) src/ubuntumirclient/input.cpp (+74/-0) src/ubuntumirclient/input.h (+1/-0) src/ubuntumirclient/orientationchangeevent_p.h (+36/-0) src/ubuntumirclient/screen.cpp (+7/-45) src/ubuntumirclient/screen.h (+0/-8) src/ubuntumirclient/ubuntumirclient.pro (+1/-0) |
To merge this branch: | bzr merge lp:~gerboland/qtubuntu/exposeOrientation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel d'Andrada (community) | Approve | ||
PS Jenkins bot | continuous-integration | Needs Fixing | |
Review via email: mp+232252@code.launchpad.net |
Commit message
Expose Mir surface orientation property instead of connecting to orientation sensor directly
Description of the change
- 244. By Gerry Boland
-
Depend on PAPI 2.2.1
- 245. By Gerry Boland
-
Alphabetize
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:245
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
Daniel d'Andrada (dandrader) wrote : | # |
In src/ubuntumircl
"""
LOG(
"""
Convert the enum value to a nice human-readable string, please.
""""
Qt:
switch (event-
case U_ORIENTATION_
orientation = Qt::PortraitOri
break;
case U_ORIENTATION_LEFT:
orientation = Qt::LandscapeOr
break;
case U_ORIENTATION_
orientation = Qt::InvertedPor
break;
case U_ORIENTATION_
orientation = Qt::InvertedLan
break;
default:
DLOG("No such orientation %d", event->
return;
}
// Dispatch orientation event to [Platform]Screen, as that is where Qt reads it. Screen will handle
// notifying Qt of the actual orientation change - done to prevent multiple Windows each creating
// an identical orientation change event and passing it directly to Qt.
// [Platform]Screen can also factor in the native orientation.
QCoreApplic
""""
Then please use the same nomenclature that the mir event uses in that internal OrientationChan
Gerry Boland (gerboland) wrote : | # |
> Then please use the same nomenclature that the mir event uses in that internal
> OrientationChan
> point, which is misleading. You could stick with the
> QOrientationRea
Can you explain your reasoning why this is misleading? We need to convert from Mir event nomenclature (normal,
Do I understand you want me to add an intermediary 3rd nomenclature, the QOrientationRea
- 246. By Gerry Boland
-
Add text description for a debug output
Daniel d'Andrada (dandrader) wrote : | # |
> > Then please use the same nomenclature that the mir event uses in that
> internal
> > OrientationChan
> this
> > point, which is misleading. You could stick with the
> > QOrientationRea
>
> Can you explain your reasoning why this is misleading? We need to convert from
> Mir event nomenclature (normal,
> (portrait, landscape, invertedlandscape, invertedportrait) somewhere, it
> struck me as a good idea to convert to Qt's definition as quickly as possible.
Because in UbuntuInput:
>
> Do I understand you want me to add an intermediary 3rd nomenclature, the
> QOrientationRea
> Mir->QOrientati
Yes. If I understood QOrientationReading correctly, it's a one-to-one mapping of the Mir enum.
But if you don't like that intermediate enum, then I'm fine if you store the Mir enum value in that internal QEvent as well. I just don't want the wrong conversion I mentioned above.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:246
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
Daniel d'Andrada (dandrader) wrote : | # |
"""
LOG("ORIENTATION direction: %d", nativeOrientati
"""
Should be '%s', not '%d'. Did it work at all like that?
- 247. By Gerry Boland
-
oops, %s not %d
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:247
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
- 248. By Gerry Boland
-
Use QOrientationRea
ding::Orientati on in the OrientationChan geEvent
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:248
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
Daniel d'Andrada (dandrader) wrote : | # |
In src/ubuntumircl
"""
- case QOrientationRea
+ case QOrientationRea
- Qt::InvertedPor
+ Qt::InvertedPor
"""
This is wrong. The original code had the correct conversion.
"""
- case QOrientationRea
+ case QOrientationRea
- Qt::PortraitOri
+ Qt::PortraitOri
"""
Same here.
See https:/
- 249. By Gerry Boland
-
Undo changes to mapping of OrientationRead
ing->ScreenOrie ntation, better the old way
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:249
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
Daniel d'Andrada (dandrader) wrote : | # |
Looking good.
- 250. By Gerry Boland
-
Dump dependency on papi to 2.4.0
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2014-07-09 17:17:05 +0000 | |||
3 | +++ debian/control 2014-09-19 12:18:46 +0000 | |||
4 | @@ -8,7 +8,7 @@ | |||
5 | 8 | libfreetype6-dev, | 8 | libfreetype6-dev, |
6 | 9 | libgles2-mesa-dev, | 9 | libgles2-mesa-dev, |
7 | 10 | libglib2.0-dev, | 10 | libglib2.0-dev, |
9 | 11 | libubuntu-application-api-dev (>= 2.2.0), | 11 | libubuntu-application-api-dev (>= 2.4.0), |
10 | 12 | libudev-dev, | 12 | libudev-dev, |
11 | 13 | libxrender-dev, | 13 | libxrender-dev, |
12 | 14 | libxkbcommon-dev, | 14 | libxkbcommon-dev, |
13 | 15 | 15 | ||
14 | === modified file 'src/ubuntumirclient/input.cpp' | |||
15 | --- src/ubuntumirclient/input.cpp 2014-08-14 09:45:04 +0000 | |||
16 | +++ src/ubuntumirclient/input.cpp 2014-09-19 12:18:46 +0000 | |||
17 | @@ -18,8 +18,10 @@ | |||
18 | 18 | #include "input.h" | 18 | #include "input.h" |
19 | 19 | #include "integration.h" | 19 | #include "integration.h" |
20 | 20 | #include "nativeinterface.h" | 20 | #include "nativeinterface.h" |
21 | 21 | #include "screen.h" | ||
22 | 21 | #include "window.h" | 22 | #include "window.h" |
23 | 22 | #include "logging.h" | 23 | #include "logging.h" |
24 | 24 | #include "orientationchangeevent_p.h" | ||
25 | 23 | 25 | ||
26 | 24 | // Qt | 26 | // Qt |
27 | 25 | #if !defined(QT_NO_DEBUG) | 27 | #if !defined(QT_NO_DEBUG) |
28 | @@ -36,6 +38,7 @@ | |||
29 | 36 | 38 | ||
30 | 37 | // Platform API | 39 | // Platform API |
31 | 38 | #include <ubuntu/application/ui/input/event.h> | 40 | #include <ubuntu/application/ui/input/event.h> |
32 | 41 | #include <ubuntu/application/ui/window_orientation.h> | ||
33 | 39 | 42 | ||
34 | 40 | #define LOG_EVENTS 0 | 43 | #define LOG_EVENTS 0 |
35 | 41 | 44 | ||
36 | @@ -174,6 +177,10 @@ | |||
37 | 174 | break; | 177 | break; |
38 | 175 | case SURFACE_WEVENT_TYPE: | 178 | case SURFACE_WEVENT_TYPE: |
39 | 176 | return "SURFACE_WEVENT_TYPE"; | 179 | return "SURFACE_WEVENT_TYPE"; |
40 | 180 | break; | ||
41 | 181 | case ORIENTATION_WEVENT_TYPE: | ||
42 | 182 | return "ORIENTATION_WEVENT_TYPE"; | ||
43 | 183 | break; | ||
44 | 177 | default: | 184 | default: |
45 | 178 | return "INVALID!"; | 185 | return "INVALID!"; |
46 | 179 | } | 186 | } |
47 | @@ -218,6 +225,9 @@ | |||
48 | 218 | ubuntuEvent->window->handleSurfaceFocusChange(nativeEvent->surface.value == 1); | 225 | ubuntuEvent->window->handleSurfaceFocusChange(nativeEvent->surface.value == 1); |
49 | 219 | } | 226 | } |
50 | 220 | break; | 227 | break; |
51 | 228 | case ORIENTATION_WEVENT_TYPE: | ||
52 | 229 | dispatchOrientationEvent(ubuntuEvent->window->window(), nativeEvent); | ||
53 | 230 | break; | ||
54 | 221 | default: | 231 | default: |
55 | 222 | DLOG("unhandled event type %d", nativeEvent->type); | 232 | DLOG("unhandled event type %d", nativeEvent->type); |
56 | 223 | } | 233 | } |
57 | @@ -408,3 +418,67 @@ | |||
58 | 408 | 418 | ||
59 | 409 | QWindowSystemInterface::handleKeyEvent(window, timestamp, keyType, sym, modifiers, text); | 419 | QWindowSystemInterface::handleKeyEvent(window, timestamp, keyType, sym, modifiers, text); |
60 | 410 | } | 420 | } |
61 | 421 | |||
62 | 422 | #if (LOG_EVENTS != 0) | ||
63 | 423 | static const char* nativeOrientationDirectionToStr(const int orientation) | ||
64 | 424 | { | ||
65 | 425 | switch (orientation) { | ||
66 | 426 | case U_ORIENTATION_NORMAL: | ||
67 | 427 | return "Normal"; | ||
68 | 428 | break; | ||
69 | 429 | case U_ORIENTATION_LEFT: | ||
70 | 430 | return "Left"; | ||
71 | 431 | break; | ||
72 | 432 | case U_ORIENTATION_INVERTED: | ||
73 | 433 | return "Inverted"; | ||
74 | 434 | break; | ||
75 | 435 | case U_ORIENTATION_RIGHT: | ||
76 | 436 | return "Right"; | ||
77 | 437 | break; | ||
78 | 438 | default: | ||
79 | 439 | return "INVALID!"; | ||
80 | 440 | } | ||
81 | 441 | } | ||
82 | 442 | #endif | ||
83 | 443 | |||
84 | 444 | void UbuntuInput::dispatchOrientationEvent(QWindow* window, const void* ev) | ||
85 | 445 | { | ||
86 | 446 | const WindowEvent* event = reinterpret_cast<const WindowEvent*>(ev); | ||
87 | 447 | |||
88 | 448 | #if (LOG_EVENTS != 0) | ||
89 | 449 | // Orientation event logging. | ||
90 | 450 | LOG("ORIENTATION direction: %s", nativeOrientationDirectionToStr(event->orientation.direction)); | ||
91 | 451 | #endif | ||
92 | 452 | |||
93 | 453 | if (!window->screen()) { | ||
94 | 454 | DLOG("Window has no associated screen, dropping orientation event"); | ||
95 | 455 | return; | ||
96 | 456 | } | ||
97 | 457 | |||
98 | 458 | QOrientationReading::Orientation orientation; | ||
99 | 459 | switch (event->orientation.direction) { | ||
100 | 460 | case U_ORIENTATION_NORMAL: | ||
101 | 461 | orientation = QOrientationReading::TopUp; | ||
102 | 462 | break; | ||
103 | 463 | case U_ORIENTATION_LEFT: | ||
104 | 464 | orientation = QOrientationReading::LeftUp; | ||
105 | 465 | break; | ||
106 | 466 | case U_ORIENTATION_INVERTED: | ||
107 | 467 | orientation = QOrientationReading::TopDown; | ||
108 | 468 | break; | ||
109 | 469 | case U_ORIENTATION_RIGHT: | ||
110 | 470 | orientation = QOrientationReading::RightUp; | ||
111 | 471 | break; | ||
112 | 472 | default: | ||
113 | 473 | DLOG("No such orientation %d", event->orientation.direction); | ||
114 | 474 | return; | ||
115 | 475 | } | ||
116 | 476 | |||
117 | 477 | // Dispatch orientation event to [Platform]Screen, as that is where Qt reads it. Screen will handle | ||
118 | 478 | // notifying Qt of the actual orientation change - done to prevent multiple Windows each creating | ||
119 | 479 | // an identical orientation change event and passing it directly to Qt. | ||
120 | 480 | // [Platform]Screen can also factor in the native orientation. | ||
121 | 481 | QCoreApplication::postEvent(static_cast<UbuntuScreen*>(window->screen()->handle()), | ||
122 | 482 | new OrientationChangeEvent(OrientationChangeEvent::mType, orientation)); | ||
123 | 483 | } | ||
124 | 484 | |||
125 | 411 | 485 | ||
126 | === modified file 'src/ubuntumirclient/input.h' | |||
127 | --- src/ubuntumirclient/input.h 2014-07-15 12:45:14 +0000 | |||
128 | +++ src/ubuntumirclient/input.h 2014-09-19 12:18:46 +0000 | |||
129 | @@ -40,6 +40,7 @@ | |||
130 | 40 | protected: | 40 | protected: |
131 | 41 | void dispatchKeyEvent(QWindow* window, const void* event); | 41 | void dispatchKeyEvent(QWindow* window, const void* event); |
132 | 42 | void dispatchMotionEvent(QWindow* window, const void* event); | 42 | void dispatchMotionEvent(QWindow* window, const void* event); |
133 | 43 | void dispatchOrientationEvent(QWindow* window, const void* event); | ||
134 | 43 | 44 | ||
135 | 44 | private: | 45 | private: |
136 | 45 | UbuntuClientIntegration* mIntegration; | 46 | UbuntuClientIntegration* mIntegration; |
137 | 46 | 47 | ||
138 | === added file 'src/ubuntumirclient/orientationchangeevent_p.h' | |||
139 | --- src/ubuntumirclient/orientationchangeevent_p.h 1970-01-01 00:00:00 +0000 | |||
140 | +++ src/ubuntumirclient/orientationchangeevent_p.h 2014-09-19 12:18:46 +0000 | |||
141 | @@ -0,0 +1,36 @@ | |||
142 | 1 | /* | ||
143 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
144 | 3 | * | ||
145 | 4 | * This program is free software: you can redistribute it and/or modify it under | ||
146 | 5 | * the terms of the GNU Lesser General Public License version 3, as published by | ||
147 | 6 | * the Free Software Foundation. | ||
148 | 7 | * | ||
149 | 8 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
150 | 9 | * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, | ||
151 | 10 | * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
152 | 11 | * Lesser General Public License for more details. | ||
153 | 12 | * | ||
154 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
155 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
156 | 15 | */ | ||
157 | 16 | |||
158 | 17 | #ifndef ORIENTATIONCHANGEEVENT_P_H | ||
159 | 18 | #define ORIENTATIONCHANGEEVENT_P_H | ||
160 | 19 | |||
161 | 20 | #include <QEvent> | ||
162 | 21 | #include <QOrientationReading> | ||
163 | 22 | #include "logging.h" | ||
164 | 23 | |||
165 | 24 | class OrientationChangeEvent : public QEvent { | ||
166 | 25 | public: | ||
167 | 26 | OrientationChangeEvent(QEvent::Type type, QOrientationReading::Orientation orientation) | ||
168 | 27 | : QEvent(type) | ||
169 | 28 | , mOrientation(orientation) | ||
170 | 29 | { | ||
171 | 30 | } | ||
172 | 31 | |||
173 | 32 | static const QEvent::Type mType; | ||
174 | 33 | QOrientationReading::Orientation mOrientation; | ||
175 | 34 | }; | ||
176 | 35 | |||
177 | 36 | #endif // ORIENTATIONCHANGEEVENT_P_H | ||
178 | 0 | 37 | ||
179 | === modified file 'src/ubuntumirclient/screen.cpp' | |||
180 | --- src/ubuntumirclient/screen.cpp 2014-06-30 14:40:47 +0000 | |||
181 | +++ src/ubuntumirclient/screen.cpp 2014-09-19 12:18:46 +0000 | |||
182 | @@ -22,13 +22,10 @@ | |||
183 | 22 | #include <qpa/qwindowsysteminterface.h> | 22 | #include <qpa/qwindowsysteminterface.h> |
184 | 23 | #include <QtPlatformSupport/private/qeglconvenience_p.h> | 23 | #include <QtPlatformSupport/private/qeglconvenience_p.h> |
185 | 24 | 24 | ||
186 | 25 | // Qt sensors | ||
187 | 26 | #include <QtSensors/QOrientationSensor> | ||
188 | 27 | #include <QtSensors/QOrientationReading> | ||
189 | 28 | |||
190 | 29 | // local | 25 | // local |
191 | 30 | #include "screen.h" | 26 | #include "screen.h" |
192 | 31 | #include "logging.h" | 27 | #include "logging.h" |
193 | 28 | #include "orientationchangeevent_p.h" | ||
194 | 32 | 29 | ||
195 | 33 | // platform-api | 30 | // platform-api |
196 | 34 | #include <ubuntu/application/ui/display.h> | 31 | #include <ubuntu/application/ui/display.h> |
197 | @@ -85,21 +82,8 @@ | |||
198 | 85 | } | 82 | } |
199 | 86 | #endif | 83 | #endif |
200 | 87 | 84 | ||
201 | 88 | class OrientationReadingEvent : public QEvent { | ||
202 | 89 | public: | ||
203 | 90 | OrientationReadingEvent(QEvent::Type type, QOrientationReading::Orientation orientation) | ||
204 | 91 | : QEvent(type) | ||
205 | 92 | , mOrientation(orientation) { | ||
206 | 93 | DLOG("OrientationReadingEvent::OrientationReadingEvent()"); | ||
207 | 94 | } | ||
208 | 95 | ~OrientationReadingEvent() { | ||
209 | 96 | DLOG("OrientationReadingEvent::~OrientationReadingEvent()"); | ||
210 | 97 | } | ||
211 | 98 | static const QEvent::Type mType; | ||
212 | 99 | QOrientationReading::Orientation mOrientation; | ||
213 | 100 | }; | ||
214 | 101 | 85 | ||
216 | 102 | const QEvent::Type OrientationReadingEvent::mType = | 86 | const QEvent::Type OrientationChangeEvent::mType = |
217 | 103 | static_cast<QEvent::Type>(QEvent::registerEventType()); | 87 | static_cast<QEvent::Type>(QEvent::registerEventType()); |
218 | 104 | 88 | ||
219 | 105 | 89 | ||
220 | @@ -171,31 +155,17 @@ | |||
221 | 171 | 155 | ||
222 | 172 | // If it's a landscape device (i.e. some tablets), start in landscape, otherwise portrait | 156 | // If it's a landscape device (i.e. some tablets), start in landscape, otherwise portrait |
223 | 173 | mCurrentOrientation = (mNativeOrientation == Qt::LandscapeOrientation) ? Qt::LandscapeOrientation : Qt::PortraitOrientation; | 157 | mCurrentOrientation = (mNativeOrientation == Qt::LandscapeOrientation) ? Qt::LandscapeOrientation : Qt::PortraitOrientation; |
224 | 174 | |||
225 | 175 | mOrientationSensor = new QOrientationSensor(); | ||
226 | 176 | QObject::connect(mOrientationSensor, SIGNAL(readingChanged()), this, SLOT(onOrientationReadingChanged())); | ||
227 | 177 | mOrientationSensor->start(); | ||
228 | 178 | } | 158 | } |
229 | 179 | 159 | ||
230 | 180 | UbuntuScreen::~UbuntuScreen() | 160 | UbuntuScreen::~UbuntuScreen() |
231 | 181 | { | 161 | { |
232 | 182 | eglTerminate(mEglDisplay); | 162 | eglTerminate(mEglDisplay); |
233 | 183 | delete mOrientationSensor; | ||
234 | 184 | } | ||
235 | 185 | |||
236 | 186 | void UbuntuScreen::toggleSensors(const bool enable) const { | ||
237 | 187 | DLOG("UbuntuScreen::toggleSensors (this=%p, enable=%d)", this, enable); | ||
238 | 188 | if (enable) | ||
239 | 189 | mOrientationSensor->start(); | ||
240 | 190 | else | ||
241 | 191 | mOrientationSensor->stop(); | ||
242 | 192 | } | 163 | } |
243 | 193 | 164 | ||
244 | 194 | void UbuntuScreen::customEvent(QEvent* event) { | 165 | void UbuntuScreen::customEvent(QEvent* event) { |
245 | 195 | DLOG("UbuntuScreen::customEvent (event: %p)", event); | ||
246 | 196 | DASSERT(QThread::currentThread() == thread()); | 166 | DASSERT(QThread::currentThread() == thread()); |
247 | 197 | 167 | ||
249 | 198 | OrientationReadingEvent* oReadingEvent = static_cast<OrientationReadingEvent*>(event); | 168 | OrientationChangeEvent* oReadingEvent = static_cast<OrientationChangeEvent*>(event); |
250 | 199 | switch (oReadingEvent->mOrientation) { | 169 | switch (oReadingEvent->mOrientation) { |
251 | 200 | case QOrientationReading::LeftUp: { | 170 | case QOrientationReading::LeftUp: { |
252 | 201 | mCurrentOrientation = (mNativeOrientation == Qt::LandscapeOrientation) ? | 171 | mCurrentOrientation = (mNativeOrientation == Qt::LandscapeOrientation) ? |
253 | @@ -218,20 +188,12 @@ | |||
254 | 218 | break; | 188 | break; |
255 | 219 | } | 189 | } |
256 | 220 | default: { | 190 | default: { |
258 | 221 | DLOG("Unknown orientation."); | 191 | DLOG("UbuntuScreen::customEvent - Unknown orientation."); |
259 | 192 | return; | ||
260 | 222 | } | 193 | } |
261 | 223 | } | 194 | } |
262 | 224 | 195 | ||
263 | 225 | // Raise the event signal so that client apps know the orientation changed | 196 | // Raise the event signal so that client apps know the orientation changed |
264 | 226 | QWindowSystemInterface::handleScreenOrientationChange(screen(), mCurrentOrientation); | 197 | QWindowSystemInterface::handleScreenOrientationChange(screen(), mCurrentOrientation); |
276 | 227 | } | 198 | DLOG("UbuntuScreen::customEvent - handling orientation change to %d", mCurrentOrientation); |
277 | 228 | 199 | } | |
267 | 229 | void UbuntuScreen::onOrientationReadingChanged() { | ||
268 | 230 | DLOG("UbuntuScreen::onOrientationReadingChanged"); | ||
269 | 231 | DASSERT(mOrientationSensor != NULL); | ||
270 | 232 | |||
271 | 233 | // Make sure to switch to the main Qt thread context | ||
272 | 234 | QCoreApplication::postEvent(this, new OrientationReadingEvent( | ||
273 | 235 | OrientationReadingEvent::mType, mOrientationSensor->reading()->orientation())); | ||
274 | 236 | } | ||
275 | 237 | |||
278 | 238 | 200 | ||
279 | === modified file 'src/ubuntumirclient/screen.h' | |||
280 | --- src/ubuntumirclient/screen.h 2014-06-30 14:40:47 +0000 | |||
281 | +++ src/ubuntumirclient/screen.h 2014-09-19 12:18:46 +0000 | |||
282 | @@ -21,8 +21,6 @@ | |||
283 | 21 | #include <QSurfaceFormat> | 21 | #include <QSurfaceFormat> |
284 | 22 | #include <EGL/egl.h> | 22 | #include <EGL/egl.h> |
285 | 23 | 23 | ||
286 | 24 | class QOrientationSensor; | ||
287 | 25 | |||
288 | 26 | class UbuntuScreen : public QObject, public QPlatformScreen | 24 | class UbuntuScreen : public QObject, public QPlatformScreen |
289 | 27 | { | 25 | { |
290 | 28 | Q_OBJECT | 26 | Q_OBJECT |
291 | @@ -44,20 +42,14 @@ | |||
292 | 44 | EGLConfig eglConfig() const { return mEglConfig; } | 42 | EGLConfig eglConfig() const { return mEglConfig; } |
293 | 45 | EGLNativeDisplayType eglNativeDisplay() const { return mEglNativeDisplay; } | 43 | EGLNativeDisplayType eglNativeDisplay() const { return mEglNativeDisplay; } |
294 | 46 | 44 | ||
295 | 47 | void toggleSensors(bool enable) const; | ||
296 | 48 | |||
297 | 49 | // QObject methods. | 45 | // QObject methods. |
298 | 50 | void customEvent(QEvent* event); | 46 | void customEvent(QEvent* event); |
299 | 51 | 47 | ||
300 | 52 | public Q_SLOTS: | ||
301 | 53 | void onOrientationReadingChanged(); | ||
302 | 54 | |||
303 | 55 | private: | 48 | private: |
304 | 56 | QRect mGeometry; | 49 | QRect mGeometry; |
305 | 57 | QRect mAvailableGeometry; | 50 | QRect mAvailableGeometry; |
306 | 58 | Qt::ScreenOrientation mNativeOrientation; | 51 | Qt::ScreenOrientation mNativeOrientation; |
307 | 59 | Qt::ScreenOrientation mCurrentOrientation; | 52 | Qt::ScreenOrientation mCurrentOrientation; |
308 | 60 | QOrientationSensor* mOrientationSensor; | ||
309 | 61 | QImage::Format mFormat; | 53 | QImage::Format mFormat; |
310 | 62 | int mDepth; | 54 | int mDepth; |
311 | 63 | QSurfaceFormat mSurfaceFormat; | 55 | QSurfaceFormat mSurfaceFormat; |
312 | 64 | 56 | ||
313 | === modified file 'src/ubuntumirclient/ubuntumirclient.pro' | |||
314 | --- src/ubuntumirclient/ubuntumirclient.pro 2014-08-14 13:18:24 +0000 | |||
315 | +++ src/ubuntumirclient/ubuntumirclient.pro 2014-09-19 12:18:46 +0000 | |||
316 | @@ -37,6 +37,7 @@ | |||
317 | 37 | integration.h \ | 37 | integration.h \ |
318 | 38 | logging.h \ | 38 | logging.h \ |
319 | 39 | nativeinterface.h \ | 39 | nativeinterface.h \ |
320 | 40 | orientationchangeevent_p.h \ | ||
321 | 40 | platformservices.h \ | 41 | platformservices.h \ |
322 | 41 | plugin.h \ | 42 | plugin.h \ |
323 | 42 | screen.h \ | 43 | screen.h \ |
FAILED: Continuous integration, rev:243 jenkins. qa.ubuntu. com/job/ qtubuntu- ci/155/ jenkins. qa.ubuntu. com/job/ qtubuntu- utopic- armhf-ci/ 21/console
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/qtubuntu- ci/155/ rebuild
http://