summaryrefslogtreecommitdiffabout
path: root/microkde/kcalendarsystemgregorian.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kcalendarsystemgregorian.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kcalendarsystemgregorian.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/microkde/kcalendarsystemgregorian.cpp b/microkde/kcalendarsystemgregorian.cpp
index 7c5b62a..cc12b9f 100644
--- a/microkde/kcalendarsystemgregorian.cpp
+++ b/microkde/kcalendarsystemgregorian.cpp
@@ -51,13 +51,13 @@ int KCalendarSystemGregorian::monthsInYear( const QDate & ) const
return 12;
}
int KCalendarSystemGregorian::weeksInYear(int year) const
{
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
QDate temp;
temp.setYMD(year, 12, 31);
// If the last day of the year is in the first week, we have to check the
// week before
if ( temp.weekNumber() == 1 )
@@ -69,13 +69,13 @@ int KCalendarSystemGregorian::weeksInYear(int year) const
#endif
}
int KCalendarSystemGregorian::weekNumber(const QDate& date,
int * yearNum) const
{
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
return date.weekNumber(yearNum);
#else
return 1;
#endif
}
@@ -228,13 +228,13 @@ bool KCalendarSystemGregorian::setYMD(QDate & date, int y, int m, int d) const
// QDate supports gregorian internally
return date.setYMD(y, m, d);
}
QDate KCalendarSystemGregorian::addYears(const QDate & date, int nyears) const
{
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
return date.addYears(nyears);
#else
int year = date.year() + nyears;
int month = date.month();
int day = date.day();
QDate newDate( year, month, 1 );
@@ -242,13 +242,13 @@ QDate KCalendarSystemGregorian::addYears(const QDate & date, int nyears) const
return QDate( year, month, day );
#endif
}
QDate KCalendarSystemGregorian::addMonths(const QDate & date, int nmonths) const
{
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
return date.addMonths(nmonths);
#else
int month = date.month();
int nyears;
if ( nmonths >= 0 ) {
month += nmonths;