diff options
author | Aaron McCarthy <aaron.mccarthy@jollamobile.com> | 2014-01-16 15:15:31 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 13:41:26 +0100 |
commit | bdcc97c444fadc566b4476f5f91b02bd8be21ec3 (patch) | |
tree | a5a0dac4f1d0712f20131a01e1e0ff727986fa43 | |
parent | ebff3c576277d10eab79f43173184e21d326aa54 (diff) | |
download | qtlocation-bdcc97c444fadc566b4476f5f91b02bd8be21ec3.tar.gz |
Add dependencies to project file.
src.pro was using CONFIG += ordered, changed to specify proper
dependencies.
Include documentation snippets and build them by default. Fix broken
documentation snippets.
Change-Id: I550db3844e77e0ea52e697a3946720f770f6c9b6
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r-- | src/location/doc/snippets/declarative/declarative.pro | 3 | ||||
-rw-r--r-- | src/positioning/doc/snippets/cpp/cppqml.cpp | 10 | ||||
-rw-r--r-- | src/positioning/doc/snippets/snippets.pro | 2 | ||||
-rw-r--r-- | src/src.pro | 27 |
4 files changed, 34 insertions, 8 deletions
diff --git a/src/location/doc/snippets/declarative/declarative.pro b/src/location/doc/snippets/declarative/declarative.pro index 40fb082f..e6ff7ce6 100644 --- a/src/location/doc/snippets/declarative/declarative.pro +++ b/src/location/doc/snippets/declarative/declarative.pro @@ -7,6 +7,9 @@ content.files = \ routing.qml \ places_loader.qml +OTHER_FILES = \ + $${content.files} + # Put content in INSTALLS so that content.files become part of the project tree in Qt Creator, # but scoped with false as we don't actually want to install them. They are documentation # snippets. diff --git a/src/positioning/doc/snippets/cpp/cppqml.cpp b/src/positioning/doc/snippets/cpp/cppqml.cpp index 95d34b7c..605a5ed2 100644 --- a/src/positioning/doc/snippets/cpp/cppqml.cpp +++ b/src/positioning/doc/snippets/cpp/cppqml.cpp @@ -72,16 +72,16 @@ class MyClass : public QObject public: MyClass() : QObject() { - QGeoAreaMonitorSource *monitor = QGeoAreaMonitorSource::createDefaultMonitorSource(this); + QGeoAreaMonitorSource *monitor = QGeoAreaMonitorSource::createDefaultSource(this); if (monitor) { connect(monitor, SIGNAL(areaEntered(QGeoAreaMonitorInfo,QGeoPositionInfo)), - this, SLOT(areaEntered(QGeoAreaMonitorInfo,QGeoPositionInfo)); + this, SLOT(areaEntered(QGeoAreaMonitorInfo,QGeoPositionInfo))); connect(monitor, SIGNAL(areaExited(QGeoAreaMonitorInfo,QGeoPositionInfo)), this, SLOT(areaExited(QGeoAreaMonitorInfo,QGeoPositionInfo))); QGeoAreaMonitorInfo bigBen("Big Ben"); QGeoCoordinate position(51.50104, -0.124632); - bigBen.setMonitoredArea(QGeoCircle(position, 100)); + bigBen.setArea(QGeoCircle(position, 100)); monitor->startMonitoring(bigBen); @@ -93,11 +93,15 @@ public: public Q_SLOTS: void areaEntered(const QGeoAreaMonitorInfo &mon, const QGeoPositionInfo &update) { + Q_UNUSED(mon) + qDebug() << "Now within 100 meters, current position is" << update.coordinate(); } void areaExited(const QGeoAreaMonitorInfo &mon, const QGeoPositionInfo &update) { + Q_UNUSED(mon) + qDebug() << "No longer within 100 meters, current position is" << update.coordinate(); } //! [BigBen] diff --git a/src/positioning/doc/snippets/snippets.pro b/src/positioning/doc/snippets/snippets.pro new file mode 100644 index 00000000..451d1c36 --- /dev/null +++ b/src/positioning/doc/snippets/snippets.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS += cpp diff --git a/src/src.pro b/src/src.pro index f6e41510..72274cdc 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,13 +1,30 @@ TEMPLATE = subdirs -CONFIG += ordered SUBDIRS += positioning +plugins.depends = positioning +SUBDIRS += plugins + +positioning_doc_snippets.subdir = positioning/doc/snippets +positioning_doc_snippets.depends = positioning +SUBDIRS += positioning_doc_snippets + #no point in building QtLocation without Qt3D qtHaveModule(3d) { - SUBDIRS += location 3rdparty -} + SUBDIRS += 3rdparty -SUBDIRS += plugins -qtHaveModule(quick): SUBDIRS += imports + location.depends = positioning 3rdparty + SUBDIRS += location + plugins.depends += location + qtHaveModule(quick):imports.depends += location + + location_doc_snippets.subdir = location/doc/snippets + location_doc_snippets.depends = location + SUBDIRS += location_doc_snippets +} + +qtHaveModule(quick) { + imports.depends += positioning + SUBDIRS += imports +} |