diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /vcs/cvsservice/changelog.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'vcs/cvsservice/changelog.cpp')
-rw-r--r-- | vcs/cvsservice/changelog.cpp | 40 |
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"; } |