on xenial help sign in
Bump the version to secure UITK compatibility
8b49c63Bileto Bot
debian/changelog+6
@@ -1,3 +1,9 @@
1+unity8 (8.14-0ubuntu1) UNRELEASED; urgency=medium
2+
3+ * Bump the version to secure UITK compatibility
4+
5+ -- Zoltán Balogh <zoltan@bakter.hu> Mon, 11 Jul 2016 12:42:29 +0200
6+
1unity8 (8.13+16.10.20160714+fix1-0ubuntu2~1) yakkety; urgency=medium
7unity8 (8.13+16.10.20160714+fix1-0ubuntu2~1) yakkety; urgency=medium
2
8
3 * Rebuild against Qt 5.6.
9 * Rebuild against Qt 5.6.
debian/control+6−6
@@ -31,8 +31,8 @@ Build-Depends: cmake,
31 libqt5svg5-dev,
31 libqt5svg5-dev,
32 libqt5xmlpatterns5-dev,
32 libqt5xmlpatterns5-dev,
33 libsystemsettings-dev,
33 libsystemsettings-dev,
34− libubuntugestures5-dev,
34+ libubuntugestures5-dev (>= 1.3.2030),
35− libubuntugestures5-private-dev,
35+ libubuntugestures5-private-dev (>= 1.3.2030),
36 libudev-dev,
36 libudev-dev,
37 libunity-api-dev (>= 7.116),
37 libunity-api-dev (>= 7.116),
38 libusermetricsoutput1-dev,
38 libusermetricsoutput1-dev,
@@ -51,7 +51,7 @@ Build-Depends: cmake,
51 qml-module-qtquick2,
51 qml-module-qtquick2,
52 qml-module-qtsysteminfo,
52 qml-module-qtsysteminfo,
53 qml-module-qttest,
53 qml-module-qttest,
54− qml-module-ubuntu-components (>= 1.3.1845) | qml-module-ubuntu-components-gles (>= 1.3.1845),
54+ qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),
55 qml-module-ubuntu-web,
55 qml-module-ubuntu-web,
56 qt5-default,
56 qt5-default,
57 qtbase5-dev (>= 5.4),
57 qtbase5-dev (>= 5.4),
@@ -76,7 +76,7 @@ X-Ubuntu-Use-Langpack: yes
76Package: indicators-client
76Package: indicators-client
77Architecture: amd64 armhf i386
77Architecture: amd64 armhf i386
78Depends: qmenumodel-qml (>= 0.2.9),
78Depends: qmenumodel-qml (>= 0.2.9),
79− qml-module-ubuntu-components (>= 1.3.1845) | qml-module-ubuntu-components-gles (>= 1.3.1845),
79+ qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),
80 unity8 (= ${binary:Version}),
80 unity8 (= ${binary:Version}),
81 ${misc:Depends},
81 ${misc:Depends},
82 ${shlibs:Depends},
82 ${shlibs:Depends},
@@ -146,7 +146,7 @@ Description: Unity 8 shell
146Package: unity8-common
146Package: unity8-common
147Architecture: all
147Architecture: all
148Depends: qml-module-qtquick-layouts,
148Depends: qml-module-qtquick-layouts,
149− qml-module-ubuntu-components (>= 1.3.1845) | qml-module-ubuntu-components-gles (>= 1.3.1845),
149+ qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),
150 qml-module-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
150 qml-module-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
151 qtdeclarative5-ubuntu-settings-components (>= 0.7),
151 qtdeclarative5-ubuntu-settings-components (>= 0.7),
152 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
152 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
@@ -178,7 +178,7 @@ Depends: autopilot-qt5 (>= 1.4),
178 python3-fixtures,
178 python3-fixtures,
179 python3-gi,
179 python3-gi,
180 qttestability-autopilot (>= 1.4),
180 qttestability-autopilot (>= 1.4),
181− ubuntu-ui-toolkit-autopilot (>= 1.3.1845),
181+ ubuntu-ui-toolkit-autopilot (>= 1.3.2030),
182 unity-scope-click,
182 unity-scope-click,
183 unity8 (= ${source:Version}),
183 unity8 (= ${source:Version}),
184 unity8-fake-env (= ${source:Version}),
184 unity8-fake-env (= ${source:Version}),
plugins/Ubuntu/Gestures/AxisVelocityCalculator.cpp+1−1
@@ -21,7 +21,7 @@
21#include "AxisVelocityCalculator.h"
21#include "AxisVelocityCalculator.h"
22#include <QtCore/QElapsedTimer>
22#include <QtCore/QElapsedTimer>
23
23
24−using namespace UbuntuGestures;
24+UG_USE_NAMESPACE
25
25
26AxisVelocityCalculator::AxisVelocityCalculator(QObject *parent)
26AxisVelocityCalculator::AxisVelocityCalculator(QObject *parent)
27 : AxisVelocityCalculator(SharedTimeSource(new RealTimeSource), parent)
27 : AxisVelocityCalculator(SharedTimeSource(new RealTimeSource), parent)
plugins/Ubuntu/Gestures/AxisVelocityCalculator.h+4−4
@@ -24,7 +24,7 @@
24#include "UbuntuGesturesQmlGlobal.h"
24#include "UbuntuGesturesQmlGlobal.h"
25#include <stdint.h>
25#include <stdint.h>
26#include <QtCore/QObject>
26#include <QtCore/QObject>
27−#include <TimeSource>
27+#include <UbuntuGestures/private/timesource_p.h>
28
28
29/*
29/*
30 Estimates the current velocity of a finger based on recent movement along an axis
30 Estimates the current velocity of a finger based on recent movement along an axis
@@ -68,7 +68,7 @@ public:
68 /*
68 /*
69 Constructor that takes a TimeSource
69 Constructor that takes a TimeSource
70 */
70 */
71− AxisVelocityCalculator(const UbuntuGestures::SharedTimeSource &timeSource, QObject *parent = 0);
71+ AxisVelocityCalculator(const UG_PREPEND_NAMESPACE(SharedTimeSource) &timeSource, QObject *parent = 0);
72
72
73 virtual ~AxisVelocityCalculator();
73 virtual ~AxisVelocityCalculator();
74
74
@@ -90,7 +90,7 @@ public:
90 /*
90 /*
91 Replaces the TimeSource with the given one. Useful for testing purposes.
91 Replaces the TimeSource with the given one. Useful for testing purposes.
92 */
92 */
93− void setTimeSource(const UbuntuGestures::SharedTimeSource &timeSource);
93+ void setTimeSource(const UG_PREPEND_NAMESPACE(SharedTimeSource) &timeSource);
94
94
95 /*
95 /*
96 The minimum amount of samples needed for a velocity calculation.
96 The minimum amount of samples needed for a velocity calculation.
@@ -138,7 +138,7 @@ private:
138 int m_samplesRead; /* index of the oldest sample available. -1 if buffer is empty */
138 int m_samplesRead; /* index of the oldest sample available. -1 if buffer is empty */
139 int m_samplesWrite; /* index where the next sample will be written */
139 int m_samplesWrite; /* index where the next sample will be written */
140
140
141− UbuntuGestures::SharedTimeSource m_timeSource;
141+ UG_PREPEND_NAMESPACE(SharedTimeSource) m_timeSource;
142
142
143 qreal m_trackedPosition;
143 qreal m_trackedPosition;
144};
144};
plugins/Ubuntu/Gestures/CMakeLists.txt+1
@@ -27,6 +27,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
27include_directories(
27include_directories(
28 SYSTEM
28 SYSTEM
29 ${UBUNTUGESTURES_INCLUDE_DIRS}
29 ${UBUNTUGESTURES_INCLUDE_DIRS}
30+ ${UBUNTUGESTURES_INCLUDEDIR}/UbuntuGestures/${UBUNTUGESTURES_VERSION}
30)
31)
31
32
32# There's no cmake var for v8 include path :-/ so create one
33# There's no cmake var for v8 include path :-/ so create one
plugins/Ubuntu/Gestures/TouchGate.cpp+6−4
@@ -20,16 +20,18 @@
20#include <QDebug>
20#include <QDebug>
21#include <QQuickWindow>
21#include <QQuickWindow>
22
22
23−#include <TouchOwnershipEvent>
23+#include <UbuntuGestures/private/touchownershipevent_p.h>
24−#include <TouchRegistry>
24+#include <UbuntuGestures/private/touchregistry_p.h>
25
25
26#if TOUCHGATE_DEBUG
26#if TOUCHGATE_DEBUG
27#define ugDebug(params) qDebug().nospace() << "[TouchGate(" << (void*)this << ")] " << params
27#define ugDebug(params) qDebug().nospace() << "[TouchGate(" << (void*)this << ")] " << params
28−#include <DebugHelpers.h>
28+#include <UbuntuGestures/private/debughelpers_p.h>
29#else // TOUCHGATE_DEBUG
29#else // TOUCHGATE_DEBUG
30#define ugDebug(params) ((void)0)
30#define ugDebug(params) ((void)0)
31#endif // TOUCHGATE_DEBUG
31#endif // TOUCHGATE_DEBUG
32
32
33+UG_USE_NAMESPACE
34+
33TouchGate::TouchGate(QQuickItem *parent)
35TouchGate::TouchGate(QQuickItem *parent)
34 : QQuickItem(parent)
36 : QQuickItem(parent)
35{
37{
@@ -40,7 +42,7 @@ TouchGate::TouchGate(QQuickItem *parent)
40bool TouchGate::event(QEvent *e)
42bool TouchGate::event(QEvent *e)
41{
43{
42 if (e->type() == TouchOwnershipEvent::touchOwnershipEventType()) {
44 if (e->type() == TouchOwnershipEvent::touchOwnershipEventType()) {
43− touchOwnershipEvent(static_cast<TouchOwnershipEvent *>(e));
45+ touchOwnershipEvent(static_cast<TouchOwnershipEvent*>(e));
44 return true;
46 return true;
45 } else {
47 } else {
46 return QQuickItem::event(e);
48 return QQuickItem::event(e);
plugins/Ubuntu/Gestures/TouchGate.h+3−2
@@ -19,6 +19,7 @@
19
19
20#include "UbuntuGesturesQmlGlobal.h"
20#include "UbuntuGesturesQmlGlobal.h"
21#include "TouchDispatcher.h"
21#include "TouchDispatcher.h"
22+#include <UbuntuGestures/ubuntugesturesglobal.h>
22
23
23#include <QQuickItem>
24#include <QQuickItem>
24#include <QList>
25#include <QList>
@@ -26,7 +27,7 @@
26
27
27#define TOUCHGATE_DEBUG 0
28#define TOUCHGATE_DEBUG 0
28
29
29−class TouchOwnershipEvent;
30+UG_FORWARD_DECLARE_CLASS(TouchOwnershipEvent)
30
31
31/*
32/*
32 Blocks the passage of events until ownership over the related touch points is granted.
33 Blocks the passage of events until ownership over the related touch points is granted.
@@ -82,7 +83,7 @@ private:
82 ulong timestamp;
83 ulong timestamp;
83 };
84 };
84
85
85− void touchOwnershipEvent(TouchOwnershipEvent *event);
86+ void touchOwnershipEvent(UG_PREPEND_NAMESPACE(TouchOwnershipEvent) *event);
86 bool isTouchPointOwned(int touchId) const;
87 bool isTouchPointOwned(int touchId) const;
87 void storeTouchEvent(QTouchDevice *device,
88 void storeTouchEvent(QTouchDevice *device,
88 Qt::KeyboardModifiers modifiers,
89 Qt::KeyboardModifiers modifiers,
plugins/Ubuntu/Gestures/TouchGestureArea.cpp+9−7
@@ -16,9 +16,9 @@
16
16
17#include "TouchGestureArea.h"
17#include "TouchGestureArea.h"
18
18
19−#include <UbuntuGestures/TouchOwnershipEvent>
19+#include <UbuntuGestures/private/touchownershipevent_p.h>
20−#include <UbuntuGestures/TouchRegistry>
20+#include <UbuntuGestures/private/touchregistry_p.h>
21−#include <UbuntuGestures/UnownedTouchEvent>
21+#include <UbuntuGestures/private/unownedtouchevent_p.h>
22// #include "TouchRegistry.h"
22// #include "TouchRegistry.h"
23// #include "UnownedTouchEvent.h"
23// #include "UnownedTouchEvent.h"
24
24
@@ -26,6 +26,8 @@
26#include <QStyleHints>
26#include <QStyleHints>
27#include <private/qquickwindow_p.h>
27#include <private/qquickwindow_p.h>
28
28
29+UG_USE_NAMESPACE
30+
29#define TOUCHGESTUREAREA_DEBUG 0
31#define TOUCHGESTUREAREA_DEBUG 0
30
32
31// TODO - understand more about why we lose touch event releases.
33// TODO - understand more about why we lose touch event releases.
@@ -135,7 +137,7 @@ TouchGestureArea::TouchGestureArea(QQuickItem* parent)
135 , m_recognitionPeriod(50)
137 , m_recognitionPeriod(50)
136 , m_releaseRejectPeriod(100)
138 , m_releaseRejectPeriod(100)
137{
139{
138− setRecognitionTimer(new UbuntuGestures::Timer(this));
140+ setRecognitionTimer(new Timer(this));
139 m_recognitionTimer->setInterval(m_recognitionPeriod);
141 m_recognitionTimer->setInterval(m_recognitionPeriod);
140 m_recognitionTimer->setSingleShot(true);
142 m_recognitionTimer->setSingleShot(true);
141}
143}
@@ -153,10 +155,10 @@ bool TouchGestureArea::event(QEvent *event)
153{
155{
154 // Process unowned touch events (handles update/release for incomplete gestures)
156 // Process unowned touch events (handles update/release for incomplete gestures)
155 if (event->type() == TouchOwnershipEvent::touchOwnershipEventType()) {
157 if (event->type() == TouchOwnershipEvent::touchOwnershipEventType()) {
156− touchOwnershipEvent(static_cast<TouchOwnershipEvent *>(event));
158+ touchOwnershipEvent(static_cast<TouchOwnershipEvent*>(event));
157 return true;
159 return true;
158 } else if (event->type() == UnownedTouchEvent::unownedTouchEventType()) {
160 } else if (event->type() == UnownedTouchEvent::unownedTouchEventType()) {
159− unownedTouchEvent(static_cast<UnownedTouchEvent *>(event)->touchEvent());
161+ unownedTouchEvent(static_cast<UnownedTouchEvent*>(event)->touchEvent());
160 return true;
162 return true;
161 }
163 }
162
164
@@ -608,7 +610,7 @@ void TouchGestureArea::setInternalStatus(uint newStatus)
608 }
610 }
609}
611}
610
612
611−void TouchGestureArea::setRecognitionTimer(UbuntuGestures::AbstractTimer *timer)
613+void TouchGestureArea::setRecognitionTimer(AbstractTimer *timer)
612{
614{
613 int interval = 0;
615 int interval = 0;
614 bool timerWasRunning = false;
616 bool timerWasRunning = false;
plugins/Ubuntu/Gestures/TouchGestureArea.h+7−6
@@ -21,10 +21,11 @@
21
21
22#include <QQuickItem>
22#include <QQuickItem>
23
23
24−#include <UbuntuGestures/Timer>
24+#include <UbuntuGestures/ubuntugesturesglobal.h>
25+#include <UbuntuGestures/private/timer_p.h>
25
26
26−class TouchOwnershipEvent;
27+UG_FORWARD_DECLARE_CLASS(TouchOwnershipEvent)
27−class UnownedTouchEvent;
28+UG_FORWARD_DECLARE_CLASS(UnownedTouchEvent)
28
29
29class GestureTouchPoint : public QObject
30class GestureTouchPoint : public QObject
30{
31{
@@ -141,7 +142,7 @@ public:
141
142
142 bool event(QEvent *e) override;
143 bool event(QEvent *e) override;
143
144
144− void setRecognitionTimer(UbuntuGestures::AbstractTimer *timer);
145+ void setRecognitionTimer(UG_PREPEND_NAMESPACE(AbstractTimer) *timer);
145
146
146 int status() const;
147 int status() const;
147 bool dragging() const;
148 bool dragging() const;
@@ -194,7 +195,7 @@ private:
194 void unownedTouchEvent_recognised(QTouchEvent *unownedTouchEvent);
195 void unownedTouchEvent_recognised(QTouchEvent *unownedTouchEvent);
195 void unownedTouchEvent_rejected(QTouchEvent *unownedTouchEvent);
196 void unownedTouchEvent_rejected(QTouchEvent *unownedTouchEvent);
196
197
197− void touchOwnershipEvent(TouchOwnershipEvent *event);
198+ void touchOwnershipEvent(UG_PREPEND_NAMESPACE(TouchOwnershipEvent) *event);
198 void updateTouchPoints(QTouchEvent *event);
199 void updateTouchPoints(QTouchEvent *event);
199
200
200 GestureTouchPoint* addTouchPoint(const QTouchEvent::TouchPoint *tp);
201 GestureTouchPoint* addTouchPoint(const QTouchEvent::TouchPoint *tp);
@@ -209,7 +210,7 @@ private:
209 uint m_status;
210 uint m_status;
210 QSet<int> m_candidateTouches;
211 QSet<int> m_candidateTouches;
211 QSet<int> m_watchedTouches;
212 QSet<int> m_watchedTouches;
212− UbuntuGestures::AbstractTimer *m_recognitionTimer;
213+ UG_PREPEND_NAMESPACE(AbstractTimer) *m_recognitionTimer;
213
214
214 bool m_dragging;
215 bool m_dragging;
215 QHash<int, GestureTouchPoint*> m_liveTouchPoints;
216 QHash<int, GestureTouchPoint*> m_liveTouchPoints;
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+1
@@ -7,6 +7,7 @@ include_directories(
7 SYSTEM
7 SYSTEM
8 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
8 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
9 ${UBUNTUGESTURES_INCLUDE_DIRS}
9 ${UBUNTUGESTURES_INCLUDE_DIRS}
10+ ${UBUNTUGESTURES_INCLUDEDIR}/UbuntuGestures/${UBUNTUGESTURES_VERSION}
10 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
11 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
11)
12)
12
13
tests/plugins/Ubuntu/Gestures/GestureTest.cpp+3−3
@@ -22,10 +22,10 @@
22#include <QQuickView>
22#include <QQuickView>
23#include <QtTest>
23#include <QtTest>
24
24
25−#include <Timer>
25+#include <UbuntuGestures/private/timer_p.h>
26−#include <TouchRegistry>
26+#include <UbuntuGestures/private/touchregistry_p.h>
27
27
28−using namespace UbuntuGestures;
28+UG_USE_NAMESPACE
29
29
30GestureTest::GestureTest(const QString &qmlFilename)
30GestureTest::GestureTest(const QString &qmlFilename)
31 : QObject(), m_device(nullptr), m_view(nullptr), m_qmlFilename(qmlFilename)
31 : QObject(), m_device(nullptr), m_view(nullptr), m_qmlFilename(qmlFilename)
tests/plugins/Ubuntu/Gestures/GestureTest.h+4−5
@@ -19,14 +19,13 @@
19
19
20#include <QQuickItem>
20#include <QQuickItem>
21#include <QTouchEvent>
21#include <QTouchEvent>
22+#include <UbuntuGestures/ubuntugesturesglobal.h>
22
23
23class QQuickView;
24class QQuickView;
24class QTouchDevice;
25class QTouchDevice;
25
26
26−namespace UbuntuGestures {
27− class FakeTimerFactory;
27+UG_FORWARD_DECLARE_CLASS(FakeTimerFactory)
28−}
29−class TouchRegistry;
28+UG_FORWARD_DECLARE_CLASS(TouchRegistry)
30
29
31// C++ std lib
30// C++ std lib
32#include <functional>
31#include <functional>
@@ -96,7 +95,7 @@ protected:
96 QTouchDevice *m_device;
95 QTouchDevice *m_device;
97 QQuickView *m_view;
96 QQuickView *m_view;
98 TouchRegistry *m_touchRegistry;
97 TouchRegistry *m_touchRegistry;
99− UbuntuGestures::FakeTimerFactory *m_fakeTimerFactory;
98+ UG_PREPEND_NAMESPACE(FakeTimerFactory) *m_fakeTimerFactory;
100 QString m_qmlFilename;
99 QString m_qmlFilename;
101};
100};
102
101
tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp+1−1
@@ -20,7 +20,7 @@
20
20
21#include <AxisVelocityCalculator.h>
21#include <AxisVelocityCalculator.h>
22
22
23−class FakeTimeSource : public UbuntuGestures::TimeSource {
23+class FakeTimeSource : public UG_PREPEND_NAMESPACE(TimeSource) {
24public:
24public:
25 FakeTimeSource() : m_value(0) {}
25 FakeTimeSource() : m_value(0) {}
26
26
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.cpp+1−1
@@ -21,7 +21,7 @@
21#include "TestItem.h"
21#include "TestItem.h"
22#include "Direction.h"
22#include "Direction.h"
23
23
24−using namespace UbuntuGestures;
24+UG_USE_NAMESPACE
25
25
26class tst_FloatingFlickable: public GestureTest
26class tst_FloatingFlickable: public GestureTest
27{
27{
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+3−1
@@ -25,10 +25,12 @@
25#include <functional>
25#include <functional>
26
26
27#include <TouchGate.h>
27#include <TouchGate.h>
28−#include <TouchRegistry>
28+#include <UbuntuGestures/private/touchregistry_p.h>
29
29
30#include "TestItem.h"
30#include "TestItem.h"
31
31
32+UG_USE_NAMESPACE
33+
32class CandidateItem : public QQuickItem
34class CandidateItem : public QQuickItem
33{
35{
34 Q_OBJECT
36 Q_OBJECT
tests/qmltests/Components/tst_DragHandle.cpp+2−2
@@ -24,10 +24,10 @@
24#include <UbuntuGestures/private/ucswipearea_p_p.h>
24#include <UbuntuGestures/private/ucswipearea_p_p.h>
25
25
26#include <AxisVelocityCalculator.h>
26#include <AxisVelocityCalculator.h>
27−#include <Timer>
27+#include <UbuntuGestures/private/timer_p.h>
28#include "Direction.h"
28#include "Direction.h"
29
29
30−using namespace UbuntuGestures;
30+UG_USE_NAMESPACE
31
31
32class tst_DragHandle: public QObject
32class tst_DragHandle: public QObject
33{
33{
tests/qmltests/Components/tst_EdgeDragEvaluator.cpp+2−2
@@ -24,9 +24,9 @@
24// Ubuntu.Gestures plugin
24// Ubuntu.Gestures plugin
25#include <AxisVelocityCalculator.h>
25#include <AxisVelocityCalculator.h>
26#include <Direction.h>
26#include <Direction.h>
27−#include <Timer>
27+#include <UbuntuGestures/private/timer_p.h>
28
28
29−using namespace UbuntuGestures;
29+UG_USE_NAMESPACE
30
30
31class tst_EdgeDragEvaluator: public QObject
31class tst_EdgeDragEvaluator: public QObject
32{
32{
tests/utils/modules/Unity/Test/CMakeLists.txt+1
@@ -13,6 +13,7 @@ include_directories(
13 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
14 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
14 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
15 ${UBUNTUGESTURES_INCLUDE_DIRS}
15 ${UBUNTUGESTURES_INCLUDE_DIRS}
16+ ${UBUNTUGESTURES_INCLUDEDIR}/UbuntuGestures/${UBUNTUGESTURES_VERSION}
16)
17)
17
18
18set(UnityTestQML_SOURCES
19set(UnityTestQML_SOURCES
tests/utils/modules/Unity/Test/testutil.cpp+15−4
@@ -24,10 +24,11 @@
24#include <private/qquickanimation_p.h>
24#include <private/qquickanimation_p.h>
25
25
26// UbuntuGestures lib
26// UbuntuGestures lib
27−#include <TouchRegistry>
27+#include <UbuntuGestures/ubuntugesturesglobal.h>
28−#include <Timer>
28+#include <UbuntuGestures/private/touchregistry_p.h>
29+#include <UbuntuGestures/private/timer_p.h>
29
30
30−using namespace UbuntuGestures;
31+UG_USE_NAMESPACE
31
32
32TestUtil::TestUtil(QObject *parent)
33TestUtil::TestUtil(QObject *parent)
33 : QObject(parent)
34 : QObject(parent)
@@ -50,8 +51,18 @@ TestUtil::isInstanceOf(QObject *obj, QString name)
50 const QMetaObject *metaObject = obj->metaObject();
51 const QMetaObject *metaObject = obj->metaObject();
51 while (!result && metaObject) {
52 while (!result && metaObject) {
52 const QString className = metaObject->className();
53 const QString className = metaObject->className();
53− const QString qmlName = className.left(className.indexOf("_QMLTYPE_"));
54+ QString qmlName = className.left(className.indexOf("_QMLTYPE_"));
54 result = qmlName == name;
55 result = qmlName == name;
56+ // test for known namespaces
57+ if (!result) {
58+ // remove UbuntuGestures and UbuntuToolkit namespace
59+ qmlName = qmlName.remove(QString("UbuntuGestures::"));
60+ result = qmlName == name;
61+ }
62+ if (!result) {
63+ qmlName = qmlName.remove(QString("UbuntuToolkit::"));
64+ result = qmlName == name;
65+ }
55 metaObject = metaObject->superClass();
66 metaObject = metaObject->superClass();
56 }
67 }
57 }
68 }