summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/misc.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/autotools/misc.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-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 'buildtools/autotools/misc.cpp')
-rw-r--r--buildtools/autotools/misc.cpp258
1 files changed, 129 insertions, 129 deletions
diff --git a/buildtools/autotools/misc.cpp b/buildtools/autotools/misc.cpp
index 97c449e7..e44a32c3 100644
--- a/buildtools/autotools/misc.cpp
+++ b/buildtools/autotools/misc.cpp
@@ -9,11 +9,11 @@
* *
***************************************************************************/
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdict.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdict.h>
#include <kdebug.h>
#include <kparts/componentfactory.h>
@@ -24,7 +24,7 @@
#include "kdevcompileroptions.h"
-static KDevCompilerOptions *createCompilerOptions( const QString &name, QObject *parent )
+static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent )
{
KService::Ptr service = KService::serviceByDesktopName( name );
if ( !service )
@@ -34,20 +34,20 @@ static KDevCompilerOptions *createCompilerOptions( const QString &name, QObject
}
- KLibFactory *factory = KLibLoader::self()->factory(QFile::encodeName(service->library()));
+ KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library()));
if (!factory) {
- QString errorMessage = KLibLoader::self()->lastErrorMessage();
+ TQString errorMessage = KLibLoader::self()->lastErrorMessage();
kdDebug(9020) << "There was an error loading the module " << service->name() << endl <<
"The diagnostics is:" << endl << errorMessage << endl;
exit(1);
}
- QStringList args;
- QVariant prop = service->property("X-KDevelop-Args");
+ TQStringList args;
+ TQVariant prop = service->property("X-KDevelop-Args");
if (prop.isValid())
- args = QStringList::split(" ", prop.toString());
+ args = TQStringList::split(" ", prop.toString());
- QObject *obj = factory->create(parent, service->name().latin1(),
+ TQObject *obj = factory->create(parent, service->name().latin1(),
"KDevCompilerOptions", args);
if (!obj->inherits("KDevCompilerOptions")) {
@@ -59,10 +59,10 @@ static KDevCompilerOptions *createCompilerOptions( const QString &name, QObject
return dlg;
/*
- QStringList args;
- QVariant prop = service->property( "X-KDevelop-Args" );
+ TQStringList args;
+ TQVariant prop = service->property( "X-KDevelop-Args" );
if ( prop.isValid() )
- args = QStringList::split( " ", prop.toString() );
+ args = TQStringList::split( " ", prop.toString() );
return KParts::ComponentFactory
::createInstanceFromService<KDevCompilerOptions>( service, parent,
@@ -70,25 +70,25 @@ static KDevCompilerOptions *createCompilerOptions( const QString &name, QObject
}
-QString AutoProjectTool::execFlagsDialog( const QString &compiler, const QString &flags, QWidget *parent )
+TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *parent )
{
KDevCompilerOptions * plugin = createCompilerOptions( compiler, parent );
if ( plugin )
{
- QString newflags = plugin->exec( parent, flags );
+ TQString newflags = plugin->exec( parent, flags );
delete plugin;
return newflags;
}
- return QString::null;
+ return TQString::null;
}
-QString AutoProjectTool::canonicalize( const QString &str )
+TQString AutoProjectTool::canonicalize( const TQString &str )
{
- QString res;
+ TQString res;
for ( uint i = 0; i < str.length(); ++i )
- res += ( str[ i ].isLetterOrNumber() || str[ i ] == '@' ) ? str[ i ] : QChar( '_' );
+ res += ( str[ i ].isLetterOrNumber() || str[ i ] == '@' ) ? str[ i ] : TQChar( '_' );
kdDebug(9020) << k_funcinfo << "normalized '" << str << "' to '" << res << "'" << endl;
return res;
@@ -101,26 +101,26 @@ QString AutoProjectTool::canonicalize( const QString &str )
* @param fileName
* @param variables
*/
-void AutoProjectTool::parseMakefileam(const QString &fileName, QMap<QString, QString> *variables)
+void AutoProjectTool::parseMakefileam(const TQString &fileName, TQMap<TQString, TQString> *variables)
{
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly))
{
return ;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
- QRegExp re("^(#kdevelop:[ \t]*)?([A-Za-z][@A-Za-z0-9_]*)[ \t]*([:\\+]?=)[ \t]*(.*)$");
+ TQRegExp re("^(#kdevelop:[ \t]*)?([A-Za-z][@A-Za-z0-9_]*)[ \t]*([:\\+]?=)[ \t]*(.*)$");
- QString last;
+ TQString last;
bool multiLine = false;
while (!stream.atEnd())
{
- QString s = stream.readLine().stripWhiteSpace();
+ TQString s = stream.readLine().stripWhiteSpace();
if (re.exactMatch(s))
{
- QString lhs = re.cap(2);
- QString rhs = re.cap(4);
+ TQString lhs = re.cap(2);
+ TQString rhs = re.cap(4);
if (rhs[ rhs.length() - 1 ] == '\\')
{
multiLine = true;
@@ -130,7 +130,7 @@ void AutoProjectTool::parseMakefileam(const QString &fileName, QMap<QString, QSt
// The need for stripWhiteSpace seems to be a Qt bug.
// make our list nice and neat.
- QStringList bits = QStringList::split(" ", rhs);
+ TQStringList bits = TQStringList::split(" ", rhs);
rhs = bits.join(" ");
if (re.cap(3) == "+=")
{
@@ -151,24 +151,24 @@ void AutoProjectTool::parseMakefileam(const QString &fileName, QMap<QString, QSt
{
multiLine = false;
}
- QStringList bits = QStringList::split(" ", s);
+ TQStringList bits = TQStringList::split(" ", s);
((*variables)[last] += ' ') += bits.join(" ");
}
}
f.close();
- QMap<QString, QString> list;
+ TQMap<TQString, TQString> list;
- for (QMap<QString, QString>::iterator iter = variables->begin();iter != variables->end();iter++)
+ for (TQMap<TQString, TQString>::iterator iter = variables->begin();iter != variables->end();iter++)
{
- QStringList items = QStringList::split(" ", iter.data());
- QMap<QString, QString> unique;
+ TQStringList items = TQStringList::split(" ", iter.data());
+ TQMap<TQString, TQString> unique;
for (uint i = 0;i < items.size();i++)
{
unique.insert(items[i], "");
}
- QString line;
- for (QMap<QString, QString>::iterator it = unique.begin();it != unique.end();it++)
+ TQString line;
+ for (TQMap<TQString, TQString>::iterator it = unique.begin();it != unique.end();it++)
{
line += it.key() + ' ';
}
@@ -189,7 +189,7 @@ void AutoProjectTool::parseMakefileam(const QString &fileName, QMap<QString, QSt
* @param fileName
* @param variables key=value string of entries to add
*/
-void AutoProjectTool::addToMakefileam(const QString &fileName, QMap<QString, QString> variables)
+void AutoProjectTool::addToMakefileam(const TQString &fileName, TQMap<TQString, TQString> variables)
{
AutoProjectTool::addRemoveMakefileam(fileName, variables, true);
}
@@ -202,42 +202,42 @@ void AutoProjectTool::addToMakefileam(const QString &fileName, QMap<QString, QSt
* @param fileName
* @param variables key=value string of entries to add
*/
-void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QString> variables )
+void AutoProjectTool::setMakefileam ( const TQString &fileName, TQMap<TQString, TQString> variables )
{
- for ( QMap<QString, QString>::Iterator it0 = variables.begin(); it0 != variables.end(); ++it0 )
+ for ( TQMap<TQString, TQString>::Iterator it0 = variables.begin(); it0 != variables.end(); ++it0 )
{
kdDebug ( 9020 ) << "key (set): " << it0.key() << "=" << it0.data() << endl;
}
// input file reading
- QFile fin ( fileName );
+ TQFile fin ( fileName );
if ( !fin.open ( IO_ReadOnly ) )
{
return ;
}
- QTextStream ins ( &fin );
+ TQTextStream ins ( &fin );
// output file writing.
- QFile fout ( fileName + "#" );
+ TQFile fout ( fileName + "#" );
if ( !fout.open ( IO_WriteOnly ) )
{
fin.close();
return ;
}
- QTextStream outs ( &fout );
+ TQTextStream outs ( &fout );
// variables
- QRegExp re ( "^(#kdevelop:[ \t]*)?([A-Za-z][@A-Za-z0-9_]*)[ \t]*([:\\+]?=)[ \t]*(.*)$" );
+ TQRegExp re ( "^(#kdevelop:[ \t]*)?([A-Za-z][@A-Za-z0-9_]*)[ \t]*([:\\+]?=)[ \t]*(.*)$" );
bool multiLine = false;
- QString lastLhs;
- QMap<QString, QString> seenLhs;
+ TQString lastLhs;
+ TQMap<TQString, TQString> seenLhs;
while ( !fin.atEnd() )
{
- QString s = ins.readLine();
+ TQString s = ins.readLine();
if ( re.exactMatch ( s ) )
{
- QString lhs = re.cap ( 2 );
+ TQString lhs = re.cap ( 2 );
bool notFound = ( variables.find ( lhs ) == variables.end() );
if ( notFound )
@@ -254,7 +254,7 @@ void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QSt
else
{
// we are interested in this line..
- QString rhs = re.cap ( 4 ).stripWhiteSpace();
+ TQString rhs = re.cap ( 4 ).stripWhiteSpace();
if ( rhs[ rhs.length() - 1 ] == '\\' )
{
// save it for when we have the whole line..
@@ -266,11 +266,11 @@ void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QSt
// deal with it now - a single line
// we are adding our interested values to this line and writing it
// now write the line out if it is not going to be empty.
- QString newLine ( lhs );
+ TQString newLine ( lhs );
newLine += " = ";
bool added = false;
int len = newLine.length();
- QStringList variableList = QStringList::split ( ' ', variables[lhs] );
+ TQStringList variableList = TQStringList::split ( ' ', variables[lhs] );
for ( uint count = 0; count < variableList.size(); count++ )
{
len += variableList[count].length() + 1;
@@ -314,11 +314,11 @@ void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QSt
{
// we are adding our interested values to this line and writing it
// now write the line out if it is not going to be empty.
- QString newLine ( lastLhs );
+ TQString newLine ( lastLhs );
newLine += " = ";
bool added = false;
int len = newLine.length();
- QStringList variableList = QStringList::split ( ' ', variables[lastLhs] );
+ TQStringList variableList = TQStringList::split ( ' ', variables[lastLhs] );
for ( uint count = 0; count < variableList.size(); count++ )
{
len += variableList[count].length() + 1;
@@ -350,13 +350,13 @@ void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QSt
}
}
- for ( QMap<QString, QString>::Iterator it0 = variables.begin(); it0 != variables.end(); ++it0 )
+ for ( TQMap<TQString, TQString>::Iterator it0 = variables.begin(); it0 != variables.end(); ++it0 )
{
- QString newLine ( it0.key() );
+ TQString newLine ( it0.key() );
newLine += " = ";
bool added = false;
int len = newLine.length();
- QStringList variableList = QStringList::split ( ' ', it0.data() );
+ TQStringList variableList = TQStringList::split ( ' ', it0.data() );
for ( uint count = 0; count < variableList.size(); count++ )
{
len += variableList[count].length() + 1;
@@ -381,7 +381,7 @@ void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QSt
fin.close();
fout.close();
- QDir().rename ( fileName + "#", fileName );
+ TQDir().rename ( fileName + "#", fileName );
}
@@ -394,39 +394,39 @@ void AutoProjectTool::setMakefileam ( const QString &fileName, QMap<QString, QSt
* @param add true= add these key,value pairs, false = remove. You can have empty values for an add - the whole line is
* removed. For adding, we will not add an empty line.
*/
-void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString, QString> variables, bool add)
+void AutoProjectTool::addRemoveMakefileam(const TQString &fileName, TQMap<TQString, TQString> variables, bool add)
{
// input file reading
- QFile fin(fileName);
+ TQFile fin(fileName);
if (!fin.open(IO_ReadOnly))
{
return ;
}
- QTextStream ins(&fin);
+ TQTextStream ins(&fin);
// output file writing.
- QFile fout(fileName + "#");
+ TQFile fout(fileName + "#");
if (!fout.open(IO_WriteOnly))
{
fin.close();
return ;
}
- QTextStream outs(&fout);
+ TQTextStream outs(&fout);
// variables
- QRegExp re("^(#kdevelop:[ \t]*)?([A-Za-z][@A-Za-z0-9_]*)[ \t]*([:\\+]?=)[ \t]*(.*)$");
+ TQRegExp re("^(#kdevelop:[ \t]*)?([A-Za-z][@A-Za-z0-9_]*)[ \t]*([:\\+]?=)[ \t]*(.*)$");
// build key=map of values to add
// map can be empty.we never add an empty key, but do remove empty keys from the file..
- QDict< QMap<QString, bool> > interest;
- for (QMap<QString, QString>::Iterator it0 = variables.begin(); it0 != variables.end(); ++it0)
+ TQDict< TQMap<TQString, bool> > interest;
+ for (TQMap<TQString, TQString>::Iterator it0 = variables.begin(); it0 != variables.end(); ++it0)
{
kdDebug(9020) << "key (" << add<<"): " << it0.key() << "="<< it0.data() << endl;
- QMap<QString, bool>* set = new QMap<QString, bool>();
+ TQMap<TQString, bool>* set = new TQMap<TQString, bool>();
if (!it0.data().stripWhiteSpace().isEmpty())
{
- QStringList variableList = QStringList::split(' ', it0.data());
+ TQStringList variableList = TQStringList::split(' ', it0.data());
for (uint i = 0; i < variableList.count(); i++)
{
@@ -437,16 +437,16 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
}
bool multiLine = false;
- QString lastLhs;
- QStringList lastRhs;
- QMap<QString, QString> seenLhs;
+ TQString lastLhs;
+ TQStringList lastRhs;
+ TQMap<TQString, TQString> seenLhs;
while (!fin.atEnd())
{
- QString s = ins.readLine();
+ TQString s = ins.readLine();
if (re.exactMatch(s))
{
- QString lhs = re.cap(2);
- QMap<QString, bool>* ourRhs = interest.find(lhs);
+ TQString lhs = re.cap(2);
+ TQMap<TQString, bool>* ourRhs = interest.find(lhs);
if (!ourRhs)
{
@@ -457,20 +457,20 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
else
{
// we are interested in this line..
- QString rhs = re.cap(4).stripWhiteSpace();
+ TQString rhs = re.cap(4).stripWhiteSpace();
if (rhs[ rhs.length() - 1 ] == '\\')
{
// save it for when we have the whole line..
multiLine = true;
lastLhs = lhs;
rhs.setLength(rhs.length() - 1);
- lastRhs += QStringList::split(" ", rhs);
+ lastRhs += TQStringList::split(" ", rhs);
}
else
{
// deal with it now.
- QStringList bits = QStringList::split(" ", rhs);
+ TQStringList bits = TQStringList::split(" ", rhs);
if (add)
{
// we are adding our interested values to this line and writing it
@@ -478,7 +478,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
// add this line to we we want to add to remove duplicates.
for (uint index = 0; index < bits.size(); index++)
{
- QMap<QString, bool>::iterator findEntry = ourRhs->find(bits[index]);
+ TQMap<TQString, bool>::iterator findEntry = ourRhs->find(bits[index]);
if (findEntry == ourRhs->end())
{
// we haven't seen it, so add it, so we don't add it again later..
@@ -489,7 +489,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
// case we will do so soon. so we can ignore this now..
}
// now write the line out if it is not going to be empty.
- QString newLine(lhs);
+ TQString newLine(lhs);
if (seenLhs.find(lhs) == seenLhs.end())
{
newLine += " = ";
@@ -502,7 +502,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
int len = newLine.length();
bool added = false;
- QValueList<QString> keys = ourRhs->keys();
+ TQValueList<TQString> keys = ourRhs->keys();
for (uint count = 0; count < keys.size(); count++)
{
// if out entry is true, add it..
@@ -536,7 +536,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
if (!ourRhs->empty())
{
// check if any of these values are down to remove.
- QString newLine(lhs);
+ TQString newLine(lhs);
if (seenLhs.find(lhs) == seenLhs.end())
{
newLine += " = ";
@@ -549,9 +549,9 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
int len = newLine.length();
bool added = false;
- for (QStringList::Iterator posIter = bits.begin(); posIter != bits.end();posIter++)
+ for (TQStringList::Iterator posIter = bits.begin(); posIter != bits.end();posIter++)
{
- QMap<QString, bool>::iterator findEntry = ourRhs->find(*posIter);
+ TQMap<TQString, bool>::iterator findEntry = ourRhs->find(*posIter);
if (findEntry == ourRhs->end())
{
// we do not want to remove it..
@@ -592,13 +592,13 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
// end of the multi line..
multiLine = false;
}
- lastRhs += QStringList::split(" ", s);
+ lastRhs += TQStringList::split(" ", s);
if (!multiLine)
{
// now we have to deal with this multiLine value..
// ourRhs will always be a value, as we only get multiLine if we're interested in it..
- QMap<QString, bool>* ourRhs = interest.find(lastLhs);
+ TQMap<TQString, bool>* ourRhs = interest.find(lastLhs);
if (add)
{
@@ -607,7 +607,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
// add this line to we we want to add to remove duplicates.
for (uint index = 0; index < lastRhs.size(); index++)
{
- QMap<QString, bool>::iterator findEntry = ourRhs->find(lastRhs[index]);
+ TQMap<TQString, bool>::iterator findEntry = ourRhs->find(lastRhs[index]);
if (findEntry == ourRhs->end())
{
// we haven't seen it, so add it, so we don't add it again later..
@@ -618,7 +618,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
// case we will do so soon. so we can ignore this now..
}
// now write the line out if it is not going to be empty.
- QString newLine(lastLhs);
+ TQString newLine(lastLhs);
if (seenLhs.find(lastLhs) == seenLhs.end())
{
newLine += " = ";
@@ -631,7 +631,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
int len = newLine.length();
bool added = false;
- QValueList<QString> keys = ourRhs->keys();
+ TQValueList<TQString> keys = ourRhs->keys();
for (uint count = 0; count < keys.size(); count++)
{
// if out entry is true, add it..
@@ -664,7 +664,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
if (!ourRhs->empty())
{
// check if any of these values are down to remove.
- QString newLine(lastLhs);
+ TQString newLine(lastLhs);
if (seenLhs.find(lastLhs) == seenLhs.end())
{
newLine += " = ";
@@ -676,9 +676,9 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
}
int len = newLine.length();
bool added = false;
- for (QStringList::Iterator posIter = lastRhs.begin(); posIter != lastRhs.end();posIter++)
+ for (TQStringList::Iterator posIter = lastRhs.begin(); posIter != lastRhs.end();posIter++)
{
- QMap<QString, bool>::iterator findEntry = ourRhs->find(*posIter);
+ TQMap<TQString, bool>::iterator findEntry = ourRhs->find(*posIter);
if (findEntry == ourRhs->end())
{
// we do not want to remove it..
@@ -717,13 +717,13 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
if (add)
{
- QDictIterator<QMap<QString, bool> > it(interest);
+ TQDictIterator<TQMap<TQString, bool> > it(interest);
for (; it.current(); ++it)
{
- QString lhs = it.currentKey();
- QMap<QString, bool>* ourRhs = it.current();
+ TQString lhs = it.currentKey();
+ TQMap<TQString, bool>* ourRhs = it.current();
- QString newLine(lhs);
+ TQString newLine(lhs);
if (seenLhs.find(lhs) == seenLhs.end())
{
newLine += " = ";
@@ -735,7 +735,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
}
int len = newLine.length();
bool added = false;
- QValueList<QString> keys = ourRhs->keys();
+ TQValueList<TQString> keys = ourRhs->keys();
for (uint count = 0; count < keys.size(); count++)
{
if ((*ourRhs)[keys[count]])
@@ -767,7 +767,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
fin.close();
fout.close();
- QDir().rename(fileName + "#", fileName);
+ TQDir().rename(fileName + "#", fileName);
}
/**
@@ -776,7 +776,7 @@ void AutoProjectTool::addRemoveMakefileam(const QString &fileName, QMap<QString,
* @param fileName full path to Makefile.am
* @param variables lines to remove items from.
*/
-void AutoProjectTool::removeFromMakefileam(const QString &fileName, QMap <QString, QString> variables)
+void AutoProjectTool::removeFromMakefileam(const TQString &fileName, TQMap <TQString, TQString> variables)
{
AutoProjectTool::addRemoveMakefileam(fileName, variables, false);
}
@@ -787,35 +787,35 @@ void AutoProjectTool::removeFromMakefileam(const QString &fileName, QMap <QStrin
* @param configureinpath
* @return list of all the values
*/
-QStringList AutoProjectTool::configureinLoadMakefiles(QString configureinpath)
+TQStringList AutoProjectTool::configureinLoadMakefiles(TQString configureinpath)
{
- QFile configurein(configureinpath);
+ TQFile configurein(configureinpath);
if (!configurein.open(IO_ReadOnly))
{
kdDebug(9020) << k_funcinfo << " - couldn't open file: " << configureinpath << endl;
- return QStringList();
+ return TQStringList();
}
- QTextStream stream(&configurein);
- QStringList list;
+ TQTextStream stream(&configurein);
+ TQStringList list;
- QString ac_match("^AC_OUTPUT");
+ TQString ac_match("^AC_OUTPUT");
- QRegExp ac_regex(ac_match);
+ TQRegExp ac_regex(ac_match);
bool multiLine = false;
- QChar cont('\\');
- QRegExp close("\\)");
- QRegExp open("\\(");
+ TQChar cont('\\');
+ TQRegExp close("\\)");
+ TQRegExp open("\\(");
while (!stream.eof())
{
- QString line = stream.readLine().stripWhiteSpace();
+ TQString line = stream.readLine().stripWhiteSpace();
if (multiLine)
{
if (close.search(line) >= 0)
{
line = line.replace(close.search(line), 1, "");
- list += QStringList::split(" ", line);
+ list += TQStringList::split(" ", line);
break;
}
else
@@ -824,7 +824,7 @@ QStringList AutoProjectTool::configureinLoadMakefiles(QString configureinpath)
{
line.setLength(line.length() - 1);
}
- list += QStringList::split(" ", line);
+ list += TQStringList::split(" ", line);
}
}
else if (ac_regex.search(line) >= 0)
@@ -849,7 +849,7 @@ QStringList AutoProjectTool::configureinLoadMakefiles(QString configureinpath)
}
}
- list = QStringList::split(" ", line);
+ list = TQStringList::split(" ", line);
if (!multiLine)
{
@@ -870,42 +870,42 @@ QStringList AutoProjectTool::configureinLoadMakefiles(QString configureinpath)
* @param configureinpath
* @param makefiles
*/
-void AutoProjectTool::configureinSaveMakefiles(QString fileName, QStringList makefiles)
+void AutoProjectTool::configureinSaveMakefiles(TQString fileName, TQStringList makefiles)
{
// input file reading
- QFile fin(fileName);
+ TQFile fin(fileName);
if (!fin.open(IO_ReadOnly))
{
return ;
}
- QTextStream ins(&fin);
+ TQTextStream ins(&fin);
// output file writing.
- QFile fout(fileName + "#");
+ TQFile fout(fileName + "#");
if (!fout.open(IO_WriteOnly))
{
fin.close();
return ;
}
- QTextStream outs(&fout);
+ TQTextStream outs(&fout);
// remove duplicates if any..
- QMap<QString, QString> toAdd;
+ TQMap<TQString, TQString> toAdd;
for (uint i = 0; i < makefiles.size();i++)
{
toAdd.insert(makefiles[i].stripWhiteSpace(), "");
}
- QString ac_match("^AC_OUTPUT");
- QRegExp ac_regex(ac_match);
+ TQString ac_match("^AC_OUTPUT");
+ TQRegExp ac_regex(ac_match);
bool multiLine = false;
- QChar cont('\\');
- QRegExp close("\\)");
- QRegExp open("\\(");
+ TQChar cont('\\');
+ TQRegExp close("\\)");
+ TQRegExp open("\\(");
bool done = false;
while (!fin.atEnd())
{
- QString line = ins.readLine();
+ TQString line = ins.readLine();
if (done)
{
outs << line << endl;
@@ -918,8 +918,8 @@ void AutoProjectTool::configureinSaveMakefiles(QString fileName, QStringList mak
if (close.search(line) >= 0)
{
int len = 10;
- QString acline("AC_OUTPUT(");
- for (QMap<QString, QString>::iterator iter = toAdd.begin();iter != toAdd.end();iter++)
+ TQString acline("AC_OUTPUT(");
+ for (TQMap<TQString, TQString>::iterator iter = toAdd.begin();iter != toAdd.end();iter++)
{
len += iter.key().length();
if (len > 80)
@@ -964,8 +964,8 @@ void AutoProjectTool::configureinSaveMakefiles(QString fileName, QStringList mak
if (!multiLine)
{
int len = 10;
- QString acline("AC_OUTPUT(");
- for (QMap<QString, QString>::iterator iter = toAdd.begin();iter != toAdd.end();iter++)
+ TQString acline("AC_OUTPUT(");
+ for (TQMap<TQString, TQString>::iterator iter = toAdd.begin();iter != toAdd.end();iter++)
{
len += iter.key().length();
if (len > 80)
@@ -992,7 +992,7 @@ void AutoProjectTool::configureinSaveMakefiles(QString fileName, QStringList mak
fin.close();
fout.close();
- QDir().rename(fileName + "#", fileName);
+ TQDir().rename(fileName + "#", fileName);
}