From a44d7862c8e92ad2bc2d0d56e542066e688d5c82 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Tue, 16 Feb 2016 14:56:26 +0300 Subject: QDate: mark getDate() as const. This method does not modify the object. Can't change the API, so overload and mark the old function for removal in Qt 6. Change-Id: I4aee2bc19209646adc21388375aedd20a09129d0 Reviewed-by: Edward Welbourne Reviewed-by: Marc Mutz --- src/corelib/tools/qdatetime.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib/tools/qdatetime.h') diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index af91ad0fe5..ee3be5553b 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -99,7 +99,10 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d) bool setDate(int year, int month, int day); - void getDate(int *year, int *month, int *day); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + void getDate(int *year, int *month, int *day); // ### Qt 6: remove +#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; -- cgit v1.2.3