From a467eadd46bec7a66e2e97bc4fd3a5271430bc93 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 8 Nov 2019 23:57:52 +0100 Subject: Doc: Fix documentation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix missing/incorrect parameter documentation, linking warnings, and \instantiates references to undocumented/internal classes. Remove mention of Navigator::currentRoute, as such a property no longer exists. Fixes: QTBUG-79811 Change-Id: I048a13109aa19f3db75e76611473d60a2396f028 Reviewed-by: Topi Reiniƶ Reviewed-by: Paul Wicking --- src/imports/positioning/locationsingleton.cpp | 2 +- .../declarativemaps/qdeclarativegeoroutemodel.cpp | 22 +++++++++++++--------- .../qdeclarativegeoserviceprovider.cpp | 4 ++-- src/location/doc/qtlocation.qdocconf | 2 +- src/location/labs/qdeclarativenavigator.cpp | 9 ++------- src/location/labs/qgeojson.cpp | 14 +++++++------- src/positioning/doc/src/qtpositioning-plugins.qdoc | 2 +- src/positioning/doc/src/qtpositioning.qdoc | 2 +- src/positioning/qgeocoordinate.cpp | 2 -- src/positioning/qgeopolygon.cpp | 2 +- src/positioning/qgeopositioninfosourcefactory.cpp | 2 +- .../qdeclarativepluginparameter.cpp | 2 +- 12 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/imports/positioning/locationsingleton.cpp b/src/imports/positioning/locationsingleton.cpp index 5bc848f3..132c7a22 100644 --- a/src/imports/positioning/locationsingleton.cpp +++ b/src/imports/positioning/locationsingleton.cpp @@ -363,7 +363,7 @@ QGeoPolygon LocationSingleton::shapeToPolygon(const QGeoShape &shape) const /*! \qmlmethod coordinate QtPositioning::mercatorToCoord(point mercator) const - Converts a mercator coordinate into a latitude-longitude coordinate. + Converts a \a mercator coordinate into a latitude-longitude coordinate. \sa {coordToMercator} \since 5.12 diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp index bbfa9b57..910e7026 100644 --- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp +++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp @@ -244,7 +244,7 @@ void QDeclarativeGeoRouteModel::cancel() /*! \qmlmethod Route QtLocation::RouteModel::get(int index) - Returns the Route at the specified index \a int. Use the \l count + Returns the Route at the specified \a index. Use the \l count property to check the amount of routes available. The routes are indexed from zero, so the accessible range is 0...(count - 1). @@ -995,7 +995,7 @@ void QDeclarativeGeoRouteQuery::setExcludedAreas(const QJSValue &value) /*! \qmlmethod void QtLocation::RouteQuery::addExcludedArea(georectangle area) - Adds the specified \a georectangle from the excluded areas + Adds the specified georectangle \a area to the excluded areas (areas that the route must not cross). The same area can only be added once. @@ -1200,25 +1200,29 @@ void QDeclarativeGeoRouteQuery::flushWaypoints(QList /*! \qmlmethod void QtLocation::RouteQuery::setFeatureWeight(FeatureType feature, FeatureWeight weight) - Defines the weight (\a FeatureWeight) to associate with a feature - (\a FeatureType) during the planning of a route. + Defines the \a weight to associate with a \a feature during the planning + of a route. Following lists the possible feature weights: \value RouteQuery.NeutralFeatureWeight - The presence or absence of the feature will not affect the planning of the route + The presence or absence of the feature does not affect the planning of the + route \value RouteQuery.PreferFeatureWeight - Routes which contain the feature will be preferred over those that do not + Routes which contain the feature are preferred over those that do not \value RouteQuery.RequireFeatureWeight - Only routes which contain the feature will be considered, otherwise no route will be returned + Only routes which contain the feature are considered, otherwise no + route will be returned \value RouteQuery.AvoidFeatureWeight - Routes which do not contain the feature will be preferred over those that do + Routes which do not contain the feature are preferred over those that + do \value RouteQuery.DisallowFeatureWeight - Only routes which do not contain the feature will be considered, otherwise no route will be returned + Only routes which do not contain the feature are considered, otherwise + no route will be returned \sa featureTypes, resetFeatureWeights, featureWeight diff --git a/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp b/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp index 7810dc74..483a5992 100644 --- a/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp +++ b/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp @@ -42,7 +42,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype Plugin - \instantiates QDeclarativeGeoServiceProvider + //! \instantiates QDeclarativeGeoServiceProvider \inqmlmodule QtLocation \ingroup qml-QtLocation5-common \since QtLocation 5.5 @@ -866,7 +866,7 @@ bool QDeclarativeGeoServiceProviderRequirements::operator == (const QDeclarative /*! \qmltype PluginParameter - \instantiates QDeclarativePluginParameter + //! \instantiates QDeclarativePluginParameter \inqmlmodule QtLocation \ingroup qml-QtLocation5-common \since QtLocation 5.5 diff --git a/src/location/doc/qtlocation.qdocconf b/src/location/doc/qtlocation.qdocconf index e5cf230b..0ffbe4d6 100644 --- a/src/location/doc/qtlocation.qdocconf +++ b/src/location/doc/qtlocation.qdocconf @@ -33,7 +33,7 @@ qhp.QtLocation.subprojects.examples.selectors = fake:example tagfile = ../../../doc/qtlocation/qtlocation.tags -depends += qtcore qtdoc qtgui qtquick qtqml qtnetwork qtpositioning qtquickcontrols qtlinguist +depends += qtcore qtdoc qtgui qtquick qtqml qtnetwork qtpositioning qtquickcontrols qtlinguist qtxmlpatterns headerdirs += .. \ ../../imports/location diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp index a4caca85..69f450f3 100644 --- a/src/location/labs/qdeclarativenavigator.cpp +++ b/src/location/labs/qdeclarativenavigator.cpp @@ -101,15 +101,10 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty Route Qt.labs.location::Navigator::route - This property holds the Route that the navigator is supposed to use + This property holds the Route that the navigator is using to perform the navigation. - \note - This property is not necessarily the same as \l currentRoute. - currentRoute may differ, during routing, for various reasons. - It is reasonable to assume, however, that currentRoute's destination - will be the same as route's destination. - Setting this property while a navigation session is ongoing will + \note Setting this property while a navigation session is ongoing will stop the navigation. \sa Route diff --git a/src/location/labs/qgeojson.cpp b/src/location/labs/qgeojson.cpp index f7f37661..151091ca 100644 --- a/src/location/labs/qgeojson.cpp +++ b/src/location/labs/qgeojson.cpp @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE \section2 Importing GeoJSON - The method \l importGeoJson accepts a \l + The importGeoJson() method accepts a \l {http://doc.qt.io/qt-5/qjsondocument.html} {QJsonDocument} from which it extracts a single \l {https://tools.ietf.org/html/rfc7159} {JSON} object, since the GeoJSON RFC expects that a valid GeoJSON Document has in its root @@ -503,9 +503,9 @@ QT_BEGIN_NAMESPACE \section2 Exporting GeoJSON - The exporter accepts the QVariantList returned by \l {The importer}, and - returns a JSON document. The exporter is complementary to the importer - because it executes the inverse action. + The exporter accepts the QVariantList returned by the \l {Importing GeoJSON} + {importer}, and returns a JSON document. The exporter is complementary to + the importer because it executes the inverse action. \section2 The toString function @@ -1231,9 +1231,9 @@ QString printQvariant(const QVariant v, int tabs = 0) { } /*! -This method accepts the QVariantLists structured like described in section \l -{Importing GeoJSON}, and returns a string containing the same data in a -readable form. + This method accepts the QVariantList \a geoData, structured as described in + \l {Importing GeoJSON}, and returns a string containing the same data in a + readable form. */ QString QGeoJson::toString(const QVariantList &geoData) { return printQvariant(geoData.first(), 0); diff --git a/src/positioning/doc/src/qtpositioning-plugins.qdoc b/src/positioning/doc/src/qtpositioning-plugins.qdoc index 77fdf3aa..d11c3121 100644 --- a/src/positioning/doc/src/qtpositioning-plugins.qdoc +++ b/src/positioning/doc/src/qtpositioning-plugins.qdoc @@ -27,7 +27,7 @@ /*! \page qtpositioning-plugins.html -\title Qt Positioning plugins +\title Qt Positioning Plugins \brief Default Plugins and Implementing Qt Positioning plugins Qt Positioning provides the majority of its functionality through plugins. diff --git a/src/positioning/doc/src/qtpositioning.qdoc b/src/positioning/doc/src/qtpositioning.qdoc index 970bc7bd..5ce8aae3 100644 --- a/src/positioning/doc/src/qtpositioning.qdoc +++ b/src/positioning/doc/src/qtpositioning.qdoc @@ -129,7 +129,7 @@ such as speed and direction. This provides the fundamental location information \li \l {Qt Positioning C++ Classes}{for C++} \row \li Position plugins: - \li \l {Qt Positioning service plugins} + \li \l {Qt Positioning Plugins} \endtable \section2 Examples diff --git a/src/positioning/qgeocoordinate.cpp b/src/positioning/qgeocoordinate.cpp index f3d3ef9c..5ff1299d 100644 --- a/src/positioning/qgeocoordinate.cpp +++ b/src/positioning/qgeocoordinate.cpp @@ -320,8 +320,6 @@ bool QGeoCoordinate::operator==(const QGeoCoordinate &other) const /*! \fn bool QGeoCoordinate::operator!=(const QGeoCoordinate &other) const - \fn bool QGeoCoordinate::operator!=(const QGeoCoordinateObject &other) const - \fn bool QGeoCoordinate::operator!=(const QGeoCoordinateObject *other) const Returns \c true if latitude, longitude, or altitude of this coordinate are not identical to \a other. diff --git a/src/positioning/qgeopolygon.cpp b/src/positioning/qgeopolygon.cpp index 04e09095..e8fdda76 100644 --- a/src/positioning/qgeopolygon.cpp +++ b/src/positioning/qgeopolygon.cpp @@ -117,7 +117,7 @@ QGeoPolygon::QGeoPolygon() } /*! - Constructs a new geo \a polygon from the coordinates specified + Constructs a new geo polygon from the coordinates specified in \a path. */ QGeoPolygon::QGeoPolygon(const QList &path) diff --git a/src/positioning/qgeopositioninfosourcefactory.cpp b/src/positioning/qgeopositioninfosourcefactory.cpp index afb0a1d3..d9971c26 100644 --- a/src/positioning/qgeopositioninfosourcefactory.cpp +++ b/src/positioning/qgeopositioninfosourcefactory.cpp @@ -109,7 +109,7 @@ QGeoPositionInfoSourceFactory::~QGeoPositionInfoSourceFactory() \fn QGeoSatelliteInfoSource *QGeoPositionInfoSourceFactoryV2::satelliteInfoSourceWithParameters(QObject *parent, const QVariantMap ¶meters) Returns a new QGeoSatelliteInfoSource associated with this plugin - with parent \a parent., and using \a parameters as configuration parameters. + with parent \a parent, and using \a parameters as configuration parameters. Can also return 0, in which case the plugin loader will use the factory with the next highest priority. */ diff --git a/src/positioningquick/qdeclarativepluginparameter.cpp b/src/positioningquick/qdeclarativepluginparameter.cpp index 678e8a6a..322a86a1 100644 --- a/src/positioningquick/qdeclarativepluginparameter.cpp +++ b/src/positioningquick/qdeclarativepluginparameter.cpp @@ -40,7 +40,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype PluginParameter - \instantiates QDeclarativePluginParameter + //! \instantiates QDeclarativePluginParameter \inqmlmodule QtPositioning \ingroup qml-QtPositioning5-common \since QtPositioning 5.14 -- cgit v1.2.1 From cd7edab940934fe8b100172e3e62e7eea5c354e5 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 14 Nov 2019 13:07:24 +0100 Subject: Use qmlRegisterAnonnymousType for anonymous type registration qmlRegisterType without uri and major version is deprecated. Change-Id: I772f7734301bec7cb0e20a6bbc1e4f7b513248b9 Fixes: QTBUG-80043 Reviewed-by: Paolo Angelelli --- src/imports/location/location.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp index 40dffd5d..fd53ad7a 100644 --- a/src/imports/location/location.cpp +++ b/src/imports/location/location.cpp @@ -131,7 +131,7 @@ public: qmlRegisterType(uri, major, minor, "User"); qmlRegisterType(uri, major, minor, "MapRectangle"); qmlRegisterType(uri, major, minor, "MapCircle"); - qmlRegisterType(); + qmlRegisterAnonymousType(uri, major); qmlRegisterType(uri, major, minor, "MapPolyline"); qmlRegisterType(uri, major, minor, "MapPolygon"); qmlRegisterType(uri, major, minor, "MapRoute"); @@ -177,7 +177,7 @@ public: // Register the 5.11 types minor = 11; - qmlRegisterType(); + qmlRegisterAnonymousType(uri, major); qmlRegisterType(uri, major, minor, "RouteManeuver"); qmlRegisterType(uri, major, minor, "Map"); qmlRegisterUncreatableType(uri, major, minor, "GeoMapItemBase", -- cgit v1.2.1