summaryrefslogtreecommitdiffstats
path: root/ksirc/logfile.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/logfile.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/logfile.cpp')
-rw-r--r--ksirc/logfile.cpp32
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 );
}