aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-30 15:39:09 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-09-01 16:57:16 +0200
commitded100644e0f1a3e4eeedfb635c91ba76175b635 (patch)
treec7b83748e32b88c4170dd154af9087c14f52edfb
parent5234bed6a242d827799571db4fe7fd94b54df4db (diff)
Tests: pass QDate and QTime by value rather than const reference
They've value types, packaging qint64 and int respectively. Change-Id: Ia9a96748f9423139f41df720ce987ce96435beca Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h4
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h4
-rw-r--r--tests/auto/qml/qqmlqt/tst_qqmlqt.cpp4
-rw-r--r--tests/auto/qml/qqmlsettings/tst_qqmlsettings.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index 922bef0ead..3813cdbe24 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -608,7 +608,7 @@ public:
QDate dateProperty() const {
return datePropertyValue;
}
- void setDateProperty(const QDate &v) {
+ void setDateProperty(QDate v) {
datePropertyValue = v;
}
@@ -616,7 +616,7 @@ public:
QTime timeProperty() const {
return timePropertyValue;
}
- void setTimeProperty(const QTime &v) {
+ void setTimeProperty(QTime v) {
timePropertyValue = v;
}
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h
index 469fe5467c..9a9a38a12a 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.h
+++ b/tests/auto/qml/qqmllanguage/testtypes.h
@@ -437,7 +437,7 @@ public:
QDate dateProperty() const {
return datePropertyValue;
}
- void setDateProperty(const QDate &v) {
+ void setDateProperty(QDate v) {
datePropertyValue = v;
emit datePropertyChanged();
}
@@ -446,7 +446,7 @@ public:
QTime timeProperty() const {
return timePropertyValue;
}
- void setTimeProperty(const QTime &v) {
+ void setTimeProperty(QTime v) {
timePropertyValue = v;
emit timePropertyChanged();
}
diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
index d19b297aa7..9dd53b78e7 100644
--- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
+++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
@@ -1288,12 +1288,12 @@ class TimeProvider: public QObject
Q_PROPERTY(QTime time READ time WRITE setTime NOTIFY timeChanged)
public:
- TimeProvider(const QTime &t)
+ TimeProvider(QTime t)
: m_getTime(t)
{}
QTime time() const { return m_getTime; }
- void setTime(const QTime &t) { m_putTime = t; emit timeChanged(); }
+ void setTime(QTime t) { m_putTime = t; emit timeChanged(); }
signals:
void timeChanged();
diff --git a/tests/auto/qml/qqmlsettings/tst_qqmlsettings.cpp b/tests/auto/qml/qqmlsettings/tst_qqmlsettings.cpp
index 7bd0afa733..189321921a 100644
--- a/tests/auto/qml/qqmlsettings/tst_qqmlsettings.cpp
+++ b/tests/auto/qml/qqmlsettings/tst_qqmlsettings.cpp
@@ -117,7 +117,7 @@ signals:
void intListPropertyChanged(const QVariantList &arg);
void stringListPropertyChanged(const QVariantList &arg);
void objectListPropertyChanged(const QVariantList &arg);
- void datePropertyChanged(const QDate &arg);
+ void datePropertyChanged(QDate arg);
void sizePropertyChanged(const QSizeF &arg);
void pointPropertyChanged(const QPointF &arg);
void rectPropertyChanged(const QRectF &arg);