diff options
author | Xizhi Zhu <xizhi.zhu@gmail.com> | 2012-01-06 17:53:38 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-09 07:46:08 +0100 |
commit | 84bd87353a3f092d00942e90aa20be3668a7456b (patch) | |
tree | 20ad02e110e0a7c34e28aff9545a6dd8d3229f0c /src/corelib/tools/qdatetime.h | |
parent | 7aeccb183a827e8504d7dd8614d1ca555caf61d9 (diff) |
Clean-up the interface for QDate.
Four overload functions removed while keeping source compatibility:
- shortMonthName()
- shortDayName()
- longMonthName()
- longDayName()
Two functions removed since they have confusing names:
- gregorianToJulian()
- julianToGregorian()
Change-Id: Iaaea066a3fb77b1ee3499d3049fcec5563054cdf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Diffstat (limited to 'src/corelib/tools/qdatetime.h')
-rw-r--r-- | src/corelib/tools/qdatetime.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index e33cd69a1c..ba52f7455c 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -76,15 +76,10 @@ public: int weekNumber(int *yearNum = 0) const; #ifndef QT_NO_TEXTDATE - // ### Qt 5: merge these functions. - static QString shortMonthName(int month); - static QString shortMonthName(int month, MonthNameType type); - static QString shortDayName(int weekday); - static QString shortDayName(int weekday, MonthNameType type); - static QString longMonthName(int month); - static QString longMonthName(int month, MonthNameType type); - static QString longDayName(int weekday); - static QString longDayName(int weekday, MonthNameType type); + static QString shortMonthName(int month, MonthNameType type = DateFormat); + static QString shortDayName(int weekday, MonthNameType type = DateFormat); + static QString longMonthName(int month, MonthNameType type = DateFormat); + static QString longDayName(int weekday, MonthNameType type = DateFormat); #endif // QT_NO_TEXTDATE #ifndef QT_NO_DATESTRING QString toString(Qt::DateFormat f = Qt::TextDate) const; @@ -115,10 +110,6 @@ public: static bool isValid(int y, int m, int d); static bool isLeapYear(int year); - // ### Qt 5: remove these two functions - static uint gregorianToJulian(int y, int m, int d); - static void julianToGregorian(uint jd, int &y, int &m, int &d); - static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; } inline int toJulianDay() const { return jd; } |