diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:17 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:17 -0600 |
commit | 6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3 (patch) | |
tree | cc90a09df2d1fd6d956cc084529a62d354316ad3 /libtdeedu/extdate/extdatetime.cpp | |
parent | 174fd5e23c68598774706ea9b571d3d178e36b81 (diff) | |
download | tdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.tar.gz tdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'libtdeedu/extdate/extdatetime.cpp')
-rw-r--r-- | libtdeedu/extdate/extdatetime.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libtdeedu/extdate/extdatetime.cpp b/libtdeedu/extdate/extdatetime.cpp index d8984eee..fa87a85f 100644 --- a/libtdeedu/extdate/extdatetime.cpp +++ b/libtdeedu/extdate/extdatetime.cpp @@ -377,7 +377,7 @@ int ExtDate::daysTo( const ExtDate & a_date) const return a_date.jd() - jd(); } -ExtDate ExtDate::tqcurrentDate(Qt::TimeSpec ts) +ExtDate ExtDate::currentDate(Qt::TimeSpec ts) { time_t a_current_time; struct tm a_current_time_tm; @@ -559,7 +559,7 @@ int ExtDate::dayOfYear(int y, int m, int d) A ExtDateTime object is typically created either by giving a date and time explicitly in the constructor, or by using the static - function tqcurrentDateTime(), which returns a ExtDateTime object set + function currentDateTime(), which returns a ExtDateTime object set to the system clock's time. The date and time can be changed with setDate() and setTime(). A datetime can also be set using the setTime_t() function, which takes a POSIX-standard "number of @@ -933,7 +933,7 @@ int ExtDateTime::daysTo( const ExtDateTime &dt ) const Example: \code - ExtDateTime dt = ExtDateTime::tqcurrentDateTime(); + ExtDateTime dt = ExtDateTime::currentDateTime(); ExtDateTime xmas( ExtDate(dt.date().year(),12,24), TQTime(17,00) ); kdDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas" << endl; \endcode @@ -1023,28 +1023,28 @@ bool ExtDateTime::operator>=( const ExtDateTime &dt ) const Returns the current datetime, as reported by the system clock. - \sa ExtDate::tqcurrentDate(), TQTime::currentTime() + \sa ExtDate::currentDate(), TQTime::currentTime() */ -ExtDateTime ExtDateTime::tqcurrentDateTime() +ExtDateTime ExtDateTime::currentDateTime() { - return tqcurrentDateTime( Qt::LocalTime ); + return currentDateTime( Qt::LocalTime ); } /*! Returns the current datetime, as reported by the system clock, for the TimeSpec \a ts. The default TimeSpec is LocalTime. - \sa ExtDate::tqcurrentDate(), TQTime::currentTime(), Qt::TimeSpec + \sa ExtDate::currentDate(), TQTime::currentTime(), Qt::TimeSpec */ -ExtDateTime ExtDateTime::tqcurrentDateTime( Qt::TimeSpec ts ) +ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts ) { ExtDateTime dt; - dt.setDate( ExtDate::tqcurrentDate(ts) ); + dt.setDate( ExtDate::currentDate(ts) ); TQTime t = t.currentTime(ts); if ( t.hour()==0 && t.minute()==0 ) // midnight or right after? - dt.setDate( ExtDate::tqcurrentDate(ts) ); // fetch date again + dt.setDate( ExtDate::currentDate(ts) ); // fetch date again dt.setTime( t ); return dt; } @@ -1099,7 +1099,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) TQTime time; TQString sd = s; int hour, minute, second; - int pivot = s.find( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); + int pivot = s.find( TQRegExp(TQString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); if ( pivot != -1 ) { hour = s.mid( pivot, 2 ).toInt(); minute = s.mid( pivot+3, 2 ).toInt(); |