diff options
Diffstat (limited to 'buildtools/autotools/autoprojectpart.cpp')
-rw-r--r-- | buildtools/autotools/autoprojectpart.cpp | 468 |
1 files changed, 234 insertions, 234 deletions
diff --git a/buildtools/autotools/autoprojectpart.cpp b/buildtools/autotools/autoprojectpart.cpp index ea0b6896..38604ee0 100644 --- a/buildtools/autotools/autoprojectpart.cpp +++ b/buildtools/autotools/autoprojectpart.cpp @@ -21,14 +21,14 @@ #include "addicondlg.h" #include "autoprojectwidget.h" -#include <qdom.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qpopupmenu.h> -#include <qstringlist.h> -#include <qwhatsthis.h> -#include <qregexp.h> -#include <qgroupbox.h> +#include <tqdom.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqpopupmenu.h> +#include <tqstringlist.h> +#include <tqwhatsthis.h> +#include <tqregexp.h> +#include <tqgroupbox.h> #include <kapplication.h> @@ -65,7 +65,7 @@ static const KDevPluginInfo data("kdevautoproject"); K_EXPORT_COMPONENT_FACTORY( libkdevautoproject, AutoProjectFactory( data ) ) -AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStringList &args) +AutoProjectPart::AutoProjectPart(TQObject *parent, const char *name, const TQStringList &args) : KDevBuildTool(&data, parent, name ? name : "AutoProjectPart") , m_lastCompilationFailed(false) { @@ -80,7 +80,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin m_widget = new AutoProjectWidget(this, m_isKDE); m_widget->setIcon(SmallIcon( info()->icon() )); m_widget->setCaption(i18n("Automake Manager")); - QWhatsThis::add(m_widget, i18n("<b>Automake manager</b><p>" + TQWhatsThis::add(m_widget, i18n("<b>Automake manager</b><p>" "The project tree consists of two parts. The 'overview' " "in the upper half shows the subprojects, each one having a " "Makefile.am. The 'details' view in the lower half shows the " @@ -90,7 +90,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin KAction *action; action = new KAction( i18n("Add Translation..."), 0, - this, SLOT(slotAddTranslation()), + this, TQT_SLOT(slotAddTranslation()), actionCollection(), "project_addtranslation" ); action->setToolTip(i18n("Add translation")); action->setWhatsThis(i18n("<b>Add translation</b><p>Creates .po file for the selected language.")); @@ -101,7 +101,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setEnabled(false); action = new KAction( i18n("&Build Project"), "make_kdevelop", Key_F8, - this, SLOT(slotBuild()), + this, TQT_SLOT(slotBuild()), actionCollection(), "build_build" ); action->setToolTip(i18n("Build project")); action->setWhatsThis(i18n("<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>" @@ -110,7 +110,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("Build &Active Target"), "make_kdevelop", Key_F7, - this, SLOT(slotBuildActiveTarget()), + this, TQT_SLOT(slotBuildActiveTarget()), actionCollection(), "build_buildactivetarget" ); action->setToolTip(i18n("Build active target")); action->setWhatsThis(i18n("<b>Build active target</b><p>Constructs a series of make commands to build an active target. " @@ -120,7 +120,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("Compile &File"), "make_kdevelop", - this, SLOT(slotCompileFile()), + this, TQT_SLOT(slotCompileFile()), actionCollection(), "build_compilefile" ); action->setToolTip(i18n("Compile file")); action->setWhatsThis(i18n("<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>" @@ -129,7 +129,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("Run Configure"), 0, - this, SLOT(slotConfigure()), + this, TQT_SLOT(slotConfigure()), actionCollection(), "build_configure" ); action->setToolTip(i18n("Run configure")); action->setWhatsThis(i18n("<b>Run configure</b><p>Executes <b>configure</b> with flags, arguments " @@ -138,14 +138,14 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("Run automake && friends"), 0, - this, SLOT(slotMakefilecvs()), + this, TQT_SLOT(slotMakefilecvs()), actionCollection(), "build_makefilecvs" ); action->setToolTip(i18n("Run automake && friends")); action->setWhatsThis(i18n("<b>Run automake && friends</b><p>Executes<br><b>make -f Makefile.cvs</b><br><b>./configure</b><br>commands from the project directory.")); action->setGroup("autotools"); action = new KAction( i18n("Install"), 0, - this, SLOT(slotInstall()), + this, TQT_SLOT(slotInstall()), actionCollection(), "build_install" ); action->setToolTip(i18n("Install")); action->setWhatsThis(i18n("<b>Install</b><p>Runs <b>make install</b> command from the project directory.<br>" @@ -154,7 +154,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("Install (as root user)"), 0, - this, SLOT(slotInstallWithKdesu()), + this, TQT_SLOT(slotInstallWithKdesu()), actionCollection(), "build_install_kdesu" ); action->setToolTip(i18n("Install as root user")); action->setWhatsThis(i18n("<b>Install</b><p>Runs <b>make install</b> command from the project directory with root privileges.<br>" @@ -164,7 +164,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("&Clean Project"), 0, - this, SLOT(slotClean()), + this, TQT_SLOT(slotClean()), actionCollection(), "build_clean" ); action->setToolTip(i18n("Clean project")); action->setWhatsThis(i18n("<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>" @@ -173,7 +173,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("&Distclean"), 0, - this, SLOT(slotDistClean()), + this, TQT_SLOT(slotDistClean()), actionCollection(), "build_distclean" ); action->setToolTip(i18n("Distclean")); action->setWhatsThis(i18n("<b>Distclean</b><p>Runs <b>make distclean</b> command from the project directory.<br>" @@ -182,7 +182,7 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin action->setGroup("autotools"); action = new KAction( i18n("Make Messages && Merge"), 0, - this, SLOT(slotMakeMessages()), + this, TQT_SLOT(slotMakeMessages()), actionCollection(), "build_messages" ); action->setToolTip(i18n("Make messages && merge")); action->setWhatsThis(i18n("<b>Make messages && merge</b><p>Runs <b>make package-messages</b> command from the project directory.<br>" @@ -202,36 +202,36 @@ AutoProjectPart::AutoProjectPart(QObject *parent, const char *name, const QStrin "Modify build configurations in project settings dialog, <b>Configure Options</b> tab.")); buildConfigAction->setGroup("autotools"); - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); if (!DomUtil::readBoolEntry(dom, "/kdevautoproject/run/disable_default")) { //ok we handle the execute in this kpart action = new KAction( i18n("Execute Program"), "exec", SHIFT+Key_F9, - this, SLOT(slotExecute()), + this, TQT_SLOT(slotExecute()), actionCollection(), "build_execute" ); action->setToolTip(i18n("Execute program")); action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the currently active target or the main program specified in project settings, <b>Run Options</b> tab.")); action->setGroup("autotools"); } - connect( buildConfigAction, SIGNAL(activated(const QString&)), - this, SLOT(slotBuildConfigChanged(const QString&)) ); - connect( buildConfigAction->popupMenu(), SIGNAL(aboutToShow()), - this, SLOT(slotBuildConfigAboutToShow()) ); + connect( buildConfigAction, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotBuildConfigChanged(const TQString&)) ); + connect( buildConfigAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotBuildConfigAboutToShow()) ); -// connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), this, SLOT(projectConfigWidget(KDialogBase*)) ); +// connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("Configure Options"), CONFIGURE_OPTIONS, info()->icon() ); _configProxy->createProjectConfigPage( i18n("Run Options"), RUN_OPTIONS, info()->icon() ); _configProxy->createProjectConfigPage( i18n("Make Options"), MAKE_OPTIONS, info()->icon() ); - connect( _configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )), - this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) ); + connect( _configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )) ); - connect( makeFrontend(), SIGNAL(commandFinished(const QString&)), - this, SLOT(slotCommandFinished(const QString&)) ); - connect( makeFrontend(), SIGNAL(commandFailed(const QString&)), - this, SLOT(slotCommandFailed(const QString&)) ); + connect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)), + this, TQT_SLOT(slotCommandFinished(const TQString&)) ); + connect( makeFrontend(), TQT_SIGNAL(commandFailed(const TQString&)), + this, TQT_SLOT(slotCommandFailed(const TQString&)) ); setWantautotools(); @@ -250,25 +250,25 @@ AutoProjectPart::~AutoProjectPart() } -void AutoProjectPart::insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int pagenumber ) +void AutoProjectPart::insertConfigWidget( const KDialogBase* dlg, TQWidget * page, unsigned int pagenumber ) { switch ( pagenumber ) { case CONFIGURE_OPTIONS: { ConfigureOptionsWidget *w2 = new ConfigureOptionsWidget(this, page ); - connect( dlg, SIGNAL(okClicked()), w2, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w2, TQT_SLOT(accept()) ); } break; case RUN_OPTIONS: { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); if (!DomUtil::readBoolEntry(dom, "/kdevautoproject/run/disable_default")) { //ok we handle the execute in this kpart RunOptionsWidget *w3 = new RunOptionsWidget(*projectDom(), "/kdevautoproject", buildDirectory(), page ); - connect( dlg, SIGNAL(okClicked()), w3, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w3, TQT_SLOT(accept()) ); } } break; @@ -276,21 +276,21 @@ void AutoProjectPart::insertConfigWidget( const KDialogBase* dlg, QWidget * page case MAKE_OPTIONS: { MakeOptionsWidget *w4 = new MakeOptionsWidget(*projectDom(), "/kdevautoproject", page ); - connect( dlg, SIGNAL(okClicked()), w4, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w4, TQT_SLOT(accept()) ); } break; } } -void AutoProjectPart::openProject(const QString &dirName, const QString &projectName) +void AutoProjectPart::openProject(const TQString &dirName, const TQString &projectName) { m_projectName = projectName; m_projectPath =dirName; m_widget->openProject(dirName); - QDomDocument &dom = *projectDom(); - QString activeTarget = DomUtil::readEntry(dom, "/kdevautoproject/general/activetarget"); + TQDomDocument &dom = *projectDom(); + TQString activeTarget = DomUtil::readEntry(dom, "/kdevautoproject/general/activetarget"); kdDebug(9020) << k_funcinfo << "activeTarget " << activeTarget << endl; if (!activeTarget.isEmpty()) m_widget->setActiveTarget(activeTarget); @@ -312,13 +312,13 @@ void AutoProjectPart::closeProject() } -QString AutoProjectPart::projectDirectory() const +TQString AutoProjectPart::projectDirectory() const { return m_projectPath; } -QString AutoProjectPart::projectName() const +TQString AutoProjectPart::projectName() const { return m_projectName; } @@ -342,12 +342,12 @@ DomUtil::PairList AutoProjectPart::runEnvironmentVars() const * if /kdevautoproject/run/directoryradio == custom * The custom directory absolute path */ -QString AutoProjectPart::runDirectory() const +TQString AutoProjectPart::runDirectory() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); - QString cwd; + TQString cwd; if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/useglobalprogram", false) || !m_widget->activeTarget() ) { cwd = defaultRunDirectory("kdevautoproject"); @@ -374,17 +374,17 @@ QString AutoProjectPart::runDirectory() const * The absolute path to executable */ -QString AutoProjectPart::mainProgram() const +TQString AutoProjectPart::mainProgram() const { - QDomDocument * dom = projectDom(); + TQDomDocument * dom = projectDom(); - if ( !dom ) return QString(); + if ( !dom ) return TQString(); if( DomUtil::readBoolEntry(*dom, "/kdevautoproject/run/useglobalprogram", false) ) { - QString DomMainProgram = DomUtil::readEntry(*dom, "/kdevautoproject/run/mainprogram"); + TQString DomMainProgram = DomUtil::readEntry(*dom, "/kdevautoproject/run/mainprogram"); - if ( DomMainProgram.isEmpty() ) return QString(); + if ( DomMainProgram.isEmpty() ) return TQString(); if ( DomMainProgram.startsWith("/") ) // assume absolute path { @@ -392,7 +392,7 @@ QString AutoProjectPart::mainProgram() const } else // assume builddir relative path { - QString relprojectpath = URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ); + TQString relprojectpath = URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ); if( !relprojectpath.isEmpty() ) relprojectpath = "/" + relprojectpath; return buildDirectory() + relprojectpath + "/" + DomMainProgram; @@ -407,7 +407,7 @@ QString AutoProjectPart::mainProgram() const KMessageBox::error( m_widget, i18n("There is no active target.\n" "Unable to determine the main program."), i18n("No active target found") ); kdDebug ( 9020 ) << k_funcinfo << "Error! : There's no active target! -> Unable to determine the main program in AutoProjectPart::mainProgram()" << endl; - return QString::null; + return TQString::null; } if ( titem->primary != "PROGRAMS" ) { @@ -416,10 +416,10 @@ QString AutoProjectPart::mainProgram() const "to be the active target, set a main program under\n" "Project -> Project Options -> Run Options").arg(titem->name).arg(titem->primary), i18n("Active target is not a library") ); kdDebug ( 9020 ) << k_funcinfo << "Error! : Active target isn't binary (" << titem->primary << ") ! -> Unable to determine the main program in AutoProjectPart::mainProgram()" << endl; - return QString::null; + return TQString::null; } - QString relprojectpath = URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ); + TQString relprojectpath = URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ); if( !relprojectpath.isEmpty() ) relprojectpath = "/" + relprojectpath; return buildDirectory() + relprojectpath + "/" + activeDirectory() + "/" + titem->name; @@ -427,10 +427,10 @@ QString AutoProjectPart::mainProgram() const } -/** Retuns a QString with the debug command line arguments */ -QString AutoProjectPart::debugArguments() const +/** Retuns a TQString with the debug command line arguments */ +TQString AutoProjectPart::debugArguments() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/useglobalprogram", false) || !m_widget->activeTarget() ) { @@ -442,10 +442,10 @@ QString AutoProjectPart::debugArguments() const } -/** Retuns a QString with the run command line arguments */ -QString AutoProjectPart::runArguments() const +/** Retuns a TQString with the run command line arguments */ +TQString AutoProjectPart::runArguments() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/useglobalprogram", false) || !m_widget->activeTarget() ) { @@ -457,13 +457,13 @@ QString AutoProjectPart::runArguments() const } -QString AutoProjectPart::activeDirectory() const +TQString AutoProjectPart::activeDirectory() const { return m_widget->activeDirectory(); } -QStringList AutoProjectPart::allFiles() const +TQStringList AutoProjectPart::allFiles() const { return m_widget->allFiles(); } @@ -471,8 +471,8 @@ QStringList AutoProjectPart::allFiles() const void AutoProjectPart::setWantautotools() { - QDomDocument &dom = *projectDom(); - QDomElement el = DomUtil::elementByPath(dom, "/kdevautoproject/make"); + TQDomDocument &dom = *projectDom(); + TQDomElement el = DomUtil::elementByPath(dom, "/kdevautoproject/make"); if ( el.namedItem("envvars").isNull() ) { DomUtil::PairList list; list << DomUtil::Pair("WANT_AUTOCONF_2_5", "1"); @@ -482,7 +482,7 @@ void AutoProjectPart::setWantautotools() } -QString AutoProjectPart::makeEnvironment() const +TQString AutoProjectPart::makeEnvironment() const { // Get the make environment variables pairs into the environstr string // in the form of: "ENV_VARIABLE=ENV_VALUE" @@ -491,7 +491,7 @@ QString AutoProjectPart::makeEnvironment() const DomUtil::PairList envvars = DomUtil::readPairListEntry(*projectDom(), "/kdevautoproject/make/envvars", "envvar", "name", "value"); - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; for (it = envvars.begin(); it != envvars.end(); ++it) { @@ -509,18 +509,18 @@ QString AutoProjectPart::makeEnvironment() const } -void AutoProjectPart::addFile(const QString &fileName) +void AutoProjectPart::addFile(const TQString &fileName) { - QStringList fileList; + TQStringList fileList; fileList.append ( fileName ); this->addFiles ( fileList ); } -void AutoProjectPart::addFiles ( const QStringList& fileList ) +void AutoProjectPart::addFiles ( const TQStringList& fileList ) { - QString directory, name; - QStringList::ConstIterator it; + TQString directory, name; + TQStringList::ConstIterator it; bool messageBoxShown = false; for ( it = fileList.begin(); it != fileList.end(); ++it ) @@ -554,15 +554,15 @@ void AutoProjectPart::addFiles ( const QStringList& fileList ) m_widget->addFiles(fileList); } -void AutoProjectPart::removeFile(const QString &fileName) +void AutoProjectPart::removeFile(const TQString &fileName) { - QStringList fileList; + TQStringList fileList; fileList.append ( fileName ); this->removeFiles ( fileList ); } -void AutoProjectPart::removeFiles ( const QStringList& fileList ) +void AutoProjectPart::removeFiles ( const TQStringList& fileList ) { /// \FIXME m_widget->removeFiles does nothing! m_widget->removeFiles ( fileList ); @@ -570,18 +570,18 @@ void AutoProjectPart::removeFiles ( const QStringList& fileList ) emit removedFilesFromProject ( fileList ); } -QStringList AutoProjectPart::allBuildConfigs() const +TQStringList AutoProjectPart::allBuildConfigs() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); - QStringList allConfigs; + TQStringList allConfigs; allConfigs.append("default"); - QDomNode node = dom.documentElement().namedItem("kdevautoproject").namedItem("configurations"); - QDomElement childEl = node.firstChild().toElement(); + TQDomNode node = dom.documentElement().namedItem("kdevautoproject").namedItem("configurations"); + TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { - QString config = childEl.tagName(); + TQString config = childEl.tagName(); kdDebug(9020) << k_funcinfo << "Found config " << config << endl; if (config != "default") allConfigs.append(config); @@ -592,11 +592,11 @@ QStringList AutoProjectPart::allBuildConfigs() const } -QString AutoProjectPart::currentBuildConfig() const +TQString AutoProjectPart::currentBuildConfig() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); - QString config = DomUtil::readEntry(dom, "/kdevautoproject/general/useconfiguration"); + TQString config = DomUtil::readEntry(dom, "/kdevautoproject/general/useconfiguration"); if (config.isEmpty() || !allBuildConfigs().contains(config)) config = "default"; @@ -604,11 +604,11 @@ QString AutoProjectPart::currentBuildConfig() const } -QString AutoProjectPart::buildDirectory() const +TQString AutoProjectPart::buildDirectory() const { - QString prefix = "/kdevautoproject/configurations/" + currentBuildConfig() + "/"; + TQString prefix = "/kdevautoproject/configurations/" + currentBuildConfig() + "/"; - QString builddir = DomUtil::readEntry(*projectDom(), prefix + "builddir"); + TQString builddir = DomUtil::readEntry(*projectDom(), prefix + "builddir"); if (builddir.isEmpty()) return topsourceDirectory(); else if (builddir.startsWith("/")) @@ -617,11 +617,11 @@ QString AutoProjectPart::buildDirectory() const return projectDirectory() + "/" + builddir; } -QString AutoProjectPart::topsourceDirectory() const +TQString AutoProjectPart::topsourceDirectory() const { - QString prefix = "/kdevautoproject/configurations/" + currentBuildConfig() + "/"; + TQString prefix = "/kdevautoproject/configurations/" + currentBuildConfig() + "/"; - QString topsourcedir = DomUtil::readEntry(*projectDom(), prefix + "topsourcedir"); + TQString topsourcedir = DomUtil::readEntry(*projectDom(), prefix + "topsourcedir"); if (topsourcedir.isEmpty()) return projectDirectory(); else if (topsourcedir.startsWith("/")) @@ -630,45 +630,45 @@ QString AutoProjectPart::topsourceDirectory() const return projectDirectory() + "/" + topsourcedir; } -QString AutoProjectPart::constructMakeCommandLine(const QString &dir, const QString &target) const +TQString AutoProjectPart::constructMakeCommandLine(const TQString &dir, const TQString &target) const { - QString preCommand; - QFileInfo fi1(); + TQString preCommand; + TQFileInfo fi1(); kdDebug(9020) << k_funcinfo << "Looking for Makefile in " << dir << endl; - if ( !QFile::exists(dir + "/GNUmakefile") && !QFile::exists(dir + "/makefile") - && ! QFile::exists(dir + "/Makefile") ) + if ( !TQFile::exists(dir + "/GNUmakefile") && !TQFile::exists(dir + "/makefile") + && ! TQFile::exists(dir + "/Makefile") ) { - if (!QFile::exists(buildDirectory() + "/configure")) + if (!TQFile::exists(buildDirectory() + "/configure")) { int r = KMessageBox::questionYesNo(m_widget, i18n("%1\nThere is no Makefile in this directory\n" "and no configure script for this project.\n" - "Run automake & friends and configure first?").arg(buildDirectory()), QString::null, i18n("Run Them"), i18n("Do Not Run")); + "Run automake & friends and configure first?").arg(buildDirectory()), TQString::null, i18n("Run Them"), i18n("Do Not Run")); if (r == KMessageBox::No) - return QString::null; + return TQString::null; preCommand = makefileCvsCommand(); if (preCommand.isNull()) - return QString::null; + return TQString::null; preCommand += " && "; preCommand += configureCommand() + " && "; } else { - int r = KMessageBox::questionYesNo(m_widget, i18n("%1\nThere is no Makefile in this directory. Run 'configure' first?").arg(dir), QString::null, i18n("Run configure"), i18n("Do Not Run")); + int r = KMessageBox::questionYesNo(m_widget, i18n("%1\nThere is no Makefile in this directory. Run 'configure' first?").arg(dir), TQString::null, i18n("Run configure"), i18n("Do Not Run")); if (r == KMessageBox::No) - return QString::null; + return TQString::null; preCommand = configureCommand() + " && "; } } - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); - QString cmdline = DomUtil::readEntry(dom, "/kdevautoproject/make/makebin"); + TQString cmdline = DomUtil::readEntry(dom, "/kdevautoproject/make/makebin"); int prio = DomUtil::readIntEntry(dom, "/kdevautoproject/make/prio"); - QString nice; + TQString nice; kdDebug(9020) << k_funcinfo << "nice = " << prio<< endl; if (prio != 0) { - nice = QString("nice -n%1 ").arg(prio); + nice = TQString("nice -n%1 ").arg(prio); } if (cmdline.isEmpty()) @@ -680,7 +680,7 @@ QString AutoProjectPart::constructMakeCommandLine(const QString &dir, const QStr if (runmultiple && jobs != 0) { cmdline += " -j"; - cmdline += QString::number(jobs); + cmdline += TQString::number(jobs); } if (DomUtil::readBoolEntry(dom, "/kdevautoproject/make/dontact")) cmdline += " -n"; @@ -690,7 +690,7 @@ QString AutoProjectPart::constructMakeCommandLine(const QString &dir, const QStr cmdline.prepend(nice); cmdline.prepend(makeEnvironment()); - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += KProcess::quote(dir); dircmd += " && "; @@ -698,7 +698,7 @@ QString AutoProjectPart::constructMakeCommandLine(const QString &dir, const QStr } -void AutoProjectPart::startMakeCommand(const QString &dir, const QString &target, bool withKdesu) +void AutoProjectPart::startMakeCommand(const TQString &dir, const TQString &target, bool withKdesu) { if (partController()->saveAllFiles()==false) return; //user cancelled @@ -715,18 +715,18 @@ void AutoProjectPart::startMakeCommand(const QString &dir, const QString &target /** Adds the make command for the libraries that the target depends on * to the make frontend queue (this is a recursive function) */ -bool AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem, QStringList& alreadyScheduledDeps) +bool AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem, TQStringList& alreadyScheduledDeps) { - QString addstr = (titem->primary == "PROGRAMS")? titem->ldadd : titem->libadd; - QStringList l2 = QStringList::split(QRegExp("[ \t]"), addstr); // list of dependencies - QString tdir; // temp target directory - QString tname; // temp target name - QString tcmd; // temp command line - QStringList::Iterator l2it; + TQString addstr = (titem->primary == "PROGRAMS")? titem->ldadd : titem->libadd; + TQStringList l2 = TQStringList::split(TQRegExp("[ \t]"), addstr); // list of dependencies + TQString tdir; // temp target directory + TQString tname; // temp target name + TQString tcmd; // temp command line + TQStringList::Iterator l2it; for (l2it = l2.begin(); l2it != l2.end(); ++l2it) { - QString dependency = *l2it; + TQString dependency = *l2it; if (dependency.startsWith("$(top_builddir)/")) { // These are the internal libraries @@ -753,7 +753,7 @@ bool AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem, QStri SubprojectItem *spi = m_widget->subprojectItemForPath( dependency.left(pos) ); if (spi) { - QPtrList< TargetItem > tl = spi->targets; + TQPtrList< TargetItem > tl = spi->targets; // Cycle through the list of targets to find the one we're looking for TargetItem *ti = tl.first(); do @@ -812,11 +812,11 @@ void AutoProjectPart::slotBuild() m_needMakefileCvs = false; } - startMakeCommand(buildDirectory(), QString::fromLatin1("")); + startMakeCommand(buildDirectory(), TQString::fromLatin1("")); } -void AutoProjectPart::buildTarget(QString relpath, TargetItem* titem) +void AutoProjectPart::buildTarget(TQString relpath, TargetItem* titem) { if ( !titem ) @@ -825,12 +825,12 @@ void AutoProjectPart::buildTarget(QString relpath, TargetItem* titem) //m_lastCompilationFailed = false; // Calculate the complete name of the target and store it in name - QString name = titem->name; + TQString name = titem->name; if ( titem->primary == "KDEDOCS" ) name = "index.cache.bz2"; // Calculate the full path of the target and store it in path - QString path = buildDirectory(); + TQString path = buildDirectory(); if (!path.endsWith("/") && !path.isEmpty()) path += "/"; if (relpath.at(0) == '/') @@ -843,16 +843,16 @@ void AutoProjectPart::buildTarget(QString relpath, TargetItem* titem) // Add the make command for the libraries that the target depends on to the make frontend queue // if this recursive behavour is un-wanted comment the next line - QStringList deps; + TQStringList deps; if( !queueInternalLibDependenciesBuild(titem, deps) ) return; // Calculate the "make" command line for the target - //QString relpath = dir.path().mid( projectDirectory().length() ); + //TQString relpath = dir.path().mid( projectDirectory().length() ); m_runProg=buildDirectory() + "/" + relpath+"/"+name; kdDebug(9020) << "buildTarget:" << buildDirectory()<< endl; kdDebug(9020) << "buildTarget:" << relpath << " " << path << ": "<< name << " : " << m_runProg << endl; - QString tcmd = constructMakeCommandLine( path, name ); + TQString tcmd = constructMakeCommandLine( path, name ); // Call make if (!tcmd.isNull()) @@ -882,60 +882,60 @@ void AutoProjectPart::slotCompileFile() if (!part || !part->url().isLocalFile()) return; - QString fileName = part->url().path(); - QFileInfo fi(fileName); - QString sourceDir = fi.dirPath(); - QString baseName = fi.baseName(true); + TQString fileName = part->url().path(); + TQFileInfo fi(fileName); + TQString sourceDir = fi.dirPath(); + TQString baseName = fi.baseName(true); kdDebug(9020) << "Compiling " << fileName << " in dir " << sourceDir << " with baseName " << baseName << endl; - QString projectDir = projectDirectory(); + TQString projectDir = projectDirectory(); if (!sourceDir.startsWith(projectDir)) { KMessageBox::sorry(m_widget, i18n("Can only compile files in directories which belong to the project.")); return; } - QString buildDir = buildDirectory() + sourceDir.mid(projectDir.length()); - QString target = baseName + ".lo"; + TQString buildDir = buildDirectory() + sourceDir.mid(projectDir.length()); + TQString target = baseName + ".lo"; kdDebug(9020) << "builddir " << buildDir << ", target " << target << endl; startMakeCommand(buildDir, target); } -QString AutoProjectPart::configureCommand() const +TQString AutoProjectPart::configureCommand() const { - QDomDocument &dom = *projectDom(); - QString prefix = "/kdevautoproject/configurations/" + currentBuildConfig() + "/"; + TQDomDocument &dom = *projectDom(); + TQString prefix = "/kdevautoproject/configurations/" + currentBuildConfig() + "/"; - QString cmdline = "\"" + topsourceDirectory(); + TQString cmdline = "\"" + topsourceDirectory(); cmdline += "/configure\""; - QString cc = DomUtil::readEntry(dom, prefix + "ccompilerbinary"); + TQString cc = DomUtil::readEntry(dom, prefix + "ccompilerbinary"); if (!cc.isEmpty()) - cmdline.prepend(QString("CC=%1 ").arg(cc)); - QString cflags = DomUtil::readEntry(dom, prefix + "cflags"); + cmdline.prepend(TQString("CC=%1 ").arg(cc)); + TQString cflags = DomUtil::readEntry(dom, prefix + "cflags"); if (!cflags.isEmpty()) - cmdline.prepend(QString("CFLAGS=\"%1\" ").arg(cflags)); - QString cxx = DomUtil::readEntry(dom, prefix + "cxxcompilerbinary"); + cmdline.prepend(TQString("CFLAGS=\"%1\" ").arg(cflags)); + TQString cxx = DomUtil::readEntry(dom, prefix + "cxxcompilerbinary"); if (!cxx.isEmpty()) - cmdline.prepend(QString("CXX=%1 ").arg(cxx)); - QString cxxflags = DomUtil::readEntry(dom, prefix + "cxxflags"); + cmdline.prepend(TQString("CXX=%1 ").arg(cxx)); + TQString cxxflags = DomUtil::readEntry(dom, prefix + "cxxflags"); if (!cxxflags.isEmpty()) - cmdline.prepend(QString("CXXFLAGS=\"%1\" ").arg(cxxflags)); - QString f77 = DomUtil::readEntry(dom, prefix + "f77compilerbinary"); + cmdline.prepend(TQString("CXXFLAGS=\"%1\" ").arg(cxxflags)); + TQString f77 = DomUtil::readEntry(dom, prefix + "f77compilerbinary"); if (!f77.isEmpty()) - cmdline.prepend(QString("F77=%1 ").arg(f77)); - QString fflags = DomUtil::readEntry(dom, prefix + "f77flags"); + cmdline.prepend(TQString("F77=%1 ").arg(f77)); + TQString fflags = DomUtil::readEntry(dom, prefix + "f77flags"); if (!fflags.isEmpty()) - cmdline.prepend(QString("FFLAGS=\"%1\" ").arg(fflags)); - QString cppflags = DomUtil::readEntry(dom, prefix + "cppflags"); + cmdline.prepend(TQString("FFLAGS=\"%1\" ").arg(fflags)); + TQString cppflags = DomUtil::readEntry(dom, prefix + "cppflags"); if (!cppflags.isEmpty()) - cmdline.prepend(QString("CPPFLAGS=\"%1\" ").arg(cppflags)); - QString ldflags = DomUtil::readEntry(dom, prefix + "ldflags"); + cmdline.prepend(TQString("CPPFLAGS=\"%1\" ").arg(cppflags)); + TQString ldflags = DomUtil::readEntry(dom, prefix + "ldflags"); if (!ldflags.isEmpty()) - cmdline.prepend(QString("LDFLAGS=\"%1\" ").arg(ldflags)); + cmdline.prepend(TQString("LDFLAGS=\"%1\" ").arg(ldflags)); - QString configargs = DomUtil::readEntry(dom, prefix + "configargs"); + TQString configargs = DomUtil::readEntry(dom, prefix + "configargs"); if (!configargs.isEmpty()) { cmdline += " "; cmdline += configargs; @@ -944,7 +944,7 @@ QString AutoProjectPart::configureCommand() const DomUtil::PairList envvars = DomUtil::readPairListEntry(*projectDom(), prefix + "envvars", "envvar", "name", "value"); - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; for (it = envvars.begin(); it != envvars.end(); ++it) { environstr += (*it).first; @@ -954,11 +954,11 @@ QString AutoProjectPart::configureCommand() const } cmdline.prepend(environstr); - QString builddir = buildDirectory(); - QString dircmd; + TQString builddir = buildDirectory(); + TQString dircmd; // if the build directory doesn't exist, add it's creation to the configureCommand - if ( !QFile::exists(builddir)) { + if ( !TQFile::exists(builddir)) { dircmd = "mkdir "; dircmd += KProcess::quote(builddir); dircmd += " && "; @@ -974,14 +974,14 @@ QString AutoProjectPart::configureCommand() const void AutoProjectPart::slotConfigure() { - QString cmdline = configureCommand(); + TQString cmdline = configureCommand(); if (cmdline.isNull()) return; makeFrontend()->queueCommand(buildDirectory(), cmdline); } -QString AutoProjectPart::makefileCvsCommand() const +TQString AutoProjectPart::makefileCvsCommand() const { kdDebug(9020) << "makefileCvsCommand: runDirectory :" << runDirectory() << ":" <<endl; kdDebug(9020) << "makefileCvsCommand: topsourceDirectory :" << topsourceDirectory() << ":" <<endl; @@ -989,33 +989,33 @@ QString AutoProjectPart::makefileCvsCommand() const kdDebug(9020) << "makefileCvsCommand: currentBuildConfig :" << currentBuildConfig() << ":" <<endl; - QString cmdline = DomUtil::readEntry(*projectDom(), "/kdevautoproject/make/makebin"); + TQString cmdline = DomUtil::readEntry(*projectDom(), "/kdevautoproject/make/makebin"); if (cmdline.isEmpty()) cmdline = MAKE_COMMAND; int prio = DomUtil::readIntEntry(*projectDom(), "/kdevautoproject/make/prio"); - QString nice; + TQString nice; kdDebug(9020) << "makefileCvsCommand() nice = " << prio<< endl; if (prio != 0) { - nice = QString("nice -n%1 ").arg(prio); + nice = TQString("nice -n%1 ").arg(prio); } - if (QFile::exists(topsourceDirectory() + "/Makefile.cvs")) + if (TQFile::exists(topsourceDirectory() + "/Makefile.cvs")) cmdline += " -f Makefile.cvs"; - else if (QFile::exists(topsourceDirectory() + "/Makefile.dist")) + else if (TQFile::exists(topsourceDirectory() + "/Makefile.dist")) cmdline += " -f Makefile.dist"; - else if (QFile::exists(topsourceDirectory() + "/autogen.sh")) + else if (TQFile::exists(topsourceDirectory() + "/autogen.sh")) cmdline = "./autogen.sh"; else { KMessageBox::sorry(m_widget, i18n("There is neither a Makefile.cvs file nor an " "autogen.sh script in the project directory.")); - return QString::null; + return TQString::null; } cmdline.prepend(nice); cmdline.prepend(makeEnvironment()); - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += KProcess::quote(topsourceDirectory()); dircmd += " && "; @@ -1024,7 +1024,7 @@ QString AutoProjectPart::makefileCvsCommand() const void AutoProjectPart::slotMakefilecvs() { - QString cmdline = makefileCvsCommand(); + TQString cmdline = makefileCvsCommand(); if ( cmdline.isNull() ) return; @@ -1034,7 +1034,7 @@ void AutoProjectPart::slotMakefilecvs() void AutoProjectPart::slotInstall() { - startMakeCommand(buildDirectory(), QString::fromLatin1("install")); + startMakeCommand(buildDirectory(), TQString::fromLatin1("install")); } @@ -1045,25 +1045,25 @@ void AutoProjectPart::slotInstallWithKdesu() slotBuild(); // After that issue "make install" with the root user - startMakeCommand(buildDirectory(), QString::fromLatin1("install"), true); + startMakeCommand(buildDirectory(), TQString::fromLatin1("install"), true); } void AutoProjectPart::slotClean() { - startMakeCommand(buildDirectory(), QString::fromLatin1("clean")); + startMakeCommand(buildDirectory(), TQString::fromLatin1("clean")); } void AutoProjectPart::slotDistClean() { - startMakeCommand(buildDirectory(), QString::fromLatin1("distclean")); + startMakeCommand(buildDirectory(), TQString::fromLatin1("distclean")); } void AutoProjectPart::slotMakeMessages() { - startMakeCommand(buildDirectory(), QString::fromLatin1("package-messages")); + startMakeCommand(buildDirectory(), TQString::fromLatin1("package-messages")); } @@ -1076,7 +1076,7 @@ void AutoProjectPart::slotMakeMessages() void AutoProjectPart::slotExecute() { partController()->saveAllFiles(); - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); m_runProg=m_runProg.isEmpty()?mainProgram():m_runProg; @@ -1103,7 +1103,7 @@ void AutoProjectPart::slotExecute() if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/autokdesu", false) ){ //slotInstallWithKdesu assumes that it hasn't just been build... kdDebug(9020) << "slotExecute: before startMakeCommand" << endl; - _auto ? slotInstallWithKdesu() : startMakeCommand(buildDirectory(), QString::fromLatin1("install"), true); + _auto ? slotInstallWithKdesu() : startMakeCommand(buildDirectory(), TQString::fromLatin1("install"), true); } else{ kdDebug(9020) << "slotExecute: before slotInstall" << endl; @@ -1120,7 +1120,7 @@ void AutoProjectPart::slotExecute() if (appFrontend()->isRunning()) { if (KMessageBox::questionYesNo(m_widget, i18n("Your application is currently running. Do you want to restart it?"), i18n("Application Already Running"), i18n("&Restart Application"), i18n("Do &Nothing")) == KMessageBox::No) return; - connect(appFrontend(), SIGNAL(processExited()), SLOT(slotExecute2())); + connect(appFrontend(), TQT_SIGNAL(processExited()), TQT_SLOT(slotExecute2())); appFrontend()->stopApplication(); return; } @@ -1128,30 +1128,30 @@ void AutoProjectPart::slotExecute() slotExecute2(); } -void AutoProjectPart::executeTarget(const QDir& dir, const TargetItem* titem) +void AutoProjectPart::executeTarget(const TQDir& dir, const TargetItem* titem) { m_executeAfterBuild=true; partController()->saveAllFiles(); bool is_dirty = false; - QDateTime t = QFileInfo(dir , titem->name ).lastModified(); - QPtrListIterator<FileItem> it( titem->sources ); + TQDateTime t = TQFileInfo(dir , titem->name ).lastModified(); + TQPtrListIterator<FileItem> it( titem->sources ); for( ; it.current() ; ++it ) { - if( t < QFileInfo(dir , (*it)->name).lastModified()) + if( t < TQFileInfo(dir , (*it)->name).lastModified()) is_dirty = true; } if( DomUtil::readBoolEntry(*projectDom(), "/kdevautoproject/run/autocompile", true) && is_dirty ) { - connect( makeFrontend(), SIGNAL(commandFinished(const QString&)), this, SLOT(slotExecuteTargetAfterBuild(const QString&)) ); - connect( makeFrontend(), SIGNAL(commandFailed(const QString&)), this, SLOT(slotNotExecuteTargetAfterBuildFailed(const QString&)) ); + connect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)), this, TQT_SLOT(slotExecuteTargetAfterBuild(const TQString&)) ); + connect( makeFrontend(), TQT_SIGNAL(commandFailed(const TQString&)), this, TQT_SLOT(slotNotExecuteTargetAfterBuildFailed(const TQString&)) ); m_runProg=titem->name; m_executeTargetAfterBuild.first = dir; m_executeTargetAfterBuild.second = const_cast<TargetItem*>(titem); - QString relpath = "/" + URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ) + "/" + m_widget->selectedSubproject()->subdir; + TQString relpath = "/" + URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ) + "/" + m_widget->selectedSubproject()->subdir; kdDebug(9020) << "executeTarget: before buildTarget " << relpath << endl; buildTarget(relpath, const_cast<TargetItem*>(titem)); return; @@ -1160,7 +1160,7 @@ void AutoProjectPart::executeTarget(const QDir& dir, const TargetItem* titem) bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevautoproject/run/terminal"); - QString program = environString(); + TQString program = environString(); if ( !titem ) { KMessageBox::error( m_widget, i18n("There is no active target.\n" @@ -1177,7 +1177,7 @@ void AutoProjectPart::executeTarget(const QDir& dir, const TargetItem* titem) }else program += buildDirectory() + "/" + URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ) + "/" + m_widget->selectedSubproject()->relativePath()+ "/" + titem->name; - QString args = DomUtil::readEntry(*projectDom(), "/kdevautoproject/run/runarguments/" + titem->name); + TQString args = DomUtil::readEntry(*projectDom(), "/kdevautoproject/run/runarguments/" + titem->name); program += " " + args; kdDebug(9020) << "executeTarget:cmd=" << dir.path() << " " << program << endl; @@ -1186,27 +1186,27 @@ void AutoProjectPart::executeTarget(const QDir& dir, const TargetItem* titem) } -void AutoProjectPart::slotExecuteTargetAfterBuild(const QString& command) +void AutoProjectPart::slotExecuteTargetAfterBuild(const TQString& command) { kdDebug(9020) << "slotExecuteTargetAfterBuild " << command << endl; if ( m_executeAfterBuild && constructMakeCommandLine(m_executeTargetAfterBuild.first.path(), m_executeTargetAfterBuild.second->name) == command ) { - disconnect( makeFrontend(), SIGNAL(commandFinished(const QString&)), this, SLOT(slotExecuteAfterTargetBuild()) ); - disconnect( makeFrontend(), SIGNAL(commandFailed(const QString&)), this, SLOT(slotExecuteAfterTargetBuildFailed()) ); + disconnect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)), this, TQT_SLOT(slotExecuteAfterTargetBuild()) ); + disconnect( makeFrontend(), TQT_SIGNAL(commandFailed(const TQString&)), this, TQT_SLOT(slotExecuteAfterTargetBuildFailed()) ); kdDebug(9020) << "slotExecuteTargetAfterBuild " << endl; executeTarget(m_executeTargetAfterBuild.first, m_executeTargetAfterBuild.second); } } -void AutoProjectPart::slotNotExecuteTargetAfterBuildFailed(const QString& command) +void AutoProjectPart::slotNotExecuteTargetAfterBuildFailed(const TQString& command) { kdDebug(9020) << "executeTargetAfterBuildFailed" << endl; if ( constructMakeCommandLine(m_executeTargetAfterBuild.first.path(), m_executeTargetAfterBuild.second->name) == command ) { m_executeAfterBuild=false; - disconnect( makeFrontend(), SIGNAL(commandFinished(const QString&)), this, SLOT(slotExecuteTargetAfterBuild()) ); - disconnect( makeFrontend(), SIGNAL(commandFailed(const QString&)), this, SLOT(slotNotExecuteTargetAfterBuildFailed()) ); + disconnect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)), this, TQT_SLOT(slotExecuteTargetAfterBuild()) ); + disconnect( makeFrontend(), TQT_SIGNAL(commandFailed(const TQString&)), this, TQT_SLOT(slotNotExecuteTargetAfterBuildFailed()) ); } } @@ -1215,10 +1215,10 @@ void AutoProjectPart::slotNotExecuteTargetAfterBuildFailed(const QString& comman * in the form of: "ENV_VARIABLE=ENV_VALUE" * Note that we quote the variable value due to the possibility of * embedded spaces. */ -QString AutoProjectPart::environString() const +TQString AutoProjectPart::environString() const { DomUtil::PairList envvars = runEnvironmentVars(); - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; for (it = envvars.begin(); it != envvars.end(); ++it) { environstr += (*it).first; @@ -1235,14 +1235,14 @@ QString AutoProjectPart::environString() const */ void AutoProjectPart::slotExecute2() { - disconnect(appFrontend(), SIGNAL(processExited()), this, SLOT(slotExecute2())); + disconnect(appFrontend(), TQT_SIGNAL(processExited()), this, TQT_SLOT(slotExecute2())); if (m_runProg.isEmpty()){ // Do not execute non executable targets return; } - QString program = environString(); + TQString program = environString(); // Adds the ./ that is necessary to execute the program in bash shells if (!m_runProg.startsWith("/")){ program += "./"; @@ -1271,7 +1271,7 @@ void AutoProjectPart::slotAddTranslation() } -void AutoProjectPart::slotBuildConfigChanged(const QString &config) +void AutoProjectPart::slotBuildConfigChanged(const TQString &config) { DomUtil::writeEntry(*projectDom(), "/kdevautoproject/general/useconfiguration", config); kdDebug(9020) << "Changed used configuration to " << config << endl; @@ -1280,19 +1280,19 @@ void AutoProjectPart::slotBuildConfigChanged(const QString &config) void AutoProjectPart::slotBuildConfigAboutToShow() { - QStringList l = allBuildConfigs(); + TQStringList l = allBuildConfigs(); buildConfigAction->setItems(l); buildConfigAction->setCurrentItem(l.findIndex(currentBuildConfig())); } -void AutoProjectPart::restorePartialProjectSession ( const QDomElement* el ) +void AutoProjectPart::restorePartialProjectSession ( const TQDomElement* el ) { m_widget->restoreSession ( el ); } -void AutoProjectPart::savePartialProjectSession ( QDomElement* el ) +void AutoProjectPart::savePartialProjectSession ( TQDomElement* el ) { - QDomDocument domDoc = el->ownerDocument(); + TQDomDocument domDoc = el->ownerDocument(); KMessageBox::information ( 0, "Hallo, Welt!" ); @@ -1309,23 +1309,23 @@ void AutoProjectPart::savePartialProjectSession ( QDomElement* el ) m_widget->saveSession ( el ); } -void AutoProjectPart::slotCommandFinished( const QString& command ) +void AutoProjectPart::slotCommandFinished( const TQString& command ) { kdDebug(9020) << k_funcinfo << endl; if( m_buildCommand != command ) return; - m_buildCommand = QString::null; + m_buildCommand = TQString::null; m_timestamp.clear(); - QStringList fileList = allFiles(); - QStringList::Iterator it = fileList.begin(); + TQStringList fileList = allFiles(); + TQStringList::Iterator it = fileList.begin(); while( it != fileList.end() ){ - QString fileName = *it; + TQString fileName = *it; ++it; - m_timestamp[ fileName ] = QFileInfo( projectDirectory(), fileName ).lastModified(); + m_timestamp[ fileName ] = TQFileInfo( projectDirectory(), fileName ).lastModified(); } emit projectCompiled(); @@ -1338,7 +1338,7 @@ void AutoProjectPart::slotCommandFinished( const QString& command ) } } -void AutoProjectPart::slotCommandFailed( const QString& /*command*/ ) +void AutoProjectPart::slotCommandFailed( const TQString& /*command*/ ) { kdDebug(9020) << "slotCommandFinished " << k_funcinfo << endl; @@ -1350,14 +1350,14 @@ bool AutoProjectPart::isDirty() { if (m_lastCompilationFailed) return true; - QStringList fileList = allFiles(); - QStringList::Iterator it = fileList.begin(); + TQStringList fileList = allFiles(); + TQStringList::Iterator it = fileList.begin(); while( it != fileList.end() ){ - QString fileName = *it; + TQString fileName = *it; ++it; - QMap<QString, QDateTime>::Iterator it = m_timestamp.find( fileName ); - QDateTime t = QFileInfo( projectDirectory(), fileName ).lastModified(); + TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( fileName ); + TQDateTime t = TQFileInfo( projectDirectory(), fileName ).lastModified(); if( it == m_timestamp.end() || *it != t ){ return true; } @@ -1381,25 +1381,25 @@ KDevProject::Options AutoProjectPart::options() const return UsesAutotoolsBuildSystem; } -QStringList recursiveATFind( const QString &currDir, const QString &baseDir ) +TQStringList recursiveATFind( const TQString &currDir, const TQString &baseDir ) { kdDebug(9020) << "Dir " << currDir << endl; - QStringList fileList; + TQStringList fileList; if( !currDir.contains( "/..") && !currDir.contains("/.") ) { - QDir dir(currDir); - QStringList dirList = dir.entryList(QDir::Dirs ); - QStringList::Iterator idx = dirList.begin(); + TQDir dir(currDir); + TQStringList dirList = dir.entryList(TQDir::Dirs ); + TQStringList::Iterator idx = dirList.begin(); for( ; idx != dirList.end(); ++idx ) { fileList += recursiveATFind( currDir + "/" + (*idx),baseDir ); } - QStringList newFiles = dir.entryList("*.am *.in"); + TQStringList newFiles = dir.entryList("*.am *.in"); idx = newFiles.begin(); for( ; idx != newFiles.end(); ++idx ) { - QString file = currDir + "/" + (*idx); + TQString file = currDir + "/" + (*idx); fileList.append( file.remove( baseDir ) ); } } @@ -1411,21 +1411,21 @@ QStringList recursiveATFind( const QString &currDir, const QString &baseDir ) /*! \fn AutoProjectPart::distFiles() const */ -QStringList AutoProjectPart::distFiles() const +TQStringList AutoProjectPart::distFiles() const { - QStringList sourceList = allFiles(); + TQStringList sourceList = allFiles(); // Scan current source directory for any .pro files. - QString projectDir = projectDirectory(); - QDir dir(projectDir); - QDir admin(projectDir +"/admin"); - QStringList files = dir.entryList( "Makefile.cvs Makefile.am configure* INSTALL README NEWS TODO ChangeLog COPYING AUTHORS stamp-h.in acinclude.m4 config.h.in Makefile.in install-sh config.sub config.guess mkinstalldirs missing ltmain.sh depcomp"); - QStringList adminFiles = admin.entryList(QDir::Files); - QStringList::Iterator idx = adminFiles.begin(); + TQString projectDir = projectDirectory(); + TQDir dir(projectDir); + TQDir admin(projectDir +"/admin"); + TQStringList files = dir.entryList( "Makefile.cvs Makefile.am configure* INSTALL README NEWS TODO ChangeLog COPYING AUTHORS stamp-h.in acinclude.m4 config.h.in Makefile.in install-sh config.sub config.guess mkinstalldirs missing ltmain.sh depcomp"); + TQStringList adminFiles = admin.entryList(TQDir::Files); + TQStringList::Iterator idx = adminFiles.begin(); for( ; idx != adminFiles.end(); ++idx) { files.append( "admin/" + (*idx) ); } - QStringList srcDirs = dir.entryList(QDir::Dirs); + TQStringList srcDirs = dir.entryList(TQDir::Dirs); idx = srcDirs.begin(); for(; idx != srcDirs.end(); ++idx) { @@ -1434,17 +1434,17 @@ QStringList AutoProjectPart::distFiles() const return sourceList + files; } -void AutoProjectPart::startSimpleMakeCommand( const QString & dir, const QString & command, bool withKdesu ) +void AutoProjectPart::startSimpleMakeCommand( const TQString & dir, const TQString & command, bool withKdesu ) { if (partController()->saveAllFiles()==false) return; //user cancelled // m_buildCommand = constructMakeCommandLine(dir, target); - QString cmdline = command; + TQString cmdline = command; cmdline.prepend(makeEnvironment()); - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += KProcess::quote(dir); dircmd += " && "; @@ -1457,10 +1457,10 @@ void AutoProjectPart::startSimpleMakeCommand( const QString & dir, const QString makeFrontend()->queueCommand(dir, m_buildCommand); } -QString AutoProjectPart::getAutoConfFile(const QString& dir){ +TQString AutoProjectPart::getAutoConfFile(const TQString& dir){ - QFile inFile(dir + "/configure.in"); - QFile acFile(dir + "/configure.ac"); + TQFile inFile(dir + "/configure.in"); + TQFile acFile(dir + "/configure.ac"); if ( inFile.exists()){ return inFile.name(); }else if (acFile.exists()){ |