Pass QDate by value, not by const reference
It's a value type, simply packaging a qint64. Change-Id: If693a2476b4cdaeb08a967d71840428aa437c662 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
2b47478af2
commit
b7e2a4fb5c
|
@ -42,9 +42,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
static int getCount(const QDate& from, const QDate &to);
|
||||
static int getCount(QDate from, QDate to);
|
||||
|
||||
void populate(const QDate &from, const QDate &to, bool force = false);
|
||||
void populate(QDate from, QDate to, bool force = false);
|
||||
|
||||
bool complete;
|
||||
QDate from;
|
||||
|
@ -52,7 +52,7 @@ public:
|
|||
int count;
|
||||
};
|
||||
|
||||
int QQuickCalendarModelPrivate::getCount(const QDate& from, const QDate &to)
|
||||
int QQuickCalendarModelPrivate::getCount(QDate from, QDate to)
|
||||
{
|
||||
if (!from.isValid() || !to.isValid())
|
||||
return 0;
|
||||
|
@ -69,7 +69,7 @@ int QQuickCalendarModelPrivate::getCount(const QDate& from, const QDate &to)
|
|||
return 12 * years + months + (r.day() / t.day());
|
||||
}
|
||||
|
||||
void QQuickCalendarModelPrivate::populate(const QDate &f, const QDate &t, bool force)
|
||||
void QQuickCalendarModelPrivate::populate(QDate f, QDate t, bool force)
|
||||
{
|
||||
Q_Q(QQuickCalendarModel);
|
||||
if (!force && f == from && t == to)
|
||||
|
|
Loading…
Reference in New Issue