aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/binding
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-30 15:33:31 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-09-01 16:57:01 +0200
commit572882fd67d8d4ca138f6ae75150ed6188aaa7c6 (patch)
treeedc32a44ed905c2ad21b189a19740b0bfba252ff /examples/qml/referenceexamples/binding
parentfa031668714cfd7e0df490a8378af2bfc87ea8cf (diff)
Example: Pass QDate, QTime by value, not by const reference
They're value types, packaging qint64 and int, repsectively. Change-Id: Icf18794466cd140e1384d6dd0de736fbb2c05a48 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/qml/referenceexamples/binding')
-rw-r--r--examples/qml/referenceexamples/binding/birthdayparty.cpp2
-rw-r--r--examples/qml/referenceexamples/binding/birthdayparty.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/qml/referenceexamples/binding/birthdayparty.cpp b/examples/qml/referenceexamples/binding/birthdayparty.cpp
index cfedf84be0..02a1adbb35 100644
--- a/examples/qml/referenceexamples/binding/birthdayparty.cpp
+++ b/examples/qml/referenceexamples/binding/birthdayparty.cpp
@@ -59,7 +59,7 @@ QDate BirthdayPartyAttached::rsvp() const
return m_rsvp;
}
-void BirthdayPartyAttached::setRsvp(const QDate &d)
+void BirthdayPartyAttached::setRsvp(QDate d)
{
if (d != m_rsvp) {
m_rsvp = d;
diff --git a/examples/qml/referenceexamples/binding/birthdayparty.h b/examples/qml/referenceexamples/binding/birthdayparty.h
index 3cd5cf1c9a..846a016cfc 100644
--- a/examples/qml/referenceexamples/binding/birthdayparty.h
+++ b/examples/qml/referenceexamples/binding/birthdayparty.h
@@ -65,7 +65,7 @@ public:
BirthdayPartyAttached(QObject *object);
QDate rsvp() const;
- void setRsvp(const QDate &);
+ void setRsvp(QDate);
signals:
void rsvpChanged();
@@ -102,7 +102,7 @@ public:
void startParty();
signals:
- void partyStarted(const QTime &time);
+ void partyStarted(QTime time);
void hostChanged();
private: