From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: TQt4 port kdevelop This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- buildtools/ada/adaglobaloptionsdlg.cpp | 6 +-- buildtools/ada/adaglobaloptionsdlg.h | 3 +- buildtools/ada/adaproject_optionsdlgbase.ui | 58 ++++++++++++++--------------- buildtools/ada/adaproject_part.cpp | 16 ++++---- buildtools/ada/adaproject_part.h | 3 +- buildtools/ada/adaproject_widget.h | 3 +- buildtools/ada/adaprojectoptionsdlg.cpp | 18 ++++----- buildtools/ada/adaprojectoptionsdlg.h | 3 +- buildtools/ada/service.cpp | 2 +- 9 files changed, 58 insertions(+), 54 deletions(-) (limited to 'buildtools/ada') diff --git a/buildtools/ada/adaglobaloptionsdlg.cpp b/buildtools/ada/adaglobaloptionsdlg.cpp index e44a15be..d91d165c 100644 --- a/buildtools/ada/adaglobaloptionsdlg.cpp +++ b/buildtools/ada/adaglobaloptionsdlg.cpp @@ -21,8 +21,8 @@ #include "adaproject_part.h" #include "adaglobaloptionsdlg.h" -AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* parent, const char* name, WFlags fl) - :AdaProjectOptionsDlgBase(parent,name,fl), m_part(part) +AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* tqparent, const char* name, WFlags fl) + :AdaProjectOptionsDlgBase(tqparent,name,fl), m_part(part) { delete config_label; delete config_combo; @@ -44,7 +44,7 @@ AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* parent, if (offers.isEmpty()) options_button->setEnabled(false); - currentCompiler = TQString::null; + currentCompiler = TQString(); /*kdDebug() << ServiceComboBox::defaultCompiler() << endl; kdDebug() << ServiceComboBox::itemForText(ServiceComboBox::defaultCompiler(), service_names) << endl; diff --git a/buildtools/ada/adaglobaloptionsdlg.h b/buildtools/ada/adaglobaloptionsdlg.h index 1a186ce9..e72a1941 100644 --- a/buildtools/ada/adaglobaloptionsdlg.h +++ b/buildtools/ada/adaglobaloptionsdlg.h @@ -20,9 +20,10 @@ class AdaProjectPart; class AdaGlobalOptionsDlg : public AdaProjectOptionsDlgBase { Q_OBJECT + TQ_OBJECT public: - AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~AdaGlobalOptionsDlg(); public slots: diff --git a/buildtools/ada/adaproject_optionsdlgbase.ui b/buildtools/ada/adaproject_optionsdlgbase.ui index 72e99f74..d6219031 100644 --- a/buildtools/ada/adaproject_optionsdlgbase.ui +++ b/buildtools/ada/adaproject_optionsdlgbase.ui @@ -1,6 +1,6 @@ AdaProjectOptionsDlgBase - + AdaProjectOptionsDlgBase @@ -32,14 +32,14 @@ Expanding - + 20 160 - + configuration_layout @@ -48,7 +48,7 @@ unnamed - + config_label @@ -64,7 +64,7 @@ Configuration: - + config_combo @@ -90,14 +90,14 @@ Fixed - + 20 8 - + addconfig_button @@ -105,7 +105,7 @@ Add - + removeconfig_button @@ -123,7 +123,7 @@ Expanding - + 20 20 @@ -132,7 +132,7 @@ - + options_button @@ -144,7 +144,7 @@ 0 - + 30 32767 @@ -154,7 +154,7 @@ ... - + options_label @@ -173,7 +173,7 @@ compiler_box - + compiler_label @@ -192,22 +192,22 @@ compiler_box - + exec_edit - + options_edit - + compiler_box - + exec_label @@ -250,7 +250,7 @@ Fixed - + 20 16 @@ -267,7 +267,7 @@ Fixed - + 20 16 @@ -278,7 +278,7 @@ mainSourceUrl - + 0 26 @@ -288,7 +288,7 @@ WheelFocus - + mainSourceLabel @@ -317,7 +317,7 @@ Fixed - + 20 30 @@ -334,14 +334,14 @@ Expanding - + 400 20 - + defaultopts_button @@ -447,7 +447,7 @@ addconfig_button removeconfig_button - + compiler_box_activated(const QString&) addconfig_button_clicked() configRemoved() @@ -457,14 +457,14 @@ configAdded() setDirty() setDefaultOptions() - + kdialog.h - - + + - qwidget.h + tqwidget.h kurlrequester.h klineedit.h kpushbutton.h diff --git a/buildtools/ada/adaproject_part.cpp b/buildtools/ada/adaproject_part.cpp index f226809d..d747eb00 100644 --- a/buildtools/ada/adaproject_part.cpp +++ b/buildtools/ada/adaproject_part.cpp @@ -46,8 +46,8 @@ typedef KDevGenericFactory AdaProjectFactory; static const KDevPluginInfo data("kdevadaproject"); K_EXPORT_COMPONENT_FACTORY( libkdevadaproject, AdaProjectFactory( data ) ) -AdaProjectPart::AdaProjectPart(TQObject *parent, const char *name, const TQStringList& ) - :KDevBuildTool(&data, parent, name ? name : "AdaProjectPart" ) +AdaProjectPart::AdaProjectPart(TQObject *tqparent, const char *name, const TQStringList& ) + :KDevBuildTool(&data, tqparent, name ? name : "AdaProjectPart" ) { setInstance(AdaProjectFactory::instance()); setXMLFile("kdevadaproject.rc"); @@ -139,7 +139,7 @@ void AdaProjectPart::openProject(const TQString &dirName, const TQString &projec do { dir.setPath(s.pop()); kdDebug() << "AdaProjectPart::openProject examining: " << dir.path() << endl; - const QFileInfoList *dirEntries = dir.entryInfoList(); + const TQFileInfoList *dirEntries = dir.entryInfoList(); if( !dirEntries ) break; @@ -249,7 +249,7 @@ TQString AdaProjectPart::mainSource() const void AdaProjectPart::setMainSource(TQString fullPath) { TQString olddir = activeDirectory(); - m_mainSource = fullPath.replace(TQRegExp(TQString(projectDirectory() + TQString("/"))),""); + m_mainSource = fullPath.tqreplace(TQRegExp(TQString(projectDirectory() + TQString("/"))),""); emit activeDirectoryChanged( olddir, activeDirectory() ); } @@ -266,7 +266,7 @@ TQString AdaProjectPart::projectName() const TQString AdaProjectPart::activeDirectory() const { TQFileInfo fi(mainSource()); - return fi.dirPath(true).replace(TQRegExp(projectDirectory()),""); + return fi.dirPath(true).tqreplace(TQRegExp(projectDirectory()),""); } TQString AdaProjectPart::buildDirectory() const @@ -281,11 +281,11 @@ void AdaProjectPart::listOfFiles(TQStringList &result, TQString path) const if (!d.exists()) return; - const QFileInfoList *entries = d.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::Hidden); + const TQFileInfoList *entries = d.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::Hidden); if( !entries ) return; - QFileInfoListIterator it( *entries ); + TQFileInfoListIterator it( *entries ); while( const TQFileInfo* fileInfo = it.current() ) { ++it; @@ -420,7 +420,7 @@ KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) if (!factory) { 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)); + "The diagnostics are:\n%2").tqarg(service->name()).tqarg(errorMessage)); exit(1); } diff --git a/buildtools/ada/adaproject_part.h b/buildtools/ada/adaproject_part.h index b62cf204..d92205df 100644 --- a/buildtools/ada/adaproject_part.h +++ b/buildtools/ada/adaproject_part.h @@ -20,8 +20,9 @@ class KDevCompilerOptions; class AdaProjectPart : public KDevBuildTool { Q_OBJECT + TQ_OBJECT public: - AdaProjectPart(TQObject *parent, const char *name, const TQStringList &); + AdaProjectPart(TQObject *tqparent, const char *name, const TQStringList &); ~AdaProjectPart(); virtual void openProject(const TQString &dirName, const TQString &projectName); diff --git a/buildtools/ada/adaproject_widget.h b/buildtools/ada/adaproject_widget.h index 5e7038f2..e527cd0d 100644 --- a/buildtools/ada/adaproject_widget.h +++ b/buildtools/ada/adaproject_widget.h @@ -7,9 +7,10 @@ class KDevProject; class AdaProjectPart; -class AdaProjectWidget : public QWidget +class AdaProjectWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: diff --git a/buildtools/ada/adaprojectoptionsdlg.cpp b/buildtools/ada/adaprojectoptionsdlg.cpp index ee08da6d..f00a0bb1 100644 --- a/buildtools/ada/adaprojectoptionsdlg.cpp +++ b/buildtools/ada/adaprojectoptionsdlg.cpp @@ -24,10 +24,10 @@ #include "adaproject_part.h" #include "adaprojectoptionsdlg.h" -AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* parent, const char* name, WFlags fl) - : AdaProjectOptionsDlgBase(parent,name, fl), m_part(part) +AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* tqparent, const char* name, WFlags fl) + : AdaProjectOptionsDlgBase(tqparent,name, fl), m_part(part) { - config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this)); + config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Ada'"); @@ -42,7 +42,7 @@ AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* paren dirty = false; TQDomDocument &dom = *(m_part->projectDom()); - currentConfig = TQString::null; + currentConfig = TQString(); configChanged(DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default")); } @@ -94,7 +94,7 @@ void AdaProjectOptionsDlg::saveConfig( TQString config ) 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(TQRegExp(m_part->projectDirectory() + TQString("/")),"")); + DomUtil::writeEntry(dom, prefix + "mainsource", mainSourceUrl->url().tqreplace(TQRegExp(m_part->projectDirectory() + TQString("/")),"")); } void AdaProjectOptionsDlg::readConfig( TQString config ) @@ -128,8 +128,8 @@ void AdaProjectOptionsDlg::readConfig( TQString config ) void AdaProjectOptionsDlg::configComboTextChanged(const TQString &config) { - bool canAdd = !allConfigs.contains(config) && !config.contains("/") && !config.isEmpty(); - bool canRemove = allConfigs.contains(config) && config != "default"; + bool canAdd = !allConfigs.tqcontains(config) && !config.tqcontains("/") && !config.isEmpty(); + bool canRemove = allConfigs.tqcontains(config) && config != "default"; addconfig_button->setEnabled(canAdd); removeconfig_button->setEnabled(canRemove); } @@ -137,7 +137,7 @@ void AdaProjectOptionsDlg::configComboTextChanged(const TQString &config) void AdaProjectOptionsDlg::configChanged(const TQString &config) { - if (config == currentConfig || !allConfigs.contains(config)) + if (config == currentConfig || !allConfigs.tqcontains(config)) return; if (!currentConfig.isNull() && dirty) @@ -178,7 +178,7 @@ void AdaProjectOptionsDlg::configRemoved() config_combo->clear(); config_combo->insertStringList(allConfigs); - currentConfig = TQString::null; + currentConfig = TQString(); configChanged("default"); } diff --git a/buildtools/ada/adaprojectoptionsdlg.h b/buildtools/ada/adaprojectoptionsdlg.h index 5e40547d..e9f404f0 100644 --- a/buildtools/ada/adaprojectoptionsdlg.h +++ b/buildtools/ada/adaprojectoptionsdlg.h @@ -19,9 +19,10 @@ class KDevCompilerOptions; class AdaProjectOptionsDlg : public AdaProjectOptionsDlgBase { Q_OBJECT + TQ_OBJECT public: - AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~AdaProjectOptionsDlg(); public slots: diff --git a/buildtools/ada/service.cpp b/buildtools/ada/service.cpp index 97b4f2f5..27a7a691 100644 --- a/buildtools/ada/service.cpp +++ b/buildtools/ada/service.cpp @@ -32,7 +32,7 @@ void ServiceComboBox::insertStringList(TQComboBox *combo, const TQValueListcurrentItem() == -1) - return TQString::null; + return TQString(); return names[combo->currentItem()]; } -- cgit v1.2.1