summaryrefslogtreecommitdiffstats
path: root/vcs/cvsservice/changelog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcs/cvsservice/changelog.cpp')
-rw-r--r--vcs/cvsservice/changelog.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/vcs/cvsservice/changelog.cpp b/vcs/cvsservice/changelog.cpp
index a63a2b92..1e676f43 100644
--- a/vcs/cvsservice/changelog.cpp
+++ b/vcs/cvsservice/changelog.cpp
@@ -9,9 +9,9 @@
* *
***************************************************************************/
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kemailsettings.h>
@@ -24,7 +24,7 @@ ChangeLogEntry::ChangeLogEntry()
authorEmail = emailConfig.getSetting( KEMailSettings::EmailAddress );
authorName = emailConfig.getSetting( KEMailSettings::RealName );
- QDate currDate = QDate::currentDate();
+ TQDate currDate = TQDate::currentDate();
date = currDate.toString( "yyyy-MM-dd" );
}
@@ -32,38 +32,38 @@ ChangeLogEntry::~ChangeLogEntry()
{
}
-void ChangeLogEntry::addLine( const QString &aLine )
+void ChangeLogEntry::addLine( const TQString &aLine )
{
lines << aLine;
}
-void ChangeLogEntry::addLines( const QStringList &someLines )
+void ChangeLogEntry::addLines( const TQStringList &someLines )
{
lines += someLines;
}
-void streamCopy( QTextStream &is, QTextStream &os )
+void streamCopy( TQTextStream &is, TQTextStream &os )
{
while (!is.eof())
os << is.readLine() << "\n"; // readLine() eats '\n' !!
}
-void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, const QString &startLineString )
+void ChangeLogEntry::addToLog( const TQString &logFilePath, const bool prepend, const TQString &startLineString )
{
if (prepend) // add on head
{
- QString fakeLogFilePath = logFilePath + ".fake";
+ TQString fakeLogFilePath = logFilePath + ".fake";
- QFile fakeFile( fakeLogFilePath );
- QFile changeLogFile( logFilePath );
+ TQFile fakeFile( fakeLogFilePath );
+ TQFile changeLogFile( logFilePath );
{
if (!fakeFile.open( IO_WriteOnly | IO_Append))
return;
if (changeLogFile.open( IO_ReadOnly )) // A Changelog already exist
{
- QTextStream is( &changeLogFile );
- QTextStream os( &fakeFile );
+ TQTextStream is( &changeLogFile );
+ TQTextStream os( &fakeFile );
// Put current entry
os << toString( startLineString );
@@ -72,7 +72,7 @@ void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, c
}
else // ChangeLog doesn't exist: just write our entry
{
- QTextStream t( &fakeFile );
+ TQTextStream t( &fakeFile );
t << toString( startLineString );
}
fakeFile.close();
@@ -85,8 +85,8 @@ void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, c
if (changeLogFile.open( IO_WriteOnly ))
{
- QTextStream os( &changeLogFile );
- QTextStream is( &fakeFile );
+ TQTextStream os( &changeLogFile );
+ TQTextStream is( &fakeFile );
// Write the rest of the change log file
streamCopy( is, os );
@@ -97,18 +97,18 @@ void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, c
}
else // add on tail
{
- QFile f( logFilePath );
+ TQFile f( logFilePath );
if (!f.open( IO_WriteOnly | IO_Append))
return;
- QTextStream t( &f );
+ TQTextStream t( &f );
t << toString( startLineString );
}
}
-QString ChangeLogEntry::toString( const QString &startLineString ) const
+TQString ChangeLogEntry::toString( const TQString &startLineString ) const
{
- QString header = date + " " + authorName + " <" + authorEmail + ">\n";
+ TQString header = date + " " + authorName + " <" + authorEmail + ">\n";
return header + startLineString + lines.join( "\n" + startLineString ) + "\n\n";
}