summaryrefslogtreecommitdiffstats
path: root/buildtools/ada
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/ada
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/ada')
-rw-r--r--buildtools/ada/adaglobaloptionsdlg.cpp28
-rw-r--r--buildtools/ada/adaglobaloptionsdlg.h18
-rw-r--r--buildtools/ada/adaproject_part.cpp180
-rw-r--r--buildtools/ada/adaproject_part.h66
-rw-r--r--buildtools/ada/adaproject_widget.cpp2
-rw-r--r--buildtools/ada/adaproject_widget.h4
-rw-r--r--buildtools/ada/adaprojectoptionsdlg.cpp70
-rw-r--r--buildtools/ada/adaprojectoptionsdlg.h22
-rw-r--r--buildtools/ada/service.cpp26
-rw-r--r--buildtools/ada/service.h12
10 files changed, 214 insertions, 214 deletions
diff --git a/buildtools/ada/adaglobaloptionsdlg.cpp b/buildtools/ada/adaglobaloptionsdlg.cpp
index a8171c81..e44a15be 100644
--- a/buildtools/ada/adaglobaloptionsdlg.cpp
+++ b/buildtools/ada/adaglobaloptionsdlg.cpp
@@ -6,10 +6,10 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <kurlrequester.h>
#include <kdebug.h>
@@ -21,7 +21,7 @@
#include "adaproject_part.h"
#include "adaglobaloptionsdlg.h"
-AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, QWidget* parent, const char* name, WFlags fl)
+AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* parent, const char* name, WFlags fl)
:AdaProjectOptionsDlgBase(parent,name,fl), m_part(part)
{
delete config_label;
@@ -44,7 +44,7 @@ AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, QWidget* parent,
if (offers.isEmpty())
options_button->setEnabled(false);
- currentCompiler = QString::null;
+ currentCompiler = TQString::null;
/*kdDebug() << ServiceComboBox::defaultCompiler() << endl;
kdDebug() << ServiceComboBox::itemForText(ServiceComboBox::defaultCompiler(), service_names) << endl;
@@ -60,17 +60,17 @@ AdaGlobalOptionsDlg::~AdaGlobalOptionsDlg()
void AdaGlobalOptionsDlg::optionsButtonClicked()
{
- QString name = ServiceComboBox::currentText(compiler_box, service_names);
+ TQString name = ServiceComboBox::currentText(compiler_box, service_names);
KDevCompilerOptions *plugin = m_part->createCompilerOptions(name);
if (plugin) {
- QString flags = plugin->exec(this, options_edit->text());
+ TQString flags = plugin->exec(this, options_edit->text());
options_edit->setText(flags);
delete plugin;
}
}
-void AdaGlobalOptionsDlg::compiler_box_activated(const QString& text)
+void AdaGlobalOptionsDlg::compiler_box_activated(const TQString& text)
{
kdDebug() << "text changed from " << currentCompiler << " to " << text << endl;
if (currentCompiler == text)
@@ -88,14 +88,14 @@ void AdaGlobalOptionsDlg::accept()
saveConfigCache();
}
-void AdaGlobalOptionsDlg::saveCompilerOpts( QString compiler )
+void AdaGlobalOptionsDlg::saveCompilerOpts( TQString compiler )
{
configCache[compiler] = options_edit->text();
}
-void AdaGlobalOptionsDlg::readCompilerOpts( QString compiler )
+void AdaGlobalOptionsDlg::readCompilerOpts( TQString compiler )
{
- QString settings = configCache[compiler];
+ TQString settings = configCache[compiler];
if (settings.isEmpty())
{
KConfig *config = KGlobal::config();
@@ -111,7 +111,7 @@ void AdaGlobalOptionsDlg::readConfigCache( )
/* KConfig *config = KGlobal::config();
config->setGroup("Ada Compiler");
- QMap<QString, QString> settings = config->entryMap("Ada Compiler");
+ TQMap<TQString, TQString> settings = config->entryMap("Ada Compiler");
*/
}
@@ -120,7 +120,7 @@ void AdaGlobalOptionsDlg::saveConfigCache( )
KConfig *config = KGlobal::config();
config->setGroup("Ada Compiler");
- for (QMap<QString, QString>::iterator it = configCache.begin(); it != configCache.end(); ++it)
+ for (TQMap<TQString, TQString>::iterator it = configCache.begin(); it != configCache.end(); ++it)
{
config->writeEntry(it.key(), it.data());
}
diff --git a/buildtools/ada/adaglobaloptionsdlg.h b/buildtools/ada/adaglobaloptionsdlg.h
index 92001a1b..1a186ce9 100644
--- a/buildtools/ada/adaglobaloptionsdlg.h
+++ b/buildtools/ada/adaglobaloptionsdlg.h
@@ -9,7 +9,7 @@
#ifndef ADAGLOBALOPTIONSDLG_H
#define ADAGLOBALOPTIONSDLG_H
-#include <qmap.h>
+#include <tqmap.h>
#include <ktrader.h>
@@ -22,7 +22,7 @@ class AdaGlobalOptionsDlg : public AdaProjectOptionsDlgBase
Q_OBJECT
public:
- AdaGlobalOptionsDlg(AdaProjectPart *part, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~AdaGlobalOptionsDlg();
public slots:
@@ -30,18 +30,18 @@ public slots:
protected slots:
virtual void optionsButtonClicked();
- virtual void compiler_box_activated(const QString& text);
+ virtual void compiler_box_activated(const TQString& text);
private:
AdaProjectPart *m_part;
KTrader::OfferList offers;
- QString currentCompiler;
- QStringList service_names;
- QStringList service_execs;
- QMap<QString, QString> configCache;
+ TQString currentCompiler;
+ TQStringList service_names;
+ TQStringList service_execs;
+ TQMap<TQString, TQString> configCache;
- void saveCompilerOpts(QString compiler);
- void readCompilerOpts(QString compiler);
+ void saveCompilerOpts(TQString compiler);
+ void readCompilerOpts(TQString compiler);
void readConfigCache();
void saveConfigCache();
diff --git a/buildtools/ada/adaproject_part.cpp b/buildtools/ada/adaproject_part.cpp
index 33ba166b..f226809d 100644
--- a/buildtools/ada/adaproject_part.cpp
+++ b/buildtools/ada/adaproject_part.cpp
@@ -8,12 +8,12 @@
*/
#include "adaproject_part.h"
-#include <qdom.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qvaluestack.h>
-#include <qregexp.h>
-#include <qvbox.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqvaluestack.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -46,7 +46,7 @@ typedef KDevGenericFactory<AdaProjectPart> AdaProjectFactory;
static const KDevPluginInfo data("kdevadaproject");
K_EXPORT_COMPONENT_FACTORY( libkdevadaproject, AdaProjectFactory( data ) )
-AdaProjectPart::AdaProjectPart(QObject *parent, const char *name, const QStringList& )
+AdaProjectPart::AdaProjectPart(TQObject *parent, const char *name, const TQStringList& )
:KDevBuildTool(&data, parent, name ? name : "AdaProjectPart" )
{
setInstance(AdaProjectFactory::instance());
@@ -54,21 +54,21 @@ AdaProjectPart::AdaProjectPart(QObject *parent, const char *name, const QStringL
KAction *action;
action = new KAction( i18n("&Build Project"), "make_kdevelop", Key_F8,
- this, SLOT(slotBuild()),
+ this, TQT_SLOT(slotBuild()),
actionCollection(), "build_build" );
action = new KAction( i18n("Execute Program"), "exec", 0,
- this, SLOT(slotExecute()),
+ this, TQT_SLOT(slotExecute()),
actionCollection(), "build_execute" );
- connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)),
- this, SLOT(projectConfigWidget(KDialogBase*)) );
+ connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)),
+ this, TQT_SLOT(projectConfigWidget(KDialogBase*)) );
- connect( core(), SIGNAL(configWidget(KDialogBase*)),
- this, SLOT(configWidget(KDialogBase*)) );
+ connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)),
+ this, TQT_SLOT(configWidget(KDialogBase*)) );
// m_widget = new AdaProjectWidget(this);
-// QWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?"));
+// TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?"));
// now you decide what should happen to the widget. Take a look at kdevcore.h
// or at other plugins how to embed it.
@@ -89,11 +89,11 @@ AdaProjectPart::~AdaProjectPart()
* This should really be merged with FileTreeWidget::matchesHidePattern()
* and put in its own class. Currently this is repeated in scriptprojectpart.cpp, pascalproject_part.cpp, adaproject_part.cpp
*/
-static bool matchesPattern(const QString &fileName, const QStringList &patternList)
+static bool matchesPattern(const TQString &fileName, const TQStringList &patternList)
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = patternList.begin(); it != patternList.end(); ++it) {
- QRegExp re(*it, true, true);
+ TQRegExp re(*it, true, true);
if (re.search(fileName) == 0 && re.matchedLength() == (int)fileName.length())
return true;
}
@@ -101,13 +101,13 @@ static bool matchesPattern(const QString &fileName, const QStringList &patternLi
return false;
}
-void AdaProjectPart::openProject(const QString &dirName, const QString &projectName)
+void AdaProjectPart::openProject(const TQString &dirName, const TQString &projectName)
{
m_buildDir = dirName;
m_projectDir = dirName;
m_projectName = projectName;
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
// Set the default directory radio to "executable"
if (DomUtil::readEntry(dom, "/kdevadaproject/run/directoryradio") == "" ) {
DomUtil::writeEntry(dom, "/kdevadaproject/run/directoryradio", "executable");
@@ -116,11 +116,11 @@ void AdaProjectPart::openProject(const QString &dirName, const QString &projectN
loadProjectConfig();
// Put all files from all subdirectories into file list
- QValueStack<QString> s;
+ TQValueStack<TQString> s;
int prefixlen = m_projectDir.length()+1;
s.push(m_projectDir);
- QStringList includepatternList;
+ TQStringList includepatternList;
if ( languageSupport() )
{
@@ -132,10 +132,10 @@ void AdaProjectPart::openProject(const QString &dirName, const QString &projectN
}
}
- QString excludepatterns = "*~";
- QStringList excludepatternList = QStringList::split(",", excludepatterns);
+ TQString excludepatterns = "*~";
+ TQStringList excludepatternList = TQStringList::split(",", excludepatterns);
- QDir dir;
+ TQDir dir;
do {
dir.setPath(s.pop());
kdDebug() << "AdaProjectPart::openProject examining: " << dir.path() << endl;
@@ -143,12 +143,12 @@ void AdaProjectPart::openProject(const QString &dirName, const QString &projectN
if( !dirEntries )
break;
- QPtrListIterator<QFileInfo> it(*dirEntries);
+ TQPtrListIterator<TQFileInfo> it(*dirEntries);
for (; it.current(); ++it) {
- QString fileName = it.current()->fileName();
+ TQString fileName = it.current()->fileName();
if (fileName == "." || fileName == "..")
continue;
- QString path = it.current()->absFilePath();
+ TQString path = it.current()->absFilePath();
if (it.current()->isDir()) {
kdDebug() << "AdaProjectPart::openProject pushing: " << path << endl;
s.push(path);
@@ -188,9 +188,9 @@ DomUtil::PairList AdaProjectPart::runEnvironmentVars() const
* if run/directoryradio == custom
* The custom directory absolute path
*/
-QString AdaProjectPart::runDirectory() const
+TQString AdaProjectPart::runDirectory() const
{
- QString cwd = defaultRunDirectory("kdevadaproject");
+ TQString cwd = defaultRunDirectory("kdevadaproject");
if (cwd.isEmpty())
cwd = buildDirectory();
return cwd;
@@ -206,15 +206,15 @@ QString AdaProjectPart::runDirectory() const
* if run/directoryradio == custom or relative == false
* The absolute path to executable
*/
-QString AdaProjectPart::mainProgram() const
+TQString AdaProjectPart::mainProgram() const
{
- QDomDocument * dom = projectDom();
+ TQDomDocument * dom = projectDom();
- if ( !dom ) return QString();
+ if ( !dom ) return TQString();
- QString DomMainProgram = DomUtil::readEntry( *dom, "/kdevadaproject/run/mainprogram");
+ TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevadaproject/run/mainprogram");
- if ( DomMainProgram.isEmpty() ) return QString();
+ if ( DomMainProgram.isEmpty() ) return TQString();
if ( DomMainProgram.startsWith("/") ) // assume absolute path
{
@@ -225,68 +225,68 @@ QString AdaProjectPart::mainProgram() const
return projectDirectory() + "/" + DomMainProgram;
}
- return QString();
+ return TQString();
}
-/** Retuns a QString with the run command line arguments */
-QString AdaProjectPart::debugArguments() const
+/** Retuns a TQString with the run command line arguments */
+TQString AdaProjectPart::debugArguments() const
{
return DomUtil::readEntry(*projectDom(), "/kdevadaproject/run/globaldebugarguments");
}
-/** Retuns a QString with the run command line arguments */
-QString AdaProjectPart::runArguments() const
+/** Retuns a TQString with the run command line arguments */
+TQString AdaProjectPart::runArguments() const
{
return DomUtil::readEntry(*projectDom(), "/kdevadaproject/run/programargs");
}
-QString AdaProjectPart::mainSource() const
+TQString AdaProjectPart::mainSource() const
{
return projectDirectory() + "/" + m_mainSource;
}
-void AdaProjectPart::setMainSource(QString fullPath)
+void AdaProjectPart::setMainSource(TQString fullPath)
{
- QString olddir = activeDirectory();
- m_mainSource = fullPath.replace(QRegExp(QString(projectDirectory() + QString("/"))),"");
+ TQString olddir = activeDirectory();
+ m_mainSource = fullPath.replace(TQRegExp(TQString(projectDirectory() + TQString("/"))),"");
emit activeDirectoryChanged( olddir, activeDirectory() );
}
-QString AdaProjectPart::projectDirectory() const
+TQString AdaProjectPart::projectDirectory() const
{
return m_projectDir;
}
-QString AdaProjectPart::projectName() const
+TQString AdaProjectPart::projectName() const
{
return m_projectName;
}
-QString AdaProjectPart::activeDirectory() const
+TQString AdaProjectPart::activeDirectory() const
{
- QFileInfo fi(mainSource());
- return fi.dirPath(true).replace(QRegExp(projectDirectory()),"");
+ TQFileInfo fi(mainSource());
+ return fi.dirPath(true).replace(TQRegExp(projectDirectory()),"");
}
-QString AdaProjectPart::buildDirectory() const
+TQString AdaProjectPart::buildDirectory() const
{
- QFileInfo fi(mainSource());
+ TQFileInfo fi(mainSource());
return fi.dirPath(true);
}
-void AdaProjectPart::listOfFiles(QStringList &result, QString path) const
+void AdaProjectPart::listOfFiles(TQStringList &result, TQString path) const
{
- QDir d(path);
+ TQDir d(path);
if (!d.exists())
return;
- const QFileInfoList *entries = d.entryInfoList(QDir::Dirs | QDir::Files | QDir::Hidden);
+ const QFileInfoList *entries = d.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::Hidden);
if( !entries )
return;
QFileInfoListIterator it( *entries );
- while( const QFileInfo* fileInfo = it.current() )
+ while( const TQFileInfo* fileInfo = it.current() )
{
++it;
@@ -303,9 +303,9 @@ void AdaProjectPart::listOfFiles(QStringList &result, QString path) const
}
}
-QStringList AdaProjectPart::allFiles() const
+TQStringList AdaProjectPart::allFiles() const
{
-// QStringList files;
+// TQStringList files;
// listOfFiles(files, projectDirectory());
@@ -313,19 +313,19 @@ QStringList AdaProjectPart::allFiles() const
return m_sourceFiles;
}
-void AdaProjectPart::addFile(const QString& /*fileName*/)
+void AdaProjectPart::addFile(const TQString& /*fileName*/)
{
}
-void AdaProjectPart::addFiles(const QStringList& /*fileList*/)
+void AdaProjectPart::addFiles(const TQStringList& /*fileList*/)
{
}
-void AdaProjectPart::removeFile(const QString& /*fileName*/)
+void AdaProjectPart::removeFile(const TQString& /*fileName*/)
{
}
-void AdaProjectPart::removeFiles(const QStringList& /*fileList*/)
+void AdaProjectPart::removeFiles(const TQStringList& /*fileList*/)
{
}
@@ -334,7 +334,7 @@ void AdaProjectPart::slotBuild()
if (partController()->saveAllFiles()==false)
return; //user cancelled
- QString cmdline = m_compilerExec + " " + m_compilerOpts + " ";
+ TQString cmdline = m_compilerExec + " " + m_compilerOpts + " ";
if (cmdline.isEmpty())
{
@@ -342,10 +342,10 @@ void AdaProjectPart::slotBuild()
return;
}
- QFileInfo fi(mainSource());
+ TQFileInfo fi(mainSource());
cmdline += fi.fileName();
- QString dircmd = "cd ";
+ TQString dircmd = "cd ";
dircmd += KProcess::quote(buildDirectory());
dircmd += " && ";
@@ -355,42 +355,42 @@ void AdaProjectPart::slotBuild()
void AdaProjectPart::slotExecute()
{
partController()->saveAllFiles();
- QString program = "./";
+ TQString program = "./";
appFrontend()->startAppCommand(buildDirectory(), mainProgram(), true);
}
-void AdaProjectPart::changedFiles( const QStringList & fileList )
+void AdaProjectPart::changedFiles( const TQStringList & fileList )
{
KDevProject::changedFiles(fileList);
}
-void AdaProjectPart::changedFile( const QString & fileName )
+void AdaProjectPart::changedFile( const TQString & fileName )
{
KDevProject::changedFile(fileName);
}
void AdaProjectPart::projectConfigWidget( KDialogBase * dlg )
{
- QVBox *vbox;
+ TQVBox *vbox;
vbox = dlg->addVBoxPage(i18n("Ada Compiler"));
AdaProjectOptionsDlg *w = new AdaProjectOptionsDlg(this, vbox);
- connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
- connect( dlg, SIGNAL(okClicked()), this, SLOT(loadProjectConfig()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(loadProjectConfig()) );
}
void AdaProjectPart::loadProjectConfig( )
{
- QDomDocument &dom = *(projectDom());
+ TQDomDocument &dom = *(projectDom());
- QString config = DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default");
- m_mainSource = DomUtil::readEntry(dom, QString("/kdevadaproject/configurations/") + config + QString("/mainsource") );
- m_compilerOpts = DomUtil::readEntry(dom, QString("/kdevadaproject/configurations/") + config + QString("/compileroptions"));
- m_compilerExec = DomUtil::readEntry(dom, QString("/kdevadaproject/configurations/") + config + QString("/compilerexec"));
+ TQString config = DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default");
+ m_mainSource = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/mainsource") );
+ m_compilerOpts = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/compileroptions"));
+ m_compilerExec = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/compilerexec"));
if (m_compilerExec.isEmpty())
{
KTrader::OfferList offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Ada'");
- QValueList<KService::Ptr>::ConstIterator it;
+ TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-KDevelop-Default").toBool()) {
m_compilerExec = (*it)->exec();
@@ -402,13 +402,13 @@ void AdaProjectPart::loadProjectConfig( )
void AdaProjectPart::configWidget( KDialogBase * dlg )
{
- QVBox *vbox;
+ TQVBox *vbox;
vbox = dlg->addVBoxPage(i18n("Ada Compiler"));
AdaGlobalOptionsDlg *w = new AdaGlobalOptionsDlg(this, vbox);
- connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) );
}
-KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const QString &name)
+KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name)
{
KService::Ptr service = KService::serviceByDesktopName(name);
if (!service) {
@@ -416,20 +416,20 @@ KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const QString &name)
return 0;
}
- 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();
KMessageBox::error(0, i18n("There was an error loading the module %1.\n"
"The diagnostics are:\n%2").arg(service->name()).arg(errorMessage));
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(this, service->name().latin1(),
+ TQObject *obj = factory->create(this, service->name().latin1(),
"KDevCompilerOptions", args);
if (!obj->inherits("KDevCompilerOptions")) {
@@ -441,7 +441,7 @@ KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const QString &name)
return dlg;
}
-QString AdaProjectPart::defaultOptions( const QString compiler )
+TQString AdaProjectPart::defaultOptions( const TQString compiler )
{
KConfig *config = KGlobal::config();
config->setGroup("Ada Compiler");
@@ -454,12 +454,12 @@ QString AdaProjectPart::defaultOptions( const QString compiler )
/*!
\fn AdaProjectPart::distFiles() const
*/
-QStringList AdaProjectPart::distFiles() const
+TQStringList AdaProjectPart::distFiles() const
{
- QStringList sourceList = allFiles();
+ TQStringList sourceList = allFiles();
// Scan current source directory for any .pro files.
- QString projectDir = projectDirectory();
- QDir dir(projectDir);
- QStringList files = dir.entryList( "Makefile");
+ TQString projectDir = projectDirectory();
+ TQDir dir(projectDir);
+ TQStringList files = dir.entryList( "Makefile");
return sourceList + files;
}
diff --git a/buildtools/ada/adaproject_part.h b/buildtools/ada/adaproject_part.h
index 88966ae2..b62cf204 100644
--- a/buildtools/ada/adaproject_part.h
+++ b/buildtools/ada/adaproject_part.h
@@ -9,7 +9,7 @@
#ifndef __KDEVPART_ADAPROJECT_H__
#define __KDEVPART_ADAPROJECT_H__
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "kdevbuildtool.h"
@@ -21,47 +21,47 @@ class AdaProjectPart : public KDevBuildTool
{
Q_OBJECT
public:
- AdaProjectPart(QObject *parent, const char *name, const QStringList &);
+ AdaProjectPart(TQObject *parent, const char *name, const TQStringList &);
~AdaProjectPart();
- virtual void openProject(const QString &dirName, const QString &projectName);
+ virtual void openProject(const TQString &dirName, const TQString &projectName);
virtual void closeProject();
/**Returns the name of the main source file without extension.
We assume that all Ada compilers call the binary that way. */
- virtual QString mainProgram() const;
+ virtual TQString mainProgram() const;
/**Main source file (like src/main.adb)*/
- virtual QString mainSource() const;
- virtual void setMainSource(QString fullPath);
+ virtual TQString mainSource() const;
+ virtual void setMainSource(TQString fullPath);
- virtual QString projectDirectory() const;
- virtual QString projectName() const;
- virtual QString activeDirectory() const;
+ virtual TQString projectDirectory() const;
+ virtual TQString projectName() const;
+ virtual TQString activeDirectory() const;
/**The location of the main source file*/
- virtual QString buildDirectory() const;
- virtual QString runDirectory() const;
- virtual QString debugArguments() const;
- virtual QString runArguments() const;
+ virtual TQString buildDirectory() const;
+ virtual TQString runDirectory() const;
+ virtual TQString debugArguments() const;
+ virtual TQString runArguments() const;
virtual DomUtil::PairList runEnvironmentVars() const;
/**Returns everything in the project directory*/
- virtual QStringList allFiles() const;
+ virtual TQStringList allFiles() const;
/**This does absolutelly nothing*/
- virtual void addFile(const QString &fileName);
+ virtual void addFile(const TQString &fileName);
/**This does absolutelly nothing*/
- virtual void addFiles(const QStringList &fileList);
+ virtual void addFiles(const TQStringList &fileList);
/**This does absolutelly nothing*/
- virtual void removeFile(const QString &fileName);
+ virtual void removeFile(const TQString &fileName);
/**This does absolutelly nothing*/
- virtual void removeFiles(const QStringList &fileList);
+ virtual void removeFiles(const TQStringList &fileList);
- virtual void changedFiles( const QStringList & fileList );
- virtual void changedFile( const QString & fileName );
+ virtual void changedFiles( const TQStringList & fileList );
+ virtual void changedFile( const TQString & fileName );
- KDevCompilerOptions *createCompilerOptions(const QString &name);
+ KDevCompilerOptions *createCompilerOptions(const TQString &name);
- virtual QString defaultOptions(const QString compiler);
- QStringList distFiles() const;
+ virtual TQString defaultOptions(const TQString compiler);
+ TQStringList distFiles() const;
public slots:
/**loads config from project file*/
@@ -74,20 +74,20 @@ private slots:
void configWidget(KDialogBase *dlg);
private:
- QGuardedPtr<AdaProjectWidget> m_widget;
+ TQGuardedPtr<AdaProjectWidget> m_widget;
- void listOfFiles(QStringList &result, QString path) const;
+ void listOfFiles(TQStringList &result, TQString path) const;
- QString m_buildDir;
- QString m_projectDir;
- QString m_projectName;
+ TQString m_buildDir;
+ TQString m_projectDir;
+ TQString m_projectName;
- QString m_mainProg;
- QString m_mainSource;
- QString m_compilerExec;
- QString m_compilerOpts;
+ TQString m_mainProg;
+ TQString m_mainSource;
+ TQString m_compilerExec;
+ TQString m_compilerOpts;
- QStringList m_sourceFiles;
+ TQStringList m_sourceFiles;
};
#endif
diff --git a/buildtools/ada/adaproject_widget.cpp b/buildtools/ada/adaproject_widget.cpp
index d4bdf37b..2e5d818a 100644
--- a/buildtools/ada/adaproject_widget.cpp
+++ b/buildtools/ada/adaproject_widget.cpp
@@ -10,7 +10,7 @@
AdaProjectWidget::AdaProjectWidget(AdaProjectPart *part)
- : QWidget(0, "AdaProject widget")
+ : TQWidget(0, "AdaProject widget")
{
Q_UNUSED( part );
}
diff --git a/buildtools/ada/adaproject_widget.h b/buildtools/ada/adaproject_widget.h
index dc6b4ec4..5e7038f2 100644
--- a/buildtools/ada/adaproject_widget.h
+++ b/buildtools/ada/adaproject_widget.h
@@ -1,8 +1,8 @@
#ifndef __ADAPROJECT_WIDGET_H__
#define __ADAPROJECT_WIDGET_H__
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
class KDevProject;
class AdaProjectPart;
diff --git a/buildtools/ada/adaprojectoptionsdlg.cpp b/buildtools/ada/adaprojectoptionsdlg.cpp
index 3eafb082..ee08da6d 100644
--- a/buildtools/ada/adaprojectoptionsdlg.cpp
+++ b/buildtools/ada/adaprojectoptionsdlg.cpp
@@ -12,10 +12,10 @@
#include <kmessagebox.h>
#include <klocale.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qregexp.h>
-#include <qvalidator.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
#include "domutil.h"
#include "kdevcompileroptions.h"
@@ -24,10 +24,10 @@
#include "adaproject_part.h"
#include "adaprojectoptionsdlg.h"
-AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, QWidget* parent, const char* name, WFlags fl)
+AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* parent, const char* name, WFlags fl)
: AdaProjectOptionsDlgBase(parent,name, fl), m_part(part)
{
- config_combo->setValidator(new QRegExpValidator(QRegExp("^\\D.*"), this));
+ config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this));
offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Ada'");
@@ -41,8 +41,8 @@ AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, QWidget* parent
dirty = false;
- QDomDocument &dom = *(m_part->projectDom());
- currentConfig = QString::null;
+ TQDomDocument &dom = *(m_part->projectDom());
+ currentConfig = TQString::null;
configChanged(DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default"));
}
@@ -50,17 +50,17 @@ AdaProjectOptionsDlg::~AdaProjectOptionsDlg()
{
}
-QStringList AdaProjectOptionsDlg::allBuildConfigs()
+TQStringList AdaProjectOptionsDlg::allBuildConfigs()
{
- QDomDocument &dom = *(m_part->projectDom());
+ TQDomDocument &dom = *(m_part->projectDom());
- QStringList allConfigs;
+ TQStringList allConfigs;
allConfigs.append("default");
- QDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations");
- QDomElement childEl = node.firstChild().toElement();
+ TQDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations");
+ TQDomElement childEl = node.firstChild().toElement();
while (!childEl.isNull()) {
- QString config = childEl.tagName();
+ TQString config = childEl.tagName();
kdDebug() << "Found config " << config << endl;
if (config != "default")
allConfigs.append(config);
@@ -79,35 +79,35 @@ void AdaProjectOptionsDlg::accept()
}
}
-void AdaProjectOptionsDlg::compiler_box_activated( const QString& /*s*/ )
+void AdaProjectOptionsDlg::compiler_box_activated( const TQString& /*s*/ )
{
- QString exec = ServiceComboBox::currentText(compiler_box, service_execs);
+ TQString exec = ServiceComboBox::currentText(compiler_box, service_execs);
exec_edit->setText(exec);
}
-void AdaProjectOptionsDlg::saveConfig( QString config )
+void AdaProjectOptionsDlg::saveConfig( TQString config )
{
- QDomDocument dom = *m_part->projectDom();
- QString prefix = "/kdevadaproject/configurations/" + config + "/";
+ TQDomDocument dom = *m_part->projectDom();
+ TQString prefix = "/kdevadaproject/configurations/" + config + "/";
DomUtil::writeEntry(dom, prefix + "compiler",
ServiceComboBox::currentText(compiler_box, service_names));
DomUtil::writeEntry(dom, prefix + "compileroptions", options_edit->text());
DomUtil::writeEntry(dom, prefix + "compilerexec", exec_edit->text());
- DomUtil::writeEntry(dom, prefix + "mainsource", mainSourceUrl->url().replace(QRegExp(m_part->projectDirectory() + QString("/")),""));
+ DomUtil::writeEntry(dom, prefix + "mainsource", mainSourceUrl->url().replace(TQRegExp(m_part->projectDirectory() + TQString("/")),""));
}
-void AdaProjectOptionsDlg::readConfig( QString config )
+void AdaProjectOptionsDlg::readConfig( TQString config )
{
- QDomDocument dom = *m_part->projectDom();
- QString prefix = "/kdevadaproject/configurations/" + config + "/";
+ TQDomDocument dom = *m_part->projectDom();
+ TQString prefix = "/kdevadaproject/configurations/" + config + "/";
- QString compiler = DomUtil::readEntry(dom, prefix + "compiler", "");
+ TQString compiler = DomUtil::readEntry(dom, prefix + "compiler", "");
if (compiler.isEmpty())
{
offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Ada'");
- QValueList<KService::Ptr>::ConstIterator it;
+ TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-KDevelop-Default").toBool()) {
compiler = (*it)->name();
@@ -118,7 +118,7 @@ void AdaProjectOptionsDlg::readConfig( QString config )
}
ServiceComboBox::setCurrentText(compiler_box, compiler, service_names);
- QString exec = DomUtil::readEntry(dom, prefix + "compilerexec", "");
+ TQString exec = DomUtil::readEntry(dom, prefix + "compilerexec", "");
if (exec.isEmpty())
exec = ServiceComboBox::currentText(compiler_box, service_execs);
exec_edit->setText(exec);
@@ -126,7 +126,7 @@ void AdaProjectOptionsDlg::readConfig( QString config )
mainSourceUrl->setURL(m_part->projectDirectory() + "/" + DomUtil::readEntry(dom, prefix + "mainsource"));
}
-void AdaProjectOptionsDlg::configComboTextChanged(const QString &config)
+void AdaProjectOptionsDlg::configComboTextChanged(const TQString &config)
{
bool canAdd = !allConfigs.contains(config) && !config.contains("/") && !config.isEmpty();
bool canRemove = allConfigs.contains(config) && config != "default";
@@ -135,7 +135,7 @@ void AdaProjectOptionsDlg::configComboTextChanged(const QString &config)
}
-void AdaProjectOptionsDlg::configChanged(const QString &config)
+void AdaProjectOptionsDlg::configChanged(const TQString &config)
{
if (config == currentConfig || !allConfigs.contains(config))
return;
@@ -155,7 +155,7 @@ void AdaProjectOptionsDlg::configChanged(const QString &config)
void AdaProjectOptionsDlg::configAdded()
{
- QString config = config_combo->currentText();
+ TQString config = config_combo->currentText();
allConfigs.append(config);
@@ -168,27 +168,27 @@ void AdaProjectOptionsDlg::configAdded()
void AdaProjectOptionsDlg::configRemoved()
{
- QString config = config_combo->currentText();
+ TQString config = config_combo->currentText();
- QDomDocument dom = *m_part->projectDom();
- QDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations");
+ TQDomDocument dom = *m_part->projectDom();
+ TQDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations");
node.removeChild(node.namedItem(config));
allConfigs.remove(config);
config_combo->clear();
config_combo->insertStringList(allConfigs);
- currentConfig = QString::null;
+ currentConfig = TQString::null;
configChanged("default");
}
void AdaProjectOptionsDlg::optionsButtonClicked( )
{
- QString name = ServiceComboBox::currentText(compiler_box, service_names);
+ TQString name = ServiceComboBox::currentText(compiler_box, service_names);
KDevCompilerOptions *plugin = m_part->createCompilerOptions(name);
if (plugin) {
- QString flags = plugin->exec(this, options_edit->text());
+ TQString flags = plugin->exec(this, options_edit->text());
options_edit->setText(flags);
delete plugin;
}
diff --git a/buildtools/ada/adaprojectoptionsdlg.h b/buildtools/ada/adaprojectoptionsdlg.h
index d91c5266..5e40547d 100644
--- a/buildtools/ada/adaprojectoptionsdlg.h
+++ b/buildtools/ada/adaprojectoptionsdlg.h
@@ -21,16 +21,16 @@ class AdaProjectOptionsDlg : public AdaProjectOptionsDlgBase
Q_OBJECT
public:
- AdaProjectOptionsDlg(AdaProjectPart *part, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~AdaProjectOptionsDlg();
public slots:
virtual void accept();
protected slots:
- virtual void compiler_box_activated(const QString &s);
- void configComboTextChanged(const QString &config);
- void configChanged(const QString &config);
+ virtual void compiler_box_activated(const TQString &s);
+ void configComboTextChanged(const TQString &config);
+ void configChanged(const TQString &config);
void configAdded();
void configRemoved();
void optionsButtonClicked();
@@ -38,19 +38,19 @@ protected slots:
void setDefaultOptions();
private:
- QStringList allConfigs;
- QString currentConfig;
+ TQStringList allConfigs;
+ TQString currentConfig;
bool dirty;
KTrader::OfferList offers;
- QStringList service_names;
- QStringList service_execs;
+ TQStringList service_names;
+ TQStringList service_execs;
AdaProjectPart *m_part;
- void saveConfig(QString config);
- void readConfig(QString config);
- QStringList allBuildConfigs();
+ void saveConfig(TQString config);
+ void readConfig(TQString config);
+ TQStringList allBuildConfigs();
};
#endif
diff --git a/buildtools/ada/service.cpp b/buildtools/ada/service.cpp
index 02081a58..97b4f2f5 100644
--- a/buildtools/ada/service.cpp
+++ b/buildtools/ada/service.cpp
@@ -8,8 +8,8 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
-#include <qcombobox.h>
-#include <qvaluelist.h>
+#include <tqcombobox.h>
+#include <tqvaluelist.h>
#include <kservice.h>
#include <kdebug.h>
@@ -17,10 +17,10 @@
#include "service.h"
-void ServiceComboBox::insertStringList(QComboBox *combo, const QValueList<KService::Ptr> &list,
- QStringList *names, QStringList *execs)
+void ServiceComboBox::insertStringList(TQComboBox *combo, const TQValueList<KService::Ptr> &list,
+ TQStringList *names, TQStringList *execs)
{
- QValueList<KService::Ptr>::ConstIterator it;
+ TQValueList<KService::Ptr>::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
combo->insertItem((*it)->comment());
(*names) << (*it)->desktopEntryName();
@@ -29,16 +29,16 @@ void ServiceComboBox::insertStringList(QComboBox *combo, const QValueList<KServi
}
}
-QString ServiceComboBox::currentText(QComboBox *combo, const QStringList &names)
+TQString ServiceComboBox::currentText(TQComboBox *combo, const TQStringList &names)
{
if (combo->currentItem() == -1)
- return QString::null;
+ return TQString::null;
return names[combo->currentItem()];
}
-void ServiceComboBox::setCurrentText(QComboBox *combo, const QString &str, const QStringList &names)
+void ServiceComboBox::setCurrentText(TQComboBox *combo, const TQString &str, const TQStringList &names)
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int i = 0;
for (it = names.begin(); it != names.end(); ++it) {
if (*it == str) {
@@ -49,9 +49,9 @@ void ServiceComboBox::setCurrentText(QComboBox *combo, const QString &str, const
}
}
-int ServiceComboBox::itemForText(const QString &str, const QStringList &names)
+int ServiceComboBox::itemForText(const TQString &str, const TQStringList &names)
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int i = 0;
for (it = names.begin(); it != names.end(); ++it) {
if (*it == str) {
@@ -62,10 +62,10 @@ int ServiceComboBox::itemForText(const QString &str, const QStringList &names)
return 0;
}
-QString ServiceComboBox::defaultCompiler()
+TQString ServiceComboBox::defaultCompiler()
{
KTrader::OfferList offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Ada'");
- QValueList<KService::Ptr>::ConstIterator it;
+ TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-KDevelop-Default").toBool()) {
return (*it)->name();;
diff --git a/buildtools/ada/service.h b/buildtools/ada/service.h
index f9671d0a..f170bb54 100644
--- a/buildtools/ada/service.h
+++ b/buildtools/ada/service.h
@@ -16,12 +16,12 @@
class ServiceComboBox
{
public:
- static void insertStringList(QComboBox *combo, const QValueList<KService::Ptr> &list,
- QStringList *names, QStringList *execs);
- static QString currentText(QComboBox *combo, const QStringList &names);
- static void setCurrentText(QComboBox *combo, const QString &str, const QStringList &names);
- static int itemForText(const QString &str, const QStringList &names);
- static QString defaultCompiler();
+ static void insertStringList(TQComboBox *combo, const TQValueList<KService::Ptr> &list,
+ TQStringList *names, TQStringList *execs);
+ static TQString currentText(TQComboBox *combo, const TQStringList &names);
+ static void setCurrentText(TQComboBox *combo, const TQString &str, const TQStringList &names);
+ static int itemForText(const TQString &str, const TQStringList &names);
+ static TQString defaultCompiler();
};
#endif