diff options
Diffstat (limited to 'ksirc/logfile.cpp')
-rw-r--r-- | ksirc/logfile.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/ksirc/logfile.cpp b/ksirc/logfile.cpp index 6a15e51e..2246cd30 100644 --- a/ksirc/logfile.cpp +++ b/ksirc/logfile.cpp @@ -9,12 +9,12 @@ #include <assert.h> -#include <qdir.h> +#include <tqdir.h> #include <kstandarddirs.h> -LogFile::LogFile( const QString &channel, const QString &server ) - : m_channel( channel ), m_server( server ), m_file( new QFile() ), +LogFile::LogFile( const TQString &channel, const TQString &server ) + : m_channel( channel ), m_server( server ), m_file( new TQFile() ), m_flushTimerId( -1 ) { } @@ -39,16 +39,16 @@ void LogFile::open() assert( m_file->isOpen() == true ); - log( QString::fromLatin1( "### Log session started at " ) - + QDateTime::currentDateTime().toString() - + QString::fromLatin1( "###\n" ) ); + log( TQString::fromLatin1( "### Log session started at " ) + + TQDateTime::currentDateTime().toString() + + TQString::fromLatin1( "###\n" ) ); } void LogFile::closeLog() { - log( QString::fromLatin1( "### Log session terminated at " ) - + QDateTime::currentDateTime().toString() - + QString::fromLatin1( "###\n" ) ); + log( TQString::fromLatin1( "### Log session terminated at " ) + + TQDateTime::currentDateTime().toString() + + TQString::fromLatin1( "###\n" ) ); if ( m_flushTimerId != -1 ) killTimer( m_flushTimerId ); @@ -56,7 +56,7 @@ void LogFile::closeLog() m_file->close(); } -void LogFile::log( const QString &message ) +void LogFile::log( const TQString &message ) { m_file->writeBlock( message.local8Bit(), message.length() ); @@ -64,7 +64,7 @@ void LogFile::log( const QString &message ) m_flushTimerId = startTimer( 60000 ); // flush each minute } -void LogFile::timerEvent( QTimerEvent * ) +void LogFile::timerEvent( TQTimerEvent * ) { if ( m_file ) m_file->flush(); @@ -73,12 +73,12 @@ void LogFile::timerEvent( QTimerEvent * ) m_flushTimerId = -1; } -QString LogFile::makeLogFileName( const QString &channel, const QString &server, int suffix ) +TQString LogFile::makeLogFileName( const TQString &channel, const TQString &server, int suffix ) { - QString res = channel + '_'; + TQString res = channel + '_'; - QDate dt = QDate::currentDate(); - QString dateStr; + TQDate dt = TQDate::currentDate(); + TQString dateStr; dateStr.sprintf( "%.4d_%.2d_%.2d_", dt.year(), dt.month(), dt.day() ); res += dateStr; @@ -87,7 +87,7 @@ QString LogFile::makeLogFileName( const QString &channel, const QString &server, res += ".log"; if ( suffix > -1 ) - res += '.' + QString::number( suffix ); + res += '.' + TQString::number( suffix ); return locateLocal( "appdata", "logs/" + res ); } |