diff options
Diffstat (limited to 'parts/appwizard/kdevlicense.cpp')
-rw-r--r-- | parts/appwizard/kdevlicense.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/parts/appwizard/kdevlicense.cpp b/parts/appwizard/kdevlicense.cpp index 6987a54d..5e189422 100644 --- a/parts/appwizard/kdevlicense.cpp +++ b/parts/appwizard/kdevlicense.cpp @@ -18,23 +18,23 @@ */ #include "kdevlicense.h" -#include <qfile.h> -#include <qdatetime.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqdatetime.h> +#include <tqregexp.h> -KDevLicense::KDevLicense( const QString& name, const QString& fileName ) +KDevLicense::KDevLicense( const TQString& name, const TQString& fileName ) : m_name( name ) { readFile( fileName ); } -void KDevLicense::readFile( const QString& fileName ) +void KDevLicense::readFile( const TQString& fileName ) { - QFile f(fileName); + TQFile f(fileName); if (!f.open(IO_ReadOnly)) return; - QTextStream stream(&f); - QString str; + TQTextStream stream(&f); + TQString str; enum { readingText, readingFiles } mode = readingText; for(;;) { @@ -57,25 +57,25 @@ void KDevLicense::readFile( const QString& fileName ) } -QString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const QString& author, const QString& email, int leadingSpaces ) +TQString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ) { // first, build a CPP Style license - QString strFill; + TQString strFill; strFill.fill( ' ', leadingSpaces ); - QString str = + TQString str = strFill + "/***************************************************************************\n" + strFill + " * Copyright (C) $YEAR$ by $AUTHOR$ *\n" + strFill + " * $EMAIL$ *\n" + strFill + " * *\n"; -// str = str.arg(QDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); +// str = str.arg(TQDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); - QStringList::Iterator it; + TQStringList::Iterator it; for( it = m_rawLines.begin(); it != m_rawLines.end(); ++it ) { - str += QString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); + str += TQString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); } str += strFill + " ***************************************************************************/\n"; @@ -87,28 +87,28 @@ QString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const return str; case KDevFile::PascalStyle: - str.replace(QRegExp("/\\**\n \\*"), "{\n "); - str.replace(QRegExp("\\*\n \\*"), " \n "); - str.replace(QRegExp(" *\\**/\n"), "}\n"); + str.replace(TQRegExp("/\\**\n \\*"), "{\n "); + str.replace(TQRegExp("\\*\n \\*"), " \n "); + str.replace(TQRegExp(" *\\**/\n"), "}\n"); return str; case KDevFile::AdaStyle: - str.replace(QRegExp("/\\*"), "--"); - str.replace(QRegExp(" \\*"), "--"); - str.replace(QRegExp("\\*/"), "*"); + str.replace(TQRegExp("/\\*"), "--"); + str.replace(TQRegExp(" \\*"), "--"); + str.replace(TQRegExp("\\*/"), "*"); return str; case KDevFile::BashStyle: - str.replace(QRegExp("\\*|/"), "#"); - str.replace(QRegExp("\n ##"), "\n##"); - str.replace(QRegExp("\n #"), "\n# "); + str.replace(TQRegExp("\\*|/"), "#"); + str.replace(TQRegExp("\n ##"), "\n##"); + str.replace(TQRegExp("\n #"), "\n# "); return str; case KDevFile::XMLStyle: - str.replace(QRegExp("/\\*"), "<!--"); - str.replace(QRegExp("\n \\*"), "\n<!--"); - str.replace(QRegExp("\\*/?\n"), "-->\n"); - str.replace(QRegExp("\\*"), "_"); + str.replace(TQRegExp("/\\*"), "<!--"); + str.replace(TQRegExp("\n \\*"), "\n<!--"); + str.replace(TQRegExp("\\*/?\n"), "-->\n"); + str.replace(TQRegExp("\\*"), "_"); return str; } |