Exported QSGMouseArea and QSGMouseEvent as private exports.
authorjuhvu <qt-info@nokia.com>
Thu, 22 Sep 2011 05:20:07 +0000 (15:20 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 4 Oct 2011 03:16:43 +0000 (05:16 +0200)
QtLocation uses QSGMouseAreas internally in the MapMouseArea and
MapMouse event (it can't support standard MouseAreas due to its domain
specific requirements). Exporting those classes as private exports will
enable significant code re-use.

Dependencies on privates of other modules is never ideal, but it is
notable that MapMouseAreas use only the public properties of the
QSGMouse classes. Exports are needed to be able to instantiate them
as well as to connect to their property signals (and work without
reinterpret casts).

(Copying QSGMouse classes to QtLocation is not practical they are very
intertwined with QSG internals).

Change-Id: I98651f9d525abc3b7319e027e47c71b3e3c5fe51
Reviewed-on: http://codereview.qt-project.org/5352
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/items/qsgevents_p_p.h
src/declarative/items/qsgmousearea_p.h

index 0aa95c0..1d2b6a9 100644 (file)
@@ -90,7 +90,8 @@ private:
     QKeyEvent event;
 };
 
-class QSGMouseEvent : public QObject
+// used in QtLocation
+class Q_DECLARATIVE_EXPORT QSGMouseEvent : public QObject
 {
     Q_OBJECT
     Q_PROPERTY(int x READ x)
index 0ec9c6b..a8015fc 100644 (file)
@@ -149,7 +149,8 @@ private:
 };
 
 class QSGMouseAreaPrivate;
-class Q_AUTOTEST_EXPORT QSGMouseArea : public QSGItem
+// used in QtLocation
+class Q_DECLARATIVE_EXPORT QSGMouseArea : public QSGItem
 {
     Q_OBJECT