From 3dcc075f4a5efce348a6fa00cf5a0adef97b1089 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 18 Apr 2017 16:22:46 -0700 Subject: Move Q_REQUIRED_RESULT to its correct position That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/tools/qdatetime.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/corelib/tools/qdatetime.h') diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index c7f14ed40a..2518dc7301 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -103,9 +103,9 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d) #endif // < Qt 6 void getDate(int *year, int *month, int *day) const; - QDate addDays(qint64 days) const Q_REQUIRED_RESULT; - QDate addMonths(int months) const Q_REQUIRED_RESULT; - QDate addYears(int years) const Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT QDate addDays(qint64 days) const; + Q_REQUIRED_RESULT QDate addMonths(int months) const; + Q_REQUIRED_RESULT QDate addYears(int years) const; qint64 daysTo(const QDate &) const; Q_DECL_CONSTEXPR bool operator==(const QDate &other) const { return jd == other.jd; } @@ -166,9 +166,9 @@ public: #endif bool setHMS(int h, int m, int s, int ms = 0); - QTime addSecs(int secs) const Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT QTime addSecs(int secs) const; int secsTo(const QTime &) const; - QTime addMSecs(int ms) const Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT QTime addMSecs(int ms) const; int msecsTo(const QTime &) const; Q_DECL_CONSTEXPR bool operator==(const QTime &other) const { return mds == other.mds; } @@ -297,11 +297,11 @@ public: QString toString(Qt::DateFormat f = Qt::TextDate) const; QString toString(const QString &format) const; #endif - QDateTime addDays(qint64 days) const Q_REQUIRED_RESULT; - QDateTime addMonths(int months) const Q_REQUIRED_RESULT; - QDateTime addYears(int years) const Q_REQUIRED_RESULT; - QDateTime addSecs(qint64 secs) const Q_REQUIRED_RESULT; - QDateTime addMSecs(qint64 msecs) const Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT QDateTime addDays(qint64 days) const; + Q_REQUIRED_RESULT QDateTime addMonths(int months) const; + Q_REQUIRED_RESULT QDateTime addYears(int years) const; + Q_REQUIRED_RESULT QDateTime addSecs(qint64 secs) const; + Q_REQUIRED_RESULT QDateTime addMSecs(qint64 msecs) const; QDateTime toTimeSpec(Qt::TimeSpec spec) const; inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); } -- cgit v1.2.3