diff options
| author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
|---|---|---|
| committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
| commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
| tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/kspread_functions_helper.cc | |
| parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
| download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip | |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/kspread_functions_helper.cc')
| -rw-r--r-- | kspread/kspread_functions_helper.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kspread/kspread_functions_helper.cc b/kspread/kspread_functions_helper.cc index 733deab22..92f7b1ae9 100644 --- a/kspread/kspread_functions_helper.cc +++ b/kspread/kspread_functions_helper.cc @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qdatetime.h> +#include <tqdatetime.h> #include "kspread_functions_helper.h" /* DISABLED - we use KCalendarSystem instead -void addMonths( QDate & date, int months ) +void addMonths( TQDate & date, int months ) { int d = date.day(); int m = date.month() + months; @@ -36,13 +36,13 @@ void addMonths( QDate & date, int months ) } // e.g. 31 Feb: decrease day... - while ( !QDate::isValid( y, m, d ) && d > 0 ) + while ( !TQDate::isValid( y, m, d ) && d > 0 ) --d; date.setYMD( y, m, d ); } -void subMonths( QDate & date, int months ) +void subMonths( TQDate & date, int months ) { int d = date.day(); int m = date.month() - months; @@ -55,7 +55,7 @@ void subMonths( QDate & date, int months ) } // e.g. 31 Feb: decrease day - while ( !QDate::isValid( y, m, d ) && d > 0 ) + while ( !TQDate::isValid( y, m, d ) && d > 0 ) --d; date.setYMD( y, m, d ); @@ -63,7 +63,7 @@ void subMonths( QDate & date, int months ) */ -int KSpread::daysPerYear(QDate const & date, int basis) +int KSpread::daysPerYear(TQDate const & date, int basis) { switch( basis ) { @@ -71,7 +71,7 @@ int KSpread::daysPerYear(QDate const & date, int basis) return 360; case 1: - if ( QDate::leapYear( date.year() ) ) + if ( TQDate::leapYear( date.year() ) ) return 366; return 365; @@ -86,7 +86,7 @@ int KSpread::daysPerYear(QDate const & date, int basis) return -1; } -int KSpread::daysBetweenDates(QDate const & date1, QDate const & date2, int basis) +int KSpread::daysBetweenDates(TQDate const & date1, TQDate const & date2, int basis) { int day1, day2, month1, month2, year1, year2; bool isLeapYear = false; @@ -103,7 +103,7 @@ int KSpread::daysBetweenDates(QDate const & date1, QDate const & date2, int basi months = month2 - month1 + years * 12; days = day2 - day1; - isLeapYear = QDate::leapYear( year1 ); + isLeapYear = TQDate::leapYear( year1 ); switch (basis) { |
