summaryrefslogtreecommitdiffstats
path: root/buildtools/pascal/pascalprojectoptionsdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/pascal/pascalprojectoptionsdlg.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/pascal/pascalprojectoptionsdlg.cpp')
-rw-r--r--buildtools/pascal/pascalprojectoptionsdlg.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/buildtools/pascal/pascalprojectoptionsdlg.cpp b/buildtools/pascal/pascalprojectoptionsdlg.cpp
index 7a97cea3..6bbff084 100644
--- a/buildtools/pascal/pascalprojectoptionsdlg.cpp
+++ b/buildtools/pascal/pascalprojectoptionsdlg.cpp
@@ -14,10 +14,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"
@@ -26,10 +26,10 @@
#include "pascalproject_part.h"
#include "pascalprojectoptionsdlg.h"
-PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, QWidget* parent, const char* name, WFlags fl)
+PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl)
: PascalProjectOptionsDlgBase(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] == 'Pascal'");
@@ -43,8 +43,8 @@ PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, QWidge
dirty = false;
- QDomDocument &dom = *(m_part->projectDom());
- currentConfig = QString::null;
+ TQDomDocument &dom = *(m_part->projectDom());
+ currentConfig = TQString::null;
configChanged(DomUtil::readEntry(dom, "/kdevpascalproject/general/useconfiguration", "default"));
}
@@ -52,17 +52,17 @@ PascalProjectOptionsDlg::~PascalProjectOptionsDlg()
{
}
-QStringList PascalProjectOptionsDlg::allBuildConfigs()
+TQStringList PascalProjectOptionsDlg::allBuildConfigs()
{
- QDomDocument &dom = *(m_part->projectDom());
+ TQDomDocument &dom = *(m_part->projectDom());
- QStringList allConfigs;
+ TQStringList allConfigs;
allConfigs.append("default");
- QDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations");
- QDomElement childEl = node.firstChild().toElement();
+ TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").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);
@@ -81,35 +81,35 @@ void PascalProjectOptionsDlg::accept()
}
}
-void PascalProjectOptionsDlg::compiler_box_activated( const QString& /*s*/ )
+void PascalProjectOptionsDlg::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 PascalProjectOptionsDlg::saveConfig( QString config )
+void PascalProjectOptionsDlg::saveConfig( TQString config )
{
- QDomDocument dom = *m_part->projectDom();
- QString prefix = "/kdevpascalproject/configurations/" + config + "/";
+ TQDomDocument dom = *m_part->projectDom();
+ TQString prefix = "/kdevpascalproject/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 PascalProjectOptionsDlg::readConfig( QString config )
+void PascalProjectOptionsDlg::readConfig( TQString config )
{
- QDomDocument dom = *m_part->projectDom();
- QString prefix = "/kdevpascalproject/configurations/" + config + "/";
+ TQDomDocument dom = *m_part->projectDom();
+ TQString prefix = "/kdevpascalproject/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] == 'Pascal'");
- 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();
@@ -120,7 +120,7 @@ void PascalProjectOptionsDlg::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);
@@ -128,7 +128,7 @@ void PascalProjectOptionsDlg::readConfig( QString config )
mainSourceUrl->setURL(m_part->projectDirectory() + "/" + DomUtil::readEntry(dom, prefix + "mainsource"));
}
-void PascalProjectOptionsDlg::configComboTextChanged(const QString &config)
+void PascalProjectOptionsDlg::configComboTextChanged(const TQString &config)
{
bool canAdd = !allConfigs.contains(config) && !config.contains("/") && !config.isEmpty();
bool canRemove = allConfigs.contains(config) && config != "default";
@@ -137,7 +137,7 @@ void PascalProjectOptionsDlg::configComboTextChanged(const QString &config)
}
-void PascalProjectOptionsDlg::configChanged(const QString &config)
+void PascalProjectOptionsDlg::configChanged(const TQString &config)
{
if (config == currentConfig || !allConfigs.contains(config))
return;
@@ -157,7 +157,7 @@ void PascalProjectOptionsDlg::configChanged(const QString &config)
void PascalProjectOptionsDlg::configAdded()
{
- QString config = config_combo->currentText();
+ TQString config = config_combo->currentText();
allConfigs.append(config);
@@ -170,27 +170,27 @@ void PascalProjectOptionsDlg::configAdded()
void PascalProjectOptionsDlg::configRemoved()
{
- QString config = config_combo->currentText();
+ TQString config = config_combo->currentText();
- QDomDocument dom = *m_part->projectDom();
- QDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations");
+ TQDomDocument dom = *m_part->projectDom();
+ TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").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 PascalProjectOptionsDlg::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;
}