From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksirc/logfile.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'ksirc/logfile.cpp') 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 -#include +#include #include -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 ); } -- cgit v1.2.3