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 /lib/kofficecore/KoPictureKey.cpp | |
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 '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(); } |