diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kmail/filterlog.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/filterlog.cpp')
-rw-r--r-- | kmail/filterlog.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kmail/filterlog.cpp b/kmail/filterlog.cpp index 23848dfb1..7415c10d0 100644 --- a/kmail/filterlog.cpp +++ b/kmail/filterlog.cpp @@ -31,8 +31,8 @@ #include <kdebug.h> -#include <qdatetime.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqfile.h> #include <sys/stat.h> @@ -68,11 +68,11 @@ FilterLog * FilterLog::instance() } -void FilterLog::add( QString logEntry, ContentType contentType ) +void FilterLog::add( TQString logEntry, ContentType contentType ) { if ( isLogging() && ( mAllowedTypes & contentType ) ) { - QString timedLog = "[" + QTime::currentTime().toString() + "] "; + TQString timedLog = "[" + TQTime::currentTime().toString() + "] "; if ( contentType & ~meta ) timedLog += logEntry; else @@ -102,7 +102,7 @@ void FilterLog::dump() { #ifndef NDEBUG kdDebug(5006) << "----- starting filter log -----" << endl; - for ( QStringList::Iterator it = mLogEntries.begin(); + for ( TQStringList::Iterator it = mLogEntries.begin(); it != mLogEntries.end(); ++it ) { kdDebug(5006) << *it << endl; @@ -117,17 +117,17 @@ void FilterLog::checkLogSize() if ( mCurrentLogSize > mMaxLogSize && mMaxLogSize > -1 ) { kdDebug(5006) << "Filter log: memory limit reached, starting to discard old items, size = " - << QString::number( mCurrentLogSize ) << endl; + << TQString::number( mCurrentLogSize ) << endl; // avoid some kind of hysteresis, shrink the log to 90% of its maximum while ( mCurrentLogSize > ( mMaxLogSize * 0.9 ) ) { - QValueListIterator<QString> it = mLogEntries.begin(); + TQValueListIterator<TQString> it = mLogEntries.begin(); if ( it != mLogEntries.end()) { mCurrentLogSize -= (*it).length(); mLogEntries.remove( it ); kdDebug(5006) << "Filter log: new size = " - << QString::number( mCurrentLogSize ) << endl; + << TQString::number( mCurrentLogSize ) << endl; } else { @@ -140,18 +140,18 @@ void FilterLog::checkLogSize() } -bool FilterLog::saveToFile( QString fileName ) +bool FilterLog::saveToFile( TQString fileName ) { - QFile file( fileName ); + TQFile file( fileName ); if( file.open( IO_WriteOnly ) ) { fchmod( file.handle(), S_IRUSR | S_IWUSR ); { - QDataStream ds( &file ); - for ( QStringList::Iterator it = mLogEntries.begin(); + TQDataStream ds( &file ); + for ( TQStringList::Iterator it = mLogEntries.begin(); it != mLogEntries.end(); ++it ) { - QString tmpString = *it + '\n'; - QCString cstr( tmpString.local8Bit() ); + TQString tmpString = *it + '\n'; + TQCString cstr( tmpString.local8Bit() ); ds.writeRawBytes( cstr, cstr.size() ); } } |