summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Laanmets <lauri.laanmets@eesti.ee>2021-09-23 14:16:54 +0300
committerIvan Solovev <ivan.solovev@qt.io>2021-11-09 10:28:57 +0100
commit52def5c06193356bf53537b59a56ca2fa62fab3d (patch)
tree02d233b8e03b2f6c75e1fd5c0dc18654116d3c0f
parentd46a99871601ed4af1260234126c7a7e9d8f2f41 (diff)
replace int by qsizetype
For "count" and "at" methods, the parameter or return type int was replaced by qsizetype. This patch adapts the code to this change. Task-number: QTBUG-96795 Change-Id: Id409ab573cce886649a72538584dfa57264e7dac Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroute.cpp4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroute_p.h4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp8
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel_p.h8
-rw-r--r--src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h4
-rw-r--r--src/location/declarativemaps/qparameterizableobject.cpp4
-rw-r--r--src/location/declarativemaps/qparameterizableobject_p.h4
-rw-r--r--src/location/declarativeplaces/qdeclarativeplace.cpp4
-rw-r--r--src/location/declarativeplaces/qdeclarativeplace_p.h4
-rw-r--r--src/location/declarativeplaces/qdeclarativesearchresultmodel.cpp4
-rw-r--r--src/location/declarativeplaces/qdeclarativesearchresultmodel_p.h4
12 files changed, 28 insertions, 28 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeoroute.cpp b/src/location/declarativemaps/qdeclarativegeoroute.cpp
index 0144ade9..92f6b0b0 100644
--- a/src/location/declarativemaps/qdeclarativegeoroute.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroute.cpp
@@ -254,7 +254,7 @@ void QDeclarativeGeoRoute::segments_append(QQmlListProperty<QDeclarativeGeoRoute
/*!
\internal
*/
-int QDeclarativeGeoRoute::segments_count(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop)
+qsizetype QDeclarativeGeoRoute::segments_count(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop)
{
QDeclarativeGeoRoute *declRoute = static_cast<QDeclarativeGeoRoute *>(prop->object);
return declRoute->segmentsCount();
@@ -263,7 +263,7 @@ int QDeclarativeGeoRoute::segments_count(QQmlListProperty<QDeclarativeGeoRouteSe
/*!
\internal
*/
-QDeclarativeGeoRouteSegment *QDeclarativeGeoRoute::segments_at(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop, int index)
+QDeclarativeGeoRouteSegment *QDeclarativeGeoRoute::segments_at(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop, qsizetype index)
{
QDeclarativeGeoRoute *declRoute = static_cast<QDeclarativeGeoRoute *>(prop->object);
declRoute->initSegments(index); // init only what's needed.
diff --git a/src/location/declarativemaps/qdeclarativegeoroute_p.h b/src/location/declarativemaps/qdeclarativegeoroute_p.h
index 9d89760a..49b2f984 100644
--- a/src/location/declarativemaps/qdeclarativegeoroute_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroute_p.h
@@ -103,8 +103,8 @@ Q_SIGNALS:
private:
static void segments_append(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop, QDeclarativeGeoRouteSegment *segment);
- static int segments_count(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop);
- static QDeclarativeGeoRouteSegment *segments_at(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop, int index);
+ static qsizetype segments_count(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop);
+ static QDeclarativeGeoRouteSegment *segments_at(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop, qsizetype index);
static void segments_clear(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop);
void initSegments(unsigned int lastIndex = ~0U);
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index a3a7fe85..5bad5b71 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -1586,12 +1586,12 @@ void QDeclarativeGeoRouteQuery::append(QQmlListProperty<QObject> *p, QObject *v)
}
}
-int QDeclarativeGeoRouteQuery::count(QQmlListProperty<QObject> *p)
+qsizetype QDeclarativeGeoRouteQuery::count(QQmlListProperty<QObject> *p)
{
return static_cast<QDeclarativeGeoRouteQuery*>(p->object)->m_children.count();
}
-QObject *QDeclarativeGeoRouteQuery::at(QQmlListProperty<QObject> *p, int idx)
+QObject *QDeclarativeGeoRouteQuery::at(QQmlListProperty<QObject> *p, qsizetype idx)
{
return static_cast<QDeclarativeGeoRouteQuery*>(p->object)->m_children.at(idx);
}
@@ -1908,12 +1908,12 @@ void QDeclarativeGeoWaypoint::append(QQmlListProperty<QObject> *p, QObject *v)
}
}
-int QDeclarativeGeoWaypoint::count(QQmlListProperty<QObject> *p)
+qsizetype QDeclarativeGeoWaypoint::count(QQmlListProperty<QObject> *p)
{
return static_cast<QDeclarativeGeoWaypoint*>(p->object)->m_children.count();
}
-QObject *QDeclarativeGeoWaypoint::at(QQmlListProperty<QObject> *p, int idx)
+QObject *QDeclarativeGeoWaypoint::at(QQmlListProperty<QObject> *p, qsizetype idx)
{
return static_cast<QDeclarativeGeoWaypoint*>(p->object)->m_children.at(idx);
}
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
index d5286cf7..b6405b16 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
@@ -256,8 +256,8 @@ protected:
// For quickChildren
static void append(QQmlListProperty<QObject> *p, QObject *v);
- static int count(QQmlListProperty<QObject> *p);
- static QObject *at(QQmlListProperty<QObject> *p, int idx);
+ static qsizetype count(QQmlListProperty<QObject> *p);
+ static QObject *at(QQmlListProperty<QObject> *p, qsizetype idx);
static void clear(QQmlListProperty<QObject> *p);
QQmlListProperty<QObject> declarativeChildren();
QList<QObject*> m_children;
@@ -448,8 +448,8 @@ private Q_SLOTS:
protected:
static void append(QQmlListProperty<QObject> *p, QObject *v);
- static int count(QQmlListProperty<QObject> *p);
- static QObject *at(QQmlListProperty<QObject> *p, int idx);
+ static qsizetype count(QQmlListProperty<QObject> *p);
+ static QObject *at(QQmlListProperty<QObject> *p, qsizetype idx);
static void clear(QQmlListProperty<QObject> *p);
QQmlListProperty<QObject> declarativeChildren();
diff --git a/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp b/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp
index a455cc09..19810765 100644
--- a/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoserviceprovider.cpp
@@ -628,7 +628,7 @@ void QDeclarativeGeoServiceProvider::parameter_append(QQmlListProperty<QDeclarat
/*!
\internal
*/
-int QDeclarativeGeoServiceProvider::parameter_count(QQmlListProperty<QDeclarativePluginParameter> *prop)
+qsizetype QDeclarativeGeoServiceProvider::parameter_count(QQmlListProperty<QDeclarativePluginParameter> *prop)
{
return static_cast<QDeclarativeGeoServiceProvider *>(prop->object)->parameters_.count();
}
@@ -636,7 +636,7 @@ int QDeclarativeGeoServiceProvider::parameter_count(QQmlListProperty<QDeclarativ
/*!
\internal
*/
-QDeclarativePluginParameter *QDeclarativeGeoServiceProvider::parameter_at(QQmlListProperty<QDeclarativePluginParameter> *prop, int index)
+QDeclarativePluginParameter *QDeclarativeGeoServiceProvider::parameter_at(QQmlListProperty<QDeclarativePluginParameter> *prop, qsizetype index)
{
return static_cast<QDeclarativeGeoServiceProvider *>(prop->object)->parameters_[index];
}
diff --git a/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h b/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h
index 6c1b0f63..dcda55a1 100644
--- a/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h
@@ -199,8 +199,8 @@ private:
bool parametersReady();
void tryAttach();
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);
QGeoServiceProvider *sharedProvider_;
diff --git a/src/location/declarativemaps/qparameterizableobject.cpp b/src/location/declarativemaps/qparameterizableobject.cpp
index b1e588e6..6c87819a 100644
--- a/src/location/declarativemaps/qparameterizableobject.cpp
+++ b/src/location/declarativemaps/qparameterizableobject.cpp
@@ -66,12 +66,12 @@ void QParameterizableObject::append(QQmlListProperty<QObject> *p, QObject *v)
object->appendChild(v);
}
-int QParameterizableObject::count(QQmlListProperty<QObject> *p)
+qsizetype QParameterizableObject::count(QQmlListProperty<QObject> *p)
{
return static_cast<QParameterizableObject*>(p->object)->m_children.count();
}
-QObject *QParameterizableObject::at(QQmlListProperty<QObject> *p, int idx)
+QObject *QParameterizableObject::at(QQmlListProperty<QObject> *p, qsizetype idx)
{
return static_cast<QParameterizableObject*>(p->object)->m_children.at(idx);
}
diff --git a/src/location/declarativemaps/qparameterizableobject_p.h b/src/location/declarativemaps/qparameterizableobject_p.h
index 21a096e0..b0fd3132 100644
--- a/src/location/declarativemaps/qparameterizableobject_p.h
+++ b/src/location/declarativemaps/qparameterizableobject_p.h
@@ -87,8 +87,8 @@ protected:
virtual void clearChildren();
static void append(QQmlListProperty<QObject> *p, QObject *v);
- static int count(QQmlListProperty<QObject> *p);
- static QObject *at(QQmlListProperty<QObject> *p, int idx);
+ static qsizetype count(QQmlListProperty<QObject> *p);
+ static QObject *at(QQmlListProperty<QObject> *p, qsizetype idx);
static void clear(QQmlListProperty<QObject> *p);
QQmlListProperty<QObject> declarativeChildren();
diff --git a/src/location/declarativeplaces/qdeclarativeplace.cpp b/src/location/declarativeplaces/qdeclarativeplace.cpp
index 74a8f0c0..fb5543ab 100644
--- a/src/location/declarativeplaces/qdeclarativeplace.cpp
+++ b/src/location/declarativeplaces/qdeclarativeplace.cpp
@@ -925,7 +925,7 @@ void QDeclarativePlace::category_append(QQmlListProperty<QDeclarativeCategory> *
/*!
\internal
*/
-int QDeclarativePlace::category_count(QQmlListProperty<QDeclarativeCategory> *prop)
+qsizetype QDeclarativePlace::category_count(QQmlListProperty<QDeclarativeCategory> *prop)
{
return static_cast<QDeclarativePlace *>(prop->object)->m_categories.count();
}
@@ -934,7 +934,7 @@ int QDeclarativePlace::category_count(QQmlListProperty<QDeclarativeCategory> *pr
\internal
*/
QDeclarativeCategory *QDeclarativePlace::category_at(QQmlListProperty<QDeclarativeCategory> *prop,
- int index)
+ qsizetype index)
{
QDeclarativePlace *object = static_cast<QDeclarativePlace *>(prop->object);
QDeclarativeCategory *res = NULL;
diff --git a/src/location/declarativeplaces/qdeclarativeplace_p.h b/src/location/declarativeplaces/qdeclarativeplace_p.h
index bfe36936..214b10a4 100644
--- a/src/location/declarativeplaces/qdeclarativeplace_p.h
+++ b/src/location/declarativeplaces/qdeclarativeplace_p.h
@@ -137,8 +137,8 @@ public:
QQmlListProperty<QDeclarativeCategory> categories();
static void category_append(QQmlListProperty<QDeclarativeCategory> *prop,
QDeclarativeCategory *value);
- static int category_count(QQmlListProperty<QDeclarativeCategory> *prop);
- static QDeclarativeCategory *category_at(QQmlListProperty<QDeclarativeCategory> *prop, int index);
+ static qsizetype category_count(QQmlListProperty<QDeclarativeCategory> *prop);
+ static QDeclarativeCategory *category_at(QQmlListProperty<QDeclarativeCategory> *prop, qsizetype index);
static void category_clear(QQmlListProperty<QDeclarativeCategory> *prop);
QDeclarativeGeoLocation *location();
diff --git a/src/location/declarativeplaces/qdeclarativesearchresultmodel.cpp b/src/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
index 9129731b..98fde1c6 100644
--- a/src/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
+++ b/src/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
@@ -412,7 +412,7 @@ void QDeclarativeSearchResultModel::categories_append(QQmlListProperty<QDeclarat
}
}
-int QDeclarativeSearchResultModel::categories_count(QQmlListProperty<QDeclarativeCategory> *list)
+qsizetype QDeclarativeSearchResultModel::categories_count(QQmlListProperty<QDeclarativeCategory> *list)
{
QDeclarativeSearchResultModel *searchModel = qobject_cast<QDeclarativeSearchResultModel *>(list->object);
if (searchModel)
@@ -422,7 +422,7 @@ int QDeclarativeSearchResultModel::categories_count(QQmlListProperty<QDeclarativ
}
QDeclarativeCategory *QDeclarativeSearchResultModel::category_at(QQmlListProperty<QDeclarativeCategory> *list,
- int index)
+ qsizetype index)
{
QDeclarativeSearchResultModel *searchModel = qobject_cast<QDeclarativeSearchResultModel *>(list->object);
if (searchModel && (searchModel->m_categories.count() > index) && (index > -1))
diff --git a/src/location/declarativeplaces/qdeclarativesearchresultmodel_p.h b/src/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
index 40c2e47c..3cac8fcb 100644
--- a/src/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
+++ b/src/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
@@ -98,8 +98,8 @@ public:
QQmlListProperty<QDeclarativeCategory> categories();
static void categories_append(QQmlListProperty<QDeclarativeCategory> *list,
QDeclarativeCategory *category);
- static int categories_count(QQmlListProperty<QDeclarativeCategory> *list);
- static QDeclarativeCategory *category_at(QQmlListProperty<QDeclarativeCategory> *list, int index);
+ static qsizetype categories_count(QQmlListProperty<QDeclarativeCategory> *list);
+ static QDeclarativeCategory *category_at(QQmlListProperty<QDeclarativeCategory> *list, qsizetype index);
static void categories_clear(QQmlListProperty<QDeclarativeCategory> *list);
QString recommendationId() const;