diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /karm/test/runscripts.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/test/runscripts.cpp')
-rw-r--r-- | karm/test/runscripts.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/karm/test/runscripts.cpp b/karm/test/runscripts.cpp index aa5449541..1b44f4821 100644 --- a/karm/test/runscripts.cpp +++ b/karm/test/runscripts.cpp @@ -18,32 +18,32 @@ */ #include <kdebug.h> -#include <qdir.h> -#include <qfile.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextstream.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextstream.h> #include "script.h" -static QString srcdir(); +static TQString srcdir(); static int runscripts -( const QString &interpreter, const QString &extension, const QString &path ); +( const TQString &interpreter, const TQString &extension, const TQString &path ); -const QString dots = ".................................................."; -const QString not_a_test_filename_prefix = "__"; +const TQString dots = ".................................................."; +const TQString not_a_test_filename_prefix = "__"; // Read srcdir from Makefile (for builddir != srcdir). -QString srcdir() +TQString srcdir() { bool found = false; - QString dir; + TQString dir; - QFile file( "Makefile" ); + TQFile file( "Makefile" ); if ( !file.open( IO_ReadOnly | IO_Translate ) ) return ""; - QTextStream in( &file ); - QString line; + TQTextStream in( &file ); + TQString line; while ( !found && !in.atEnd() ) { line = in.readLine(); @@ -60,29 +60,29 @@ QString srcdir() } int runscripts -( const QString &interpreter, const QString &extension, const QString &path ) +( const TQString &interpreter, const TQString &extension, const TQString &path ) { int rval = 0; int oneBadApple = 0; - QStringList files; + TQStringList files; - QDir dir( path ); + TQDir dir( path ); Script* s = new Script( dir ); dir.setNameFilter( extension ); - dir.setFilter( QDir::Files ); - dir.setSorting( QDir::Name | QDir::IgnoreCase ); + dir.setFilter( TQDir::Files ); + dir.setSorting( TQDir::Name | TQDir::IgnoreCase ); const QFileInfoList *list = dir.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( !rval && ( fi = it.current() ) != 0 ) { // Don't run scripts that are shared routines. if ( ! fi->fileName().startsWith( not_a_test_filename_prefix ) ) { s->addArgument( interpreter ); - s->addArgument( path + QDir::separator() + fi->fileName().latin1() ); + s->addArgument( path + TQDir::separator() + fi->fileName().latin1() ); // Thorsten's xautomation tests run with user interaction by default. if ( interpreter == "sh" ) s->addArgument( "--batch" ); @@ -116,7 +116,7 @@ int main( int, char** ) { int rval = 0; - QString path = srcdir(); + TQString path = srcdir(); if ( !rval ) rval = runscripts( "python", "*.py *.Py *.PY *.pY", path ); |