diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/positioning/locationsingleton.cpp | 2 | ||||
-rw-r--r-- | src/imports/positioning/positioning.cpp | 8 | ||||
-rw-r--r-- | src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp | 4 | ||||
-rw-r--r-- | src/plugins/position/gypsy/qgeopositioninfosourcefactory_gypsy.h | 6 | ||||
-rw-r--r-- | src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h | 10 | ||||
-rw-r--r-- | src/plugins/position/simulator/qlocationconnection_simulator.cpp | 1 | ||||
-rw-r--r-- | src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp | 2 | ||||
-rw-r--r-- | src/positioning/qgeocoordinate.cpp | 26 | ||||
-rw-r--r-- | src/positioning/qgeosatelliteinfo_p.h | 11 | ||||
-rw-r--r-- | src/positioning/qlocationdata_simulator.cpp | 7 | ||||
-rw-r--r-- | src/positioning/qlocationdata_simulator_p.h | 1 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativepositionsource.cpp | 8 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativepositionsource_p.h | 4 | ||||
-rw-r--r-- | src/src.pro | 42 |
14 files changed, 60 insertions, 72 deletions
diff --git a/src/imports/positioning/locationsingleton.cpp b/src/imports/positioning/locationsingleton.cpp index 132c7a22..77408368 100644 --- a/src/imports/positioning/locationsingleton.cpp +++ b/src/imports/positioning/locationsingleton.cpp @@ -293,7 +293,7 @@ QGeoPolygon LocationSingleton::polygon(const QVariantList &perimeter, const QVar QGeoPolygon poly(internalCoordinates); for (int i = 0; i < holes.size(); i++) { - if (holes.at(i).type() == QVariant::List) { + if (holes.at(i).metaType().id() == QMetaType::QVariantList) { QList<QGeoCoordinate> hole; const QVariantList &holeData = holes.at(i).toList(); for (int j = 0; j < holeData.size(); j++) { diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp index 83fd0a42..2940e307 100644 --- a/src/imports/positioning/positioning.cpp +++ b/src/imports/positioning/positioning.cpp @@ -576,29 +576,21 @@ public: int minor = 0; qRegisterMetaType<QGeoCoordinate>(); - QMetaType::registerEqualsComparator<QGeoCoordinate>(); qRegisterMetaType<QGeoAddress>(); qRegisterMetaType<QGeoRectangle>(); - QMetaType::registerEqualsComparator<QGeoRectangle>(); qRegisterMetaType<QGeoCircle>(); - QMetaType::registerEqualsComparator<QGeoCircle>(); qRegisterMetaType<QGeoPath>(); - QMetaType::registerEqualsComparator<QGeoPath>(); qRegisterMetaType<QGeoPolygon>(); - QMetaType::registerEqualsComparator<QGeoPolygon>(); qRegisterMetaType<QGeoLocation>(); qRegisterMetaType<QGeoShape>(); - QMetaType::registerEqualsComparator<QGeoShape>(); qRegisterMetaType<QGeoCoordinateObject *>(); qRegisterMetaType<QGeoPositionInfo>(); - QMetaType::registerEqualsComparator<QGeoPositionInfo>(); qRegisterAnimationInterpolator<QGeoCoordinate>(q_coordinateInterpolator); // Register the 5.0 types // 5.0 is silent and not advertised qmlRegisterSingletonType<LocationSingleton >(uri, major, minor, "QtPositioning", singleton_type_factory); - qmlRegisterValueTypeEnums<QGeoShape >(uri, major, minor, "GeoShape"); qmlRegisterType<QDeclarativePosition >(uri, major, minor, "Position"); qmlRegisterType<QDeclarativePositionSource >(uri, major, minor, "PositionSource"); qmlRegisterType<QDeclarativeGeoAddress >(uri, major, minor, "Address"); diff --git a/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp index 9ad20ace..bc1f8d7d 100644 --- a/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp +++ b/src/plugins/position/geoclue/qgeosatelliteinfosource_geocluemaster.cpp @@ -156,13 +156,13 @@ void QGeoSatelliteInfoSourceGeoclueMaster::updateSatelliteInfo(int timestamp, in inUse.append(si); if (satInfos.length() != satellitesVisible) { - qWarning("QGeoSatelliteInfoSourceGeoclueMaster number of in view QGeoSatelliteInfos (%d) " + qWarning("QGeoSatelliteInfoSourceGeoclueMaster number of in view QGeoSatelliteInfos (%lld) " "does not match expected number of in view satellites (%d).", satInfos.length(), satellitesVisible); } if (inUse.length() != satellitesUsed) { - qWarning("QGeoSatelliteInfoSourceGeoclueMaster number of in use QGeoSatelliteInfos (%d) " + qWarning("QGeoSatelliteInfoSourceGeoclueMaster number of in use QGeoSatelliteInfos (%lld) " "does not match expected number of in use satellites (%d).", inUse.length(), satellitesUsed); } diff --git a/src/plugins/position/gypsy/qgeopositioninfosourcefactory_gypsy.h b/src/plugins/position/gypsy/qgeopositioninfosourcefactory_gypsy.h index fa188221..32e9051a 100644 --- a/src/plugins/position/gypsy/qgeopositioninfosourcefactory_gypsy.h +++ b/src/plugins/position/gypsy/qgeopositioninfosourcefactory_gypsy.h @@ -51,9 +51,9 @@ class QGeoPositionInfoSourceFactoryGypsy : public QObject, public QGeoPositionIn Q_INTERFACES(QGeoPositionInfoSourceFactory) public: - QGeoPositionInfoSource *positionInfoSource(QObject *parent); - QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent); - QGeoAreaMonitorSource *areaMonitor(QObject *parent); + QGeoPositionInfoSource *positionInfoSource(QObject *parent) override; + QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent) override; + QGeoAreaMonitorSource *areaMonitor(QObject *parent) override; }; #endif diff --git a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h index ea6b6bcb..c28ca3a1 100644 --- a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h +++ b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h @@ -105,13 +105,13 @@ public: ~QGeoSatelliteInfoSourceGypsy(); int init(); - int minimumUpdateInterval() const; - Error error() const; + int minimumUpdateInterval() const override; + Error error() const override; public slots: - virtual void startUpdates(); - void stopUpdates(); - void requestUpdate(int timeout = 5000); + virtual void startUpdates() override; + void stopUpdates() override; + void requestUpdate(int timeout = 5000) override; void satellitesChanged(GypsySatellite *satellite, GPtrArray *satellites); signals: diff --git a/src/plugins/position/simulator/qlocationconnection_simulator.cpp b/src/plugins/position/simulator/qlocationconnection_simulator.cpp index 4835a9af..d5b3e820 100644 --- a/src/plugins/position/simulator/qlocationconnection_simulator.cpp +++ b/src/plugins/position/simulator/qlocationconnection_simulator.cpp @@ -62,7 +62,6 @@ namespace Simulator LocationConnection::LocationConnection() : mConnection(new Connection(Connection::Client, simulatorName, simulatorPort, Version(1,3,0,0))) { - qt_registerLocationTypes(); mWorker = mConnection->connectToServer(Connection::simulatorHostName(true), simulatorPort); if (!mWorker) return; diff --git a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp index 28a405c3..b326db89 100644 --- a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp +++ b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp @@ -37,7 +37,7 @@ #include "qgeopositioninfosource_winrt_p.h" #include <QtCore/qcoreapplication.h> -#include <QtCore/qfunctions_winrt.h> +#include <QtCore/private/qfunctions_winrt_p.h> #include <QtCore/qloggingcategory.h> #include <QtCore/qmutex.h> #ifdef Q_OS_WINRT diff --git a/src/positioning/qgeocoordinate.cpp b/src/positioning/qgeocoordinate.cpp index 5ff1299d..34185889 100644 --- a/src/positioning/qgeocoordinate.cpp +++ b/src/positioning/qgeocoordinate.cpp @@ -51,21 +51,6 @@ QT_BEGIN_NAMESPACE -struct CoordinateStreamOperators -{ - CoordinateStreamOperators() - { -#ifndef QT_NO_DATASTREAM - qRegisterMetaTypeStreamOperators<QGeoCoordinate>(); -#endif -#ifndef QT_NO_DEBUG_STREAM - QMetaType::registerDebugStreamOperator<QGeoCoordinate>(); -#endif - } -}; -Q_GLOBAL_STATIC(CoordinateStreamOperators, initStreamOperators); - - static const double qgeocoordinate_EARTH_MEAN_RADIUS = 6371.0072; @@ -218,9 +203,6 @@ QGeoMercatorCoordinatePrivate::~QGeoMercatorCoordinatePrivate() QGeoCoordinate::QGeoCoordinate() : d(new QGeoCoordinatePrivate) { -#ifndef QT_NO_DATASTREAM - initStreamOperators(); -#endif } /*! @@ -235,10 +217,6 @@ QGeoCoordinate::QGeoCoordinate() QGeoCoordinate::QGeoCoordinate(double latitude, double longitude) : d(new QGeoCoordinatePrivate) { -#ifndef QT_NO_DATASTREAM - initStreamOperators(); -#endif - if (QLocationUtils::isValidLat(latitude) && QLocationUtils::isValidLong(longitude)) { d->lat = latitude; d->lng = longitude; @@ -260,10 +238,6 @@ QGeoCoordinate::QGeoCoordinate(double latitude, double longitude) QGeoCoordinate::QGeoCoordinate(double latitude, double longitude, double altitude) : d(new QGeoCoordinatePrivate) { -#ifndef QT_NO_DATASTREAM - initStreamOperators(); -#endif - if (QLocationUtils::isValidLat(latitude) && QLocationUtils::isValidLong(longitude)) { d->lat = latitude; d->lng = longitude; diff --git a/src/positioning/qgeosatelliteinfo_p.h b/src/positioning/qgeosatelliteinfo_p.h index 6320bf2e..2818f781 100644 --- a/src/positioning/qgeosatelliteinfo_p.h +++ b/src/positioning/qgeosatelliteinfo_p.h @@ -40,6 +40,17 @@ #ifndef QGEOSATELLITEINFO_P_H #define QGEOSATELLITEINFO_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtPositioning/private/qpositioningglobal_p.h> #include <QtPositioning/qgeosatelliteinfo.h> #include <QHash> diff --git a/src/positioning/qlocationdata_simulator.cpp b/src/positioning/qlocationdata_simulator.cpp index 3045b868..245288fe 100644 --- a/src/positioning/qlocationdata_simulator.cpp +++ b/src/positioning/qlocationdata_simulator.cpp @@ -65,13 +65,6 @@ QGeoSatelliteInfoData::SatelliteInfo::SatelliteInfo() satelliteSystem(Undefined), satelliteIdentifier(0) {} -void qt_registerLocationTypes() -{ - qRegisterMetaTypeStreamOperators<QGeoPositionInfoData>("QGeoPositionInfoData"); - qRegisterMetaTypeStreamOperators<QGeoSatelliteInfoData>("QGeoSatelliteInfoData"); - qRegisterMetaTypeStreamOperators<QGeoSatelliteInfoData::SatelliteInfo>("QGeoSatelliteInfoData::SatelliteInfo"); -} - QDataStream &operator<<(QDataStream &out, const QGeoPositionInfoData &s) { out << s.latitude << s.longitude << s.altitude; diff --git a/src/positioning/qlocationdata_simulator_p.h b/src/positioning/qlocationdata_simulator_p.h index 47f3acf7..32d8ce24 100644 --- a/src/positioning/qlocationdata_simulator_p.h +++ b/src/positioning/qlocationdata_simulator_p.h @@ -117,7 +117,6 @@ struct Q_POSITIONING_PRIVATE_EXPORT QGeoSatelliteInfoData QList<SatelliteInfo> satellites; }; -Q_POSITIONING_PRIVATE_EXPORT void qt_registerLocationTypes(); Q_POSITIONING_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &out, const QGeoPositionInfoData &s); Q_POSITIONING_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &in, QGeoPositionInfoData &s); Q_POSITIONING_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &out, const QGeoSatelliteInfoData &s); diff --git a/src/positioningquick/qdeclarativepositionsource.cpp b/src/positioningquick/qdeclarativepositionsource.cpp index cf160541..f0f0b97b 100644 --- a/src/positioningquick/qdeclarativepositionsource.cpp +++ b/src/positioningquick/qdeclarativepositionsource.cpp @@ -298,7 +298,7 @@ void QDeclarativePositionSource::setNmeaSource(const QUrl &nmeaSource) } else if (localFileName.startsWith(QStringLiteral("qrc:/"))) { localFileName.remove(0, 5); } - if (!QFile::exists(localFileName) && localFileName.startsWith('/')) { + if (!QFile::exists(localFileName) && localFileName.startsWith(QLatin1Char('/'))) { localFileName.remove(0,1); } } @@ -320,7 +320,7 @@ void QDeclarativePositionSource::setNmeaSource(const QUrl &nmeaSource) delete m_nmeaFile; m_nmeaFile = new QFile(localFileName); if (!m_nmeaFile->exists()) { - localFileName.prepend(':'); + localFileName.prepend(QLatin1Char(':')); m_nmeaFile->setFileName(localFileName); } if (m_nmeaFile->exists()) { @@ -822,7 +822,7 @@ void QDeclarativePositionSource::parameter_append(QQmlListProperty<QDeclarativeP /*! \internal */ -int QDeclarativePositionSource::parameter_count(QQmlListProperty<QDeclarativePluginParameter> *prop) +qsizetype QDeclarativePositionSource::parameter_count(QQmlListProperty<QDeclarativePluginParameter> *prop) { return static_cast<QDeclarativePositionSource *>(prop->object)->m_parameters.count(); } @@ -830,7 +830,7 @@ int QDeclarativePositionSource::parameter_count(QQmlListProperty<QDeclarativePlu /*! \internal */ -QDeclarativePluginParameter *QDeclarativePositionSource::parameter_at(QQmlListProperty<QDeclarativePluginParameter> *prop, int index) +QDeclarativePluginParameter *QDeclarativePositionSource::parameter_at(QQmlListProperty<QDeclarativePluginParameter> *prop, qsizetype index) { return static_cast<QDeclarativePositionSource *>(prop->object)->m_parameters[index]; } diff --git a/src/positioningquick/qdeclarativepositionsource_p.h b/src/positioningquick/qdeclarativepositionsource_p.h index 97808ba4..aadb8772 100644 --- a/src/positioningquick/qdeclarativepositionsource_p.h +++ b/src/positioningquick/qdeclarativepositionsource_p.h @@ -166,8 +166,8 @@ private: void tryAttach(const QString &name, bool useFallback = true); static void parameter_append(QQmlListProperty<QDeclarativePluginParameter> *prop, QDeclarativePluginParameter *mapObject); - static int parameter_count(QQmlListProperty<QDeclarativePluginParameter> *prop); - static QDeclarativePluginParameter *parameter_at(QQmlListProperty<QDeclarativePluginParameter> *prop, int index); + static qsizetype parameter_count(QQmlListProperty<QDeclarativePluginParameter> *prop); + static QDeclarativePluginParameter *parameter_at(QQmlListProperty<QDeclarativePluginParameter> *prop, qsizetype index); static void parameter_clear(QQmlListProperty<QDeclarativePluginParameter> *prop); QGeoPositionInfoSource *m_positionSource; diff --git a/src/src.pro b/src/src.pro index 417e2272..822a5d3e 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,7 +1,12 @@ TEMPLATE = subdirs -QT_FOR_CONFIG += location-private -include($$OUT_PWD/location/qtlocation-config.pri) +# This variable is introduced to skip QtLocation build during migration to Qt6 +SKIP_QT_LOCATION = TRUE + +!defined(SKIP_QT_LOCATION, var) { + QT_FOR_CONFIG += location-private + include($$OUT_PWD/location/qtlocation-config.pri) +} include($$OUT_PWD/positioning/qtpositioning-config.pri) clip2tri.subdir = 3rdparty/clip2tri @@ -15,14 +20,27 @@ SUBDIRS += positioning positioning.depends = clip2tri qtHaveModule(quick) { - SUBDIRS += positioningquick location + defined(SKIP_QT_LOCATION, var) { + SUBDIRS += positioningquick + } else { + SUBDIRS += positioningquick location + } + positioningquick.depends += positioning - location.depends += positioningquick clip2tri - plugins.depends += location + !defined(SKIP_QT_LOCATION, var) { + location.depends += positioningquick clip2tri + + plugins.depends += location + } SUBDIRS += imports - imports.depends += positioningquick positioning location + + defined(SKIP_QT_LOCATION, var) { + imports.depends += positioningquick positioning + } else { + imports.depends += positioningquick positioning location + } } plugins.depends += positioning SUBDIRS += plugins @@ -34,11 +52,13 @@ SUBDIRS += plugins #plugin dependency required during static builds positioning_doc_snippets.depends = positioning plugins - qtHaveModule(quick) { - SUBDIRS += location_doc_snippets - location_doc_snippets.subdir = location/doc/snippets + !defined(SKIP_QT_LOCATION, var) { + qtHaveModule(quick) { + SUBDIRS += location_doc_snippets + location_doc_snippets.subdir = location/doc/snippets - #plugin dependency required during static builds - location_doc_snippets.depends = location plugins + #plugin dependency required during static builds + location_doc_snippets.depends = location plugins + } } } |