summaryrefslogtreecommitdiffstats
path: root/buildtools/ada/adaprojectoptionsdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/ada/adaprojectoptionsdlg.cpp')
-rw-r--r--buildtools/ada/adaprojectoptionsdlg.cpp70
1 files changed, 35 insertions, 35 deletions
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;
}