From 6362e4c764e43e313723073605fd1ea1aa4c5181 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 8 Apr 2015 09:26:01 -0700 Subject: [PATCH] Restructure location plugin build Restructured to better fit existing build structure --- qgcsystem.pro => QGCApplication.pro | 168 ++-------------- QGCCommon.pri | 184 ++++++++++++++++++ QGCLocationPlugin.pro | 33 ++++ libs/QtLocationQGC/.qmake.conf | 3 - libs/QtLocationQGC/QtLocationQGC.pro | 32 --- qgroundcontrol.pro | 12 +- .../QtLocationPlugin}/OpenPilotMaps.cc | 0 .../QtLocationPlugin}/OpenPilotMaps.h | 0 .../QtLocationPlugin}/qgc_maps_plugin.json | 0 .../QtLocationPlugin}/qgeocodereplyqgc.cpp | 5 - .../QtLocationPlugin}/qgeocodereplyqgc.h | 4 - .../qgeocodingmanagerengineqgc.cpp | 4 - .../qgeocodingmanagerengineqgc.h | 0 .../QtLocationPlugin}/qgeomapreplyqgc.cpp | 0 .../QtLocationPlugin}/qgeomapreplyqgc.h | 4 - .../qgeoserviceproviderpluginqgc.cpp | 4 - .../qgeoserviceproviderpluginqgc.h | 5 +- .../qgeotiledmappingmanagerengineqgc.cpp | 4 - .../qgeotiledmappingmanagerengineqgc.h | 4 - .../QtLocationPlugin}/qgeotilefetcherqgc.cpp | 4 - .../QtLocationPlugin}/qgeotilefetcherqgc.h | 4 - 21 files changed, 246 insertions(+), 228 deletions(-) rename qgcsystem.pro => QGCApplication.pro (82%) create mode 100644 QGCCommon.pri create mode 100644 QGCLocationPlugin.pro delete mode 100644 libs/QtLocationQGC/.qmake.conf delete mode 100644 libs/QtLocationQGC/QtLocationQGC.pro rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/OpenPilotMaps.cc (100%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/OpenPilotMaps.h (100%) rename {libs/QtLocationQGC => src/QtLocationPlugin}/qgc_maps_plugin.json (100%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeocodereplyqgc.cpp (99%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeocodereplyqgc.h (98%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeocodingmanagerengineqgc.cpp (99%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeocodingmanagerengineqgc.h (100%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeomapreplyqgc.cpp (100%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeomapreplyqgc.h (98%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeoserviceproviderpluginqgc.cpp (98%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeoserviceproviderpluginqgc.h (98%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeotiledmappingmanagerengineqgc.cpp (99%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeotiledmappingmanagerengineqgc.h (98%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeotilefetcherqgc.cpp (99%) rename {libs/QtLocationQGC/src => src/QtLocationPlugin}/qgeotilefetcherqgc.h (98%) diff --git a/qgcsystem.pro b/QGCApplication.pro similarity index 82% rename from qgcsystem.pro rename to QGCApplication.pro index e144e776b..134c24fb7 100644 --- a/qgcsystem.pro +++ b/QGCApplication.pro @@ -17,7 +17,7 @@ # along with QGroundControl. If not, see . # ------------------------------------------------- -message(Qt version $$[QT_VERSION]) +include(QGCCommon.pri) TARGET = qgroundcontrol @@ -27,120 +27,45 @@ exists(user_config.pri):infile(user_config.pri, CONFIG) { message($$sprintf("Using user-supplied additional config: '%1' specified in user_config.pri", $$fromfile(user_config.pri, CONFIG))) } -# Setup our supported build types. We do this once here and then use the defined config scopes -# to allow us to easily modify suported build types in one place instead of duplicated throughout -# the project file. - -!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 3) { - error("Unsupported Qt version, 5.4+ is required") -} - -linux { - linux-g++ | linux-g++-64 { - message("Linux build") - CONFIG += LinuxBuild link_pkgconfig - } else { - error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported") - } -} else : win32 { - win32-msvc2010 | win32-msvc2012 | win32-msvc2013 { - message("Windows build") - CONFIG += WindowsBuild - } else { - error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported") - } -} else : macx { - macx-clang | macx-llvm { - message("Mac build") - CONFIG += MacBuild - QMAKE_CXXFLAGS += -fvisibility=hidden - } else { - error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported") - } -} else { - error("Unsupported build platform, only Linux, Windows, and Mac are supported") -} - -# Installer configuration - -installer { - CONFIG -= debug - CONFIG -= debug_and_release - CONFIG += release - message(Build Installer) -} - -# Setup our supported build flavors - -CONFIG(debug, debug|release) { - message(Debug flavor) - CONFIG += DebugBuild -} else:CONFIG(release, debug|release) { - message(Release flavor) - CONFIG += ReleaseBuild -} else { - error(Unsupported build flavor) -} - -# Need to special case Windows debug_and_release since VS Project creation in this case does strange things [QTBUG-40351] -win32:debug_and_release { - CONFIG += WindowsDebugAndRelease -} - -# Setup our build directories - -BASEDIR = $${IN_PWD} - -DebugBuild { - DESTDIR = $${OUT_PWD}/debug - BUILDDIR = $${OUT_PWD}/build-debug -} - -ReleaseBuild { - DESTDIR = $${OUT_PWD}/release - BUILDDIR = $${OUT_PWD}/build-release +LinuxBuild { + CONFIG += link_pkgconfig } -OBJECTS_DIR = $${BUILDDIR}/obj -MOC_DIR = $${BUILDDIR}/moc -UI_DIR = $${BUILDDIR}/ui -RCC_DIR = $${BUILDDIR}/rcc -LANGUAGE = C++ - message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET) -# QGC QtLocation +# QGC QtLocation plugin -QGCMAPDIR = $${OUT_PWD}/libs/QtLocationQGC/plugins/geoservices +LIBS += -L$${LOCATION_PLUGIN_DESTDIR} LinuxBuild { - LIBS += -L$$QGCMAPDIR -lqtgeoservices_qgc - PRE_TARGETDEPS += $$QGCMAPDIR/libqtgeoservices_qgc.a + LIBS += -l$${LOCATION_PLUGIN_NAME} + PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a } WindowsBuild { DebugBuild { - LIBS += -L$$QGCMAPDIR -lqtgeoservices_qgcd - PRE_TARGETDEPS += $$QGCMAPDIR/qtgeoservices_qgcd.lib + LIBS += -l$${LOCATION_PLUGIN_NAME}d + PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}d.lib } ReleaseBuild { - LIBS += -L$$QGCMAPDIR -lqtgeoservices_qgc - PRE_TARGETDEPS += $$QGCMAPDIR/qtgeoservices_qgc.lib + LIBS += -l$${LOCATION_PLUGIN_NAME} + PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}.lib } } MacBuild { DebugBuild { - LIBS += -L$$QGCMAPDIR -lqtgeoservices_qgc_debug - PRE_TARGETDEPS += $$QGCMAPDIR/libqtgeoservices_qgc_debug.a + LIBS += -l$${LOCATION_PLUGIN_NAME}_debug + PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}_debug.a } ReleaseBuild { - LIBS += -L$$QGCMAPDIR -lqtgeoservices_qgc - PRE_TARGETDEPS += $$QGCMAPDIR/libqtgeoservices_qgc.a + LIBS += -l$${LOCATION_PLUGIN_NAME} + PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a } } # Qt configuration + CONFIG += qt \ thread @@ -156,7 +81,9 @@ QT += network \ printsupport \ qml \ quick \ - quickwidgets + quickwidgets \ + location \ + positioning contains(DEFINES, QGC_NOTIFY_TUNES_ENABLED) { QT += multimedia @@ -165,65 +92,24 @@ contains(DEFINES, QGC_NOTIFY_TUNES_ENABLED) { # testlib is needed even in release flavor for QSignalSpy support QT += testlib -# Turn off serial port warnings -DEFINES += _TTY_NOWARN_ - # # OS Specific settings # MacBuild { QMAKE_INFO_PLIST = Custom-Info.plist - CONFIG += x86_64 - CONFIG -= x86 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 - QMAKE_MAC_SDK = macosx10.9 ICON = $$BASEDIR/resources/icons/macx.icns QT += quickwidgets } LinuxBuild { - DEFINES += __STDC_LIMIT_MACROS CONFIG += qesp_linux_udev } WindowsBuild { - DEFINES += __STDC_LIMIT_MACROS - - # Specify multi-process compilation within Visual Studio. - # (drastically improves compilation times for multi-core computers) - QMAKE_CXXFLAGS_DEBUG += -MP - QMAKE_CXXFLAGS_RELEASE += -MP - RC_FILE = $$BASEDIR/qgroundcontrol.rc } -# -# By default warnings as errors are turned off. Even so, in order for a pull request -# to be accepted you must compile cleanly with warnings as errors turned on the default -# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details. -# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your -# own builds. -# - -MacBuild | LinuxBuild { - QMAKE_CXXFLAGS_WARN_ON += -Wall - WarningsAsErrorsOn { - QMAKE_CXXFLAGS_WARN_ON += -Werror - } -} - -WindowsBuild { - QMAKE_CXXFLAGS_WARN_ON += /W3 \ - /wd4996 \ # silence warnings about deprecated strcpy and whatnot - /wd4005 \ # silence warnings about macro redefinition - /wd4290 \ # ignore exception specifications - /Zc:strictStrings- # work around win 8.1 sdk sapi.h problem - WarningsAsErrorsOn { - QMAKE_CXXFLAGS_WARN_ON += /WX - } -} - # # Build-specific settings # @@ -232,16 +118,6 @@ DebugBuild { CONFIG += console } -ReleaseBuild { - DEFINES += QT_NO_DEBUG - - WindowsBuild { - # Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure) - QMAKE_LFLAGS_LTCG = /LTCG - QMAKE_CFLAGS_LTCG = -GL - } -} - # qextserialport should not be used by general QGroundControl code. Use QSerialPort instead. This is only # here to support special case Firmware Upgrade code. include(libs/qextserialport/src/qextserialport.pri) @@ -270,10 +146,6 @@ include(QGCInstaller.pri) RESOURCES += qgroundcontrol.qrc -TRANSLATIONS += \ - es-MX.ts \ - en-US.ts - DEPENDPATH += \ . \ plugins @@ -678,8 +550,6 @@ SOURCES += \ DebugBuild|WindowsDebugAndRelease { -DEFINES += UNITTEST_BUILD - INCLUDEPATH += \ src/qgcunittest diff --git a/QGCCommon.pri b/QGCCommon.pri new file mode 100644 index 000000000..1251903f1 --- /dev/null +++ b/QGCCommon.pri @@ -0,0 +1,184 @@ +# ------------------------------------------------- +# QGroundControl - Micro Air Vehicle Groundstation +# Please see our website at +# Maintainer: +# Lorenz Meier +# (c) 2009-2014 QGroundControl Developers +# This file is part of the open groundstation project +# QGroundControl is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# QGroundControl is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with QGroundControl. If not, see . +# ------------------------------------------------- + +# +# This file contains configuration settings which are common to both the QGC Application and +# the Location Plugin. It should mainly contains intial CONFIG tag setup and compiler settings. +# + +# Setup our supported build types. We do this once here and then use the defined config scopes +# to allow us to easily modify suported build types in one place instead of duplicated throughout +# the project file. + +linux { + linux-g++ | linux-g++-64 { + message("Linux build") + CONFIG += LinuxBuild + } else { + error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported") + } +} else : win32 { + win32-msvc2010 | win32-msvc2012 | win32-msvc2013 { + message("Windows build") + CONFIG += WindowsBuild + } else { + error("Unsupported Windows toolchain, only Visual Studio 2010, 2012, and 2013 are supported") + } +} else : macx { + macx-clang | macx-llvm { + message("Mac build") + CONFIG += MacBuild + QMAKE_CXXFLAGS += -fvisibility=hidden + } else { + error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported") + } +} else { + error("Unsupported build platform, only Linux, Windows, and Mac are supported") +} + +# Installer configuration + +installer { + CONFIG -= debug + CONFIG -= debug_and_release + CONFIG += release + message(Build Installer) +} + +# Setup our supported build flavors + +CONFIG(debug, debug|release) { + message(Debug flavor) + CONFIG += DebugBuild +} else:CONFIG(release, debug|release) { + message(Release flavor) + CONFIG += ReleaseBuild +} else { + error(Unsupported build flavor) +} + +# Need to special case Windows debug_and_release since VS Project creation in this case does strange things [QTBUG-40351] +win32:debug_and_release { + CONFIG += WindowsDebugAndRelease +} + +# Setup our build directories + +BASEDIR = $${IN_PWD} + +DebugBuild { + DESTDIR = $${OUT_PWD}/debug + BUILDDIR = $${OUT_PWD}/build-debug +} + +ReleaseBuild { + DESTDIR = $${OUT_PWD}/release + BUILDDIR = $${OUT_PWD}/build-release +} + +LOCATION_PLUGIN_DESTDIR = $${BUILDDIR}/QGCLocationPlugin +LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC + +OBJECTS_DIR = $${BUILDDIR}/obj +MOC_DIR = $${BUILDDIR}/moc +UI_DIR = $${BUILDDIR}/ui +RCC_DIR = $${BUILDDIR}/rcc +LANGUAGE = C++ + +message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET) + +# Turn off serial port warnings +DEFINES += _TTY_NOWARN_ + +# +# OS Specific settings +# + +MacBuild { + CONFIG += x86_64 + CONFIG -= x86 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + QMAKE_MAC_SDK = macosx10.9 +} + +LinuxBuild { + DEFINES += __STDC_LIMIT_MACROS +} + +WindowsBuild { + DEFINES += __STDC_LIMIT_MACROS + + # Specify multi-process compilation within Visual Studio. + # (drastically improves compilation times for multi-core computers) + QMAKE_CXXFLAGS_DEBUG += -MP + QMAKE_CXXFLAGS_RELEASE += -MP +} + +# +# By default warnings as errors are turned off. Even so, in order for a pull request +# to be accepted you must compile cleanly with warnings as errors turned on the default +# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details. +# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your +# own builds. +# + +MacBuild | LinuxBuild { + QMAKE_CXXFLAGS_WARN_ON += -Wall + WarningsAsErrorsOn { + QMAKE_CXXFLAGS_WARN_ON += -Werror + } +} + +WindowsBuild { + QMAKE_CXXFLAGS_WARN_ON += /W3 \ + /wd4996 \ # silence warnings about deprecated strcpy and whatnot + /wd4005 \ # silence warnings about macro redefinition + /wd4290 \ # ignore exception specifications + /Zc:strictStrings- # work around win 8.1 sdk sapi.h problem + WarningsAsErrorsOn { + QMAKE_CXXFLAGS_WARN_ON += /WX + } +} + +# +# Build-specific settings +# + +ReleaseBuild { + DEFINES += QT_NO_DEBUG + + WindowsBuild { + # Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure) + QMAKE_LFLAGS_LTCG = /LTCG + QMAKE_CFLAGS_LTCG = -GL + } +} + +# +# Unit Test specific configuration goes here +# +# We have to special case Windows debug_and_release builds because you can't have files +# which are only in the debug variant [QTBUG-40351]. So in this case we include unit tests +# even in the release variant. If you want a Windows release build with no unit tests run +# qmake with CONFIG-=debug_and_release CONFIG+=release. +# + +DebugBuild|WindowsDebugAndRelease { + DEFINES += UNITTEST_BUILD +} diff --git a/QGCLocationPlugin.pro b/QGCLocationPlugin.pro new file mode 100644 index 000000000..fb2f761e5 --- /dev/null +++ b/QGCLocationPlugin.pro @@ -0,0 +1,33 @@ +include(QGCCommon.pri) + +TEMPLATE = lib +TARGET = $$qtLibraryTarget(QGeoServiceProviderFactoryQGC) +CONFIG += plugin static +QT += location-private positioning-private network +PLUGIN_TYPE = geoservices + +DESTDIR = $${LOCATION_PLUGIN_DESTDIR} + +INCLUDEPATH += $$QT.location.includes + +HEADERS += \ + src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h \ + src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h \ + src/QtLocationPlugin/qgeotilefetcherqgc.h \ + src/QtLocationPlugin/qgeomapreplyqgc.h \ + src/QtLocationPlugin/qgeocodingmanagerengineqgc.h \ + src/QtLocationPlugin/qgeocodereplyqgc.h \ + src/QtLocationPlugin/OpenPilotMaps.h + +SOURCES += \ + src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp \ + src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp \ + src/QtLocationPlugin/qgeotilefetcherqgc.cpp \ + src/QtLocationPlugin/qgeomapreplyqgc.cpp \ + src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp \ + src/QtLocationPlugin/qgeocodereplyqgc.cpp \ + src/QtLocationPlugin/OpenPilotMaps.cc + +OTHER_FILES += \ + src/QtLocationPlugin/qgc_maps_plugin.json + diff --git a/libs/QtLocationQGC/.qmake.conf b/libs/QtLocationQGC/.qmake.conf deleted file mode 100644 index 42a8dd996..000000000 --- a/libs/QtLocationQGC/.qmake.conf +++ /dev/null @@ -1,3 +0,0 @@ -load(qt_build_config) - -MODULE_VERSION = 5.4.1 diff --git a/libs/QtLocationQGC/QtLocationQGC.pro b/libs/QtLocationQGC/QtLocationQGC.pro deleted file mode 100644 index 770486846..000000000 --- a/libs/QtLocationQGC/QtLocationQGC.pro +++ /dev/null @@ -1,32 +0,0 @@ -TARGET = qtgeoservices_qgc -CONFIG += static -QT += location-private positioning-private network -PLUGIN_TYPE = geoservices - -PLUGIN_CLASS_NAME = QGeoServiceProviderFactoryQGC - -load(qt_plugin) - -INCLUDEPATH += $$QT.location.includes - -HEADERS += \ - $$PWD/src/qgeoserviceproviderpluginqgc.h \ - $$PWD/src/qgeotiledmappingmanagerengineqgc.h \ - $$PWD/src/qgeotilefetcherqgc.h \ - $$PWD/src/qgeomapreplyqgc.h \ - $$PWD/src/qgeocodingmanagerengineqgc.h \ - $$PWD/src/qgeocodereplyqgc.h \ - $$PWD/src/OpenPilotMaps.h - -SOURCES += \ - $$PWD/src/qgeoserviceproviderpluginqgc.cpp \ - $$PWD/src/qgeotiledmappingmanagerengineqgc.cpp \ - $$PWD/src/qgeotilefetcherqgc.cpp \ - $$PWD/src/qgeomapreplyqgc.cpp \ - $$PWD/src/qgeocodingmanagerengineqgc.cpp \ - $$PWD/src/qgeocodereplyqgc.cpp \ - $$PWD/src/OpenPilotMaps.cc - -OTHER_FILES += \ - $$PWD/qgc_maps_plugin.json - diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index aad09965e..6928aadf9 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -19,8 +19,14 @@ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS = libs/QtLocationQGC -SUBDIRS += ./qgcsystem.pro +SUBDIRS = ./QGCLocationPlugin.pro +SUBDIRS += ./QGCApplication.pro -qgcsystem.depends = QtLocationQGC +QGCApplication.depends = QGCLocationPlugin + +message(Qt version $$[QT_VERSION]) + +!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 3) { + error("Unsupported Qt version, 5.4+ is required") +} diff --git a/libs/QtLocationQGC/src/OpenPilotMaps.cc b/src/QtLocationPlugin/OpenPilotMaps.cc similarity index 100% rename from libs/QtLocationQGC/src/OpenPilotMaps.cc rename to src/QtLocationPlugin/OpenPilotMaps.cc diff --git a/libs/QtLocationQGC/src/OpenPilotMaps.h b/src/QtLocationPlugin/OpenPilotMaps.h similarity index 100% rename from libs/QtLocationQGC/src/OpenPilotMaps.h rename to src/QtLocationPlugin/OpenPilotMaps.h diff --git a/libs/QtLocationQGC/qgc_maps_plugin.json b/src/QtLocationPlugin/qgc_maps_plugin.json similarity index 100% rename from libs/QtLocationQGC/qgc_maps_plugin.json rename to src/QtLocationPlugin/qgc_maps_plugin.json diff --git a/libs/QtLocationQGC/src/qgeocodereplyqgc.cpp b/src/QtLocationPlugin/qgeocodereplyqgc.cpp similarity index 99% rename from libs/QtLocationQGC/src/qgeocodereplyqgc.cpp rename to src/QtLocationPlugin/qgeocodereplyqgc.cpp index de948eeea..3c0348faa 100644 --- a/libs/QtLocationQGC/src/qgeocodereplyqgc.cpp +++ b/src/QtLocationPlugin/qgeocodereplyqgc.cpp @@ -51,12 +51,9 @@ #include #include #include -#include #include "qgeocodereplyqgc.h" -QT_BEGIN_NAMESPACE - enum QGeoCodeTypeGoogle { GeoCodeTypeUnknown, StreetAddress, // indicates a precise street address. @@ -297,5 +294,3 @@ void QGeoCodeReplyQGC::networkReplyError(QNetworkReply::NetworkError error) m_reply->deleteLater(); m_reply = 0; } - -QT_END_NAMESPACE diff --git a/libs/QtLocationQGC/src/qgeocodereplyqgc.h b/src/QtLocationPlugin/qgeocodereplyqgc.h similarity index 98% rename from libs/QtLocationQGC/src/qgeocodereplyqgc.h rename to src/QtLocationPlugin/qgeocodereplyqgc.h index 1c4d483a9..b53b1726c 100644 --- a/libs/QtLocationQGC/src/qgeocodereplyqgc.h +++ b/src/QtLocationPlugin/qgeocodereplyqgc.h @@ -50,8 +50,6 @@ #include #include -QT_BEGIN_NAMESPACE - class QGeoCodeReplyQGC : public QGeoCodeReply { Q_OBJECT @@ -70,6 +68,4 @@ private: QNetworkReply *m_reply; }; -QT_END_NAMESPACE - #endif // QGEOCODEREPLYGOOGLE_H diff --git a/libs/QtLocationQGC/src/qgeocodingmanagerengineqgc.cpp b/src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp similarity index 99% rename from libs/QtLocationQGC/src/qgeocodingmanagerengineqgc.cpp rename to src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp index 568804309..59f7fdd43 100644 --- a/libs/QtLocationQGC/src/qgeocodingmanagerengineqgc.cpp +++ b/src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp @@ -58,8 +58,6 @@ #include "qgeocodingmanagerengineqgc.h" #include "qgeocodereplyqgc.h" -QT_BEGIN_NAMESPACE - static QString addressToQuery(const QGeoAddress &address) { return address.street() + QStringLiteral(", ") + @@ -177,5 +175,3 @@ void QGeoCodingManagerEngineQGC::replyError(QGeoCodeReply::Error errorCode, cons if (reply) emit error(reply, errorCode, errorString); } - -QT_END_NAMESPACE diff --git a/libs/QtLocationQGC/src/qgeocodingmanagerengineqgc.h b/src/QtLocationPlugin/qgeocodingmanagerengineqgc.h similarity index 100% rename from libs/QtLocationQGC/src/qgeocodingmanagerengineqgc.h rename to src/QtLocationPlugin/qgeocodingmanagerengineqgc.h diff --git a/libs/QtLocationQGC/src/qgeomapreplyqgc.cpp b/src/QtLocationPlugin/qgeomapreplyqgc.cpp similarity index 100% rename from libs/QtLocationQGC/src/qgeomapreplyqgc.cpp rename to src/QtLocationPlugin/qgeomapreplyqgc.cpp diff --git a/libs/QtLocationQGC/src/qgeomapreplyqgc.h b/src/QtLocationPlugin/qgeomapreplyqgc.h similarity index 98% rename from libs/QtLocationQGC/src/qgeomapreplyqgc.h rename to src/QtLocationPlugin/qgeomapreplyqgc.h index 33364ee39..90d85583c 100644 --- a/libs/QtLocationQGC/src/qgeomapreplyqgc.h +++ b/src/QtLocationPlugin/qgeomapreplyqgc.h @@ -50,8 +50,6 @@ #include #include -QT_BEGIN_NAMESPACE - class QGeoMapReplyQGC : public QGeoTiledMapReply { Q_OBJECT @@ -73,6 +71,4 @@ private: QNetworkReply* m_reply; }; -QT_END_NAMESPACE - #endif // QGEOMAPREPLYGOOGLE_H diff --git a/libs/QtLocationQGC/src/qgeoserviceproviderpluginqgc.cpp b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp similarity index 98% rename from libs/QtLocationQGC/src/qgeoserviceproviderpluginqgc.cpp rename to src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp index 19aacae51..446ea2f9a 100644 --- a/libs/QtLocationQGC/src/qgeoserviceproviderpluginqgc.cpp +++ b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.cpp @@ -51,8 +51,6 @@ #include "qgeotiledmappingmanagerengineqgc.h" #include "qgeocodingmanagerengineqgc.h" -QT_BEGIN_NAMESPACE - QGeoCodingManagerEngine *QGeoServiceProviderFactoryQGC::createGeocodingManagerEngine( const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const { @@ -78,5 +76,3 @@ QPlaceManagerEngine *QGeoServiceProviderFactoryQGC::createPlaceManagerEngine( // Not implemented for QGC return NULL; } - -QT_END_NAMESPACE diff --git a/libs/QtLocationQGC/src/qgeoserviceproviderpluginqgc.h b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h similarity index 98% rename from libs/QtLocationQGC/src/qgeoserviceproviderpluginqgc.h rename to src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h index b4548dc37..a4d86e8fe 100644 --- a/libs/QtLocationQGC/src/qgeoserviceproviderpluginqgc.h +++ b/src/QtLocationPlugin/qgeoserviceproviderpluginqgc.h @@ -49,8 +49,7 @@ #include #include - -QT_BEGIN_NAMESPACE +#include class QGeoServiceProviderFactoryQGC: public QObject, public QGeoServiceProviderFactory { @@ -65,6 +64,4 @@ public: QPlaceManagerEngine* createPlaceManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; }; -QT_END_NAMESPACE - #endif // QGEOSERVICEPROVIDER_GOOGLE_H diff --git a/libs/QtLocationQGC/src/qgeotiledmappingmanagerengineqgc.cpp b/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp similarity index 99% rename from libs/QtLocationQGC/src/qgeotiledmappingmanagerengineqgc.cpp rename to src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp index b46e9ea52..ae5cd8565 100644 --- a/libs/QtLocationQGC/src/qgeotiledmappingmanagerengineqgc.cpp +++ b/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp @@ -54,8 +54,6 @@ #include "qgeotilefetcherqgc.h" #include "OpenPilotMaps.h" -QT_BEGIN_NAMESPACE - QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) : QGeoTiledMappingManagerEngine() { @@ -162,5 +160,3 @@ QGeoMapData *QGeoTiledMappingManagerEngineQGC::createMapData() { return new QGeoTiledMapData(this, 0); } - -QT_END_NAMESPACE diff --git a/libs/QtLocationQGC/src/qgeotiledmappingmanagerengineqgc.h b/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h similarity index 98% rename from libs/QtLocationQGC/src/qgeotiledmappingmanagerengineqgc.h rename to src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h index 7e07bd996..0bee02cd4 100644 --- a/libs/QtLocationQGC/src/qgeotiledmappingmanagerengineqgc.h +++ b/src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h @@ -50,8 +50,6 @@ #include #include -QT_BEGIN_NAMESPACE - class QGeoTiledMappingManagerEngineQGC : public QGeoTiledMappingManagerEngine { Q_OBJECT @@ -61,6 +59,4 @@ public: QGeoMapData *createMapData(); }; -QT_END_NAMESPACE - #endif // QGEOTILEDMAPPINGMANAGERENGINEGOOGLE_H diff --git a/libs/QtLocationQGC/src/qgeotilefetcherqgc.cpp b/src/QtLocationPlugin/qgeotilefetcherqgc.cpp similarity index 99% rename from libs/QtLocationQGC/src/qgeotilefetcherqgc.cpp rename to src/QtLocationPlugin/qgeotilefetcherqgc.cpp index 7dbf880d8..2aaa3a117 100644 --- a/libs/QtLocationQGC/src/qgeotilefetcherqgc.cpp +++ b/src/QtLocationPlugin/qgeotilefetcherqgc.cpp @@ -52,8 +52,6 @@ #include "qgeotilefetcherqgc.h" #include "qgeomapreplyqgc.h" -QT_BEGIN_NAMESPACE - QGeoTileFetcherQGC::QGeoTileFetcherQGC(QGeoTiledMappingManagerEngine *parent) : QGeoTileFetcher(parent) , m_networkManager(new QNetworkAccessManager(this)) @@ -146,5 +144,3 @@ QGeoTiledMapReply *QGeoTileFetcherQGC::getTileImage(const QGeoTileSpec &spec) return new QGeoMapReplyQGC(reply, spec); } - -QT_END_NAMESPACE diff --git a/libs/QtLocationQGC/src/qgeotilefetcherqgc.h b/src/QtLocationPlugin/qgeotilefetcherqgc.h similarity index 98% rename from libs/QtLocationQGC/src/qgeotilefetcherqgc.h rename to src/QtLocationPlugin/qgeotilefetcherqgc.h index 98094b93c..be6d6829a 100644 --- a/libs/QtLocationQGC/src/qgeotilefetcherqgc.h +++ b/src/QtLocationPlugin/qgeotilefetcherqgc.h @@ -51,8 +51,6 @@ #include #include "OpenPilotMaps.h" -QT_BEGIN_NAMESPACE - class QGeoTiledMappingManagerEngine; class QNetworkAccessManager; @@ -73,6 +71,4 @@ private: QString m_Language; }; -QT_END_NAMESPACE - #endif // QGEOTILEFETCHERGOOGLE_H -- 2.22.0