diff options
Diffstat (limited to 'lib/kofficecore/KoPictureKey.cpp')
-rw-r--r-- | lib/kofficecore/KoPictureKey.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/kofficecore/KoPictureKey.cpp b/lib/kofficecore/KoPictureKey.cpp index ef60cfed..0badb429 100644 --- a/lib/kofficecore/KoPictureKey.cpp +++ b/lib/kofficecore/KoPictureKey.cpp @@ -19,20 +19,20 @@ * Boston, MA 02110-1301, USA. */ -#include <qdatetime.h> -#include <qfileinfo.h> -#include <qdom.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> +#include <tqdom.h> #include <kdebug.h> #include "KoPictureKey.h" -static void resetDateTimeToEpoch(QDateTime& dt) +static void resetDateTimeToEpoch(TQDateTime& dt) { // set the time point to 1970-01-01 - dt.setDate(QDate(1970,1,1)); - dt.setTime(QTime(0,0)); - // Note: we cannot use QDateTime;;setTime_t as it makes a local time correction! (### TODO: not true anymore with recent Qt versions) + dt.setDate(TQDate(1970,1,1)); + dt.setTime(TQTime(0,0)); + // Note: we cannot use TQDateTime;;setTime_t as it makes a local time correction! (### TODO: not true anymore with recent TQt versions) } KoPictureKey::KoPictureKey() @@ -40,7 +40,7 @@ KoPictureKey::KoPictureKey() resetDateTimeToEpoch(m_lastModified); } -KoPictureKey::KoPictureKey( const QString &fn, const QDateTime &mod ) +KoPictureKey::KoPictureKey( const TQString &fn, const TQDateTime &mod ) : m_filename( fn ), m_lastModified( mod ) { if (!m_lastModified.isValid()) @@ -50,7 +50,7 @@ KoPictureKey::KoPictureKey( const QString &fn, const QDateTime &mod ) } } -KoPictureKey::KoPictureKey( const QString &fn ) +KoPictureKey::KoPictureKey( const TQString &fn ) : m_filename( fn ) { resetDateTimeToEpoch(m_lastModified); @@ -79,10 +79,10 @@ bool KoPictureKey::operator<( const KoPictureKey &key ) const return key.toString() < toString(); } -void KoPictureKey::saveAttributes( QDomElement &elem ) const +void KoPictureKey::saveAttributes( TQDomElement &elem ) const { - QDate date = m_lastModified.date(); - QTime time = m_lastModified.time(); + TQDate date = m_lastModified.date(); + TQTime time = m_lastModified.time(); elem.setAttribute( "filename", m_filename ); elem.setAttribute( "year", date.year() ); elem.setAttribute( "month", date.month() ); @@ -93,7 +93,7 @@ void KoPictureKey::saveAttributes( QDomElement &elem ) const elem.setAttribute( "msec", time.msec() ); } -void KoPictureKey::loadAttributes( const QDomElement &elem ) +void KoPictureKey::loadAttributes( const TQDomElement &elem ) { // Default date/time is the *nix epoch: 1970-01-01 00:00:00,000 int year=1970, month=1, day=1; @@ -125,8 +125,8 @@ void KoPictureKey::loadAttributes( const QDomElement &elem ) if( elem.hasAttribute( "msec" ) ) msec=elem.attribute( "msec" ).toInt(); - m_lastModified.setDate( QDate( year, month, day ) ); - m_lastModified.setTime( QTime( hour, minute, second, msec ) ); + m_lastModified.setDate( TQDate( year, month, day ) ); + m_lastModified.setTime( TQTime( hour, minute, second, msec ) ); if (!m_lastModified.isValid()) { @@ -136,16 +136,16 @@ void KoPictureKey::loadAttributes( const QDomElement &elem ) } } -QString KoPictureKey::toString() const +TQString KoPictureKey::toString() const { - // We do not use the default QDateTime::toString has it does not show microseconds - return QString::fromLatin1( "%1 %2" ) - .arg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") ); + // We do not use the default TQDateTime::toString has it does not show microseconds + return TQString::tqfromLatin1( "%1 %2" ) + .tqarg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") ); } -void KoPictureKey::setKeyFromFile (const QString& filename) +void KoPictureKey::setKeyFromFile (const TQString& filename) { - QFileInfo inf(filename); + TQFileInfo inf(filename); m_filename = filename; m_lastModified = inf.lastModified(); } |