diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-23 18:28:07 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-31 14:02:53 +0100 |
commit | 2b1068af97f1483b7bdb3d7a9257ab59fc4b2b59 (patch) | |
tree | 3fba08e184ef752e6676c59ed1ae5dd88392a02f /src/corelib/text/qlocale_mac.mm | |
parent | 90fbd086c6d164136ff4b3a26577bf40cb951754 (diff) |
Pass QDate and QTime by value in various static and local functions
They're value types, so pass them as such.
Change-Id: I0dc46c63a3a0e6d859b821362f71390f0148b64c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qlocale_mac.mm')
-rw-r--r-- | src/corelib/text/qlocale_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qlocale_mac.mm b/src/corelib/text/qlocale_mac.mm index 31ede1352b..7bdae662c7 100644 --- a/src/corelib/text/qlocale_mac.mm +++ b/src/corelib/text/qlocale_mac.mm @@ -119,7 +119,7 @@ static QString macDayName(int day, bool short_format) return QString(); } -static QString macDateToString(const QDate &date, bool short_format) +static QString macDateToString(QDate date, bool short_format) { QCFType<CFDateRef> myDate = QDateTime(date, QTime()).toCFDate(); QCFType<CFLocaleRef> mylocale = CFLocaleCopyCurrent(); @@ -131,7 +131,7 @@ static QString macDateToString(const QDate &date, bool short_format) return QCFString(CFDateFormatterCreateStringWithDate(0, myFormatter, myDate)); } -static QString macTimeToString(const QTime &time, bool short_format) +static QString macTimeToString(QTime time, bool short_format) { QCFType<CFDateRef> myDate = QDateTime(QDate::currentDate(), time).toCFDate(); QCFType<CFLocaleRef> mylocale = CFLocaleCopyCurrent(); |