summaryrefslogtreecommitdiffstats
path: root/languages/cpp/main.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 /languages/cpp/main.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 'languages/cpp/main.cpp')
-rw-r--r--languages/cpp/main.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/languages/cpp/main.cpp b/languages/cpp/main.cpp
index 079fba37..b3e6bacb 100644
--- a/languages/cpp/main.cpp
+++ b/languages/cpp/main.cpp
@@ -7,11 +7,11 @@
#include "tag_creator.h"
#include "setuphelper.h"
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <catalog.h>
#include <kdebug.h>
@@ -39,7 +39,7 @@ public:
m_generateTags = b;
}
- void addDocDirectory( const QString& dir )
+ void addDocDirectory( const TQString& dir )
{
m_docDirectoryList.append( dir );
TagCreator::setDocumentationDirectories( m_docDirectoryList );
@@ -48,15 +48,15 @@ public:
void fileParsed( const ParsedFile& fileName )
{
std::cout << ( m_generateTags ? "generate tags for " : "checking " )
- << QFile::encodeName( fileName.fileName() ).data() << std::endl;
+ << TQFile::encodeName( fileName.fileName() ).data() << std::endl;
- QValueList<Problem> l = problems( fileName.fileName() );
- QValueList<Problem>::Iterator it = l.begin();
+ TQValueList<Problem> l = problems( fileName.fileName() );
+ TQValueList<Problem>::Iterator it = l.begin();
while ( it != l.end() )
{
const Problem & p = *it;
++it;
- std::cout << QFile::encodeName( fileName.fileName() ).data() << ":" << p.line() << ":"
+ std::cout << TQFile::encodeName( fileName.fileName() ).data() << ":" << p.line() << ":"
<< p.column() << ": " << p.text().latin1() << std::endl;
}
@@ -82,15 +82,15 @@ public:
// code provided by Reginald Stadlbauer <reggie@trolltech.com>
void setup()
{
- QString kdedir = getenv( "KDEDIR" );
+ TQString kdedir = getenv( "KDEDIR" );
if ( !kdedir.isNull() )
addIncludePath( kdedir + "/include" );
- QString qtdir = getenv( "QTDIR" );
+ TQString qtdir = getenv( "QTDIR" );
if ( !qtdir.isNull() )
addIncludePath( qtdir + "/include" );
- QString qmakespec = getenv( "QMAKESPEC" );
+ TQString qmakespec = getenv( "QMAKESPEC" );
if ( qmakespec.isNull() )
qmakespec = "linux-g++";
// #### implement other mkspecs and find a better way to find the
@@ -104,27 +104,27 @@ public:
addIncludePath( "/usr/include" );
addIncludePath( "/ust/local/include" );
bool ok;
- QString gccLibPath = SetupHelper::getGccIncludePath(&ok);
+ TQString gccLibPath = SetupHelper::getGccIncludePath(&ok);
if (!ok)
return;
- gccLibPath = gccLibPath.replace( QRegExp( "[\r\n]" ), "" );
+ gccLibPath = gccLibPath.replace( TQRegExp( "[\r\n]" ), "" );
addIncludePath( gccLibPath );
addIncludePath( "/usr/include/g++-3" );
addIncludePath( "/usr/include/g++" );
- QStringList lines = SetupHelper::getGccMacros(&ok);
+ TQStringList lines = SetupHelper::getGccMacros(&ok);
if (!ok)
return;
- for (QStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) {
- QStringList lst = QStringList::split( ' ', *it );
+ for (TQStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) {
+ TQStringList lst = TQStringList::split( ' ', *it );
if ( lst.count() != 3 )
continue;
addMacro( Macro( lst[1], lst[2] ) );
}
addMacro( Macro( "__cplusplus", "1" ) );
- QString incl = getenv( "INCLUDE" );
- QStringList includePaths = QStringList::split( ':', incl );
- QStringList::Iterator it = includePaths.begin();
+ TQString incl = getenv( "INCLUDE" );
+ TQStringList includePaths = TQStringList::split( ':', incl );
+ TQStringList::Iterator it = includePaths.begin();
while ( it != includePaths.end() )
{
addIncludePath( ( *it ).stripWhiteSpace() );
@@ -134,9 +134,9 @@ public:
}
else if ( qmakespec == "win32-borland" )
{
- QString incl = getenv( "INCLUDE" );
- QStringList includePaths = QStringList::split( ';', incl );
- QStringList::Iterator it = includePaths.begin();
+ TQString incl = getenv( "INCLUDE" );
+ TQStringList includePaths = TQStringList::split( ';', incl );
+ TQStringList::Iterator it = includePaths.begin();
while ( it != includePaths.end() )
{
addIncludePath( ( *it ).stripWhiteSpace() );
@@ -151,22 +151,22 @@ public:
private:
Catalog* catalog;
bool m_generateTags;
- QStringList m_docDirectoryList;
+ TQStringList m_docDirectoryList;
};
-void parseDirectory( Driver& driver, QDir& dir, bool rec, bool parseAllFiles )
+void parseDirectory( Driver& driver, TQDir& dir, bool rec, bool parseAllFiles )
{
- QStringList fileList;
+ TQStringList fileList;
if ( parseAllFiles )
- fileList = dir.entryList( QDir::Files );
+ fileList = dir.entryList( TQDir::Files );
else
fileList = dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tlh" );
- QStringList::Iterator it = fileList.begin();
+ TQStringList::Iterator it = fileList.begin();
while ( it != fileList.end() )
{
- QString fn = dir.path() + "/" + ( *it );
+ TQString fn = dir.path() + "/" + ( *it );
++it;
driver.parseFile( fn );
@@ -174,8 +174,8 @@ void parseDirectory( Driver& driver, QDir& dir, bool rec, bool parseAllFiles )
if ( rec )
{
- QStringList fileList = dir.entryList( QDir::Dirs );
- QStringList::Iterator it = fileList.begin();
+ TQStringList fileList = dir.entryList( TQDir::Dirs );
+ TQStringList::Iterator it = fileList.begin();
while ( it != fileList.end() )
{
if ( ( *it ).startsWith( "." ) )
@@ -184,7 +184,7 @@ void parseDirectory( Driver& driver, QDir& dir, bool rec, bool parseAllFiles )
continue;
}
- QDir subdir( dir.path() + "/" + ( *it ) );
+ TQDir subdir( dir.path() + "/" + ( *it ) );
++it;
parseDirectory( driver, subdir, rec, parseAllFiles );
@@ -205,7 +205,7 @@ int main( int argc, char* argv[] )
bool rec = false;
bool parseAllFiles = false;
- QString datadir = stddir.localkdedir() + "/" + KStandardDirs::kde_default( "data" );
+ TQString datadir = stddir.localkdedir() + "/" + KStandardDirs::kde_default( "data" );
if ( ! KStandardDirs::makeDir( datadir + "/kdevcppsupport/pcs/" ) )
{
kdWarning() << "*error* " << "could not create " << datadir + "/kdevcppsupport/pcs/" << endl << endl;
@@ -213,15 +213,15 @@ int main( int argc, char* argv[] )
}
- if ( !QFile::exists( datadir + "/kdevcppsupport/pcs/" ) )
+ if ( !TQFile::exists( datadir + "/kdevcppsupport/pcs/" ) )
{
kdWarning() << "*error* " << datadir + "/kdevcppsupport/pcs/" << " doesn't exists!!" << endl << endl;
return -1;
}
- QString dbFileName = datadir + "/kdevcppsupport/pcs/" + argv[ 1 ] + ".db";
+ TQString dbFileName = datadir + "/kdevcppsupport/pcs/" + argv[ 1 ] + ".db";
// std::cout << "dbFileName = " << dbFileName << std::endl;
- if ( QFile::exists( dbFileName ) )
+ if ( TQFile::exists( dbFileName ) )
{
kdWarning() << "*error* " << "database " << dbFileName << " already exists!" << endl << endl;
return -1;
@@ -240,7 +240,7 @@ int main( int argc, char* argv[] )
for ( int i = 2; i < argc; ++i )
{
- QString s( argv[ i ] );
+ TQString s( argv[ i ] );
if ( s == "-r" || s == "--recursive" )
{
rec = true;
@@ -267,7 +267,7 @@ int main( int argc, char* argv[] )
continue;
}
- QDir dir( s );
+ TQDir dir( s );
if ( !dir.exists() )
{
kdWarning() << "*error* " << "the directory " << dir.path() << " doesn't exists!" << endl << endl;