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/pascal/pascalglobaloptionsdlg.cpp | 6 +-- buildtools/pascal/pascalglobaloptionsdlg.h | 3 +- buildtools/pascal/pascalproject_optionsdlgbase.ui | 56 +++++++++++------------ buildtools/pascal/pascalproject_part.cpp | 14 +++--- buildtools/pascal/pascalproject_part.h | 3 +- buildtools/pascal/pascalproject_widget.h | 3 +- buildtools/pascal/pascalprojectoptionsdlg.cpp | 18 ++++---- buildtools/pascal/pascalprojectoptionsdlg.h | 3 +- buildtools/pascal/service.cpp | 2 +- 9 files changed, 56 insertions(+), 52 deletions(-) (limited to 'buildtools/pascal') diff --git a/buildtools/pascal/pascalglobaloptionsdlg.cpp b/buildtools/pascal/pascalglobaloptionsdlg.cpp index c2c32f9e..d0ec682d 100644 --- a/buildtools/pascal/pascalglobaloptionsdlg.cpp +++ b/buildtools/pascal/pascalglobaloptionsdlg.cpp @@ -23,8 +23,8 @@ #include "pascalproject_part.h" #include "pascalglobaloptionsdlg.h" -PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl) - :PascalProjectOptionsDlgBase(parent,name,fl), m_part(part) +PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget* tqparent, const char* name, WFlags fl) + :PascalProjectOptionsDlgBase(tqparent,name,fl), m_part(part) { delete config_label; delete config_combo; @@ -47,7 +47,7 @@ PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget 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/pascal/pascalglobaloptionsdlg.h b/buildtools/pascal/pascalglobaloptionsdlg.h index b0c19e0e..295958fc 100644 --- a/buildtools/pascal/pascalglobaloptionsdlg.h +++ b/buildtools/pascal/pascalglobaloptionsdlg.h @@ -22,9 +22,10 @@ class PascalProjectPart; class PascalGlobalOptionsDlg : public PascalProjectOptionsDlgBase { Q_OBJECT + TQ_OBJECT public: - PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~PascalGlobalOptionsDlg(); public slots: diff --git a/buildtools/pascal/pascalproject_optionsdlgbase.ui b/buildtools/pascal/pascalproject_optionsdlgbase.ui index 0f0b2324..a00c026f 100644 --- a/buildtools/pascal/pascalproject_optionsdlgbase.ui +++ b/buildtools/pascal/pascalproject_optionsdlgbase.ui @@ -1,6 +1,6 @@ PascalProjectOptionsDlgBase - + PascalProjectOptionsDlgBase @@ -22,7 +22,7 @@ unnamed - + configuration_layout @@ -30,7 +30,7 @@ unnamed - + config_label @@ -49,7 +49,7 @@ config_combo - + config_combo @@ -75,14 +75,14 @@ Fixed - + 20 8 - + addconfig_button @@ -90,7 +90,7 @@ &Add - + removeconfig_button @@ -108,7 +108,7 @@ Expanding - + 20 20 @@ -117,7 +117,7 @@ - + options_button @@ -129,7 +129,7 @@ 0 - + 30 32767 @@ -139,7 +139,7 @@ ... - + options_label @@ -158,7 +158,7 @@ compiler_box - + compiler_label @@ -177,22 +177,22 @@ compiler_box - + exec_edit - + options_edit - + compiler_box - + exec_label @@ -235,7 +235,7 @@ Fixed - + 20 16 @@ -252,7 +252,7 @@ Fixed - + 20 16 @@ -269,7 +269,7 @@ Fixed - + 20 30 @@ -286,14 +286,14 @@ Expanding - + 400 20 - + defaultopts_button @@ -305,7 +305,7 @@ mainSourceUrl - + 0 26 @@ -315,7 +315,7 @@ WheelFocus - + mainSourceLabel @@ -344,7 +344,7 @@ Expanding - + 20 20 @@ -453,7 +453,7 @@ kdialog.h - + compiler_box_activated(const QString&) addconfig_button_clicked() configRemoved() @@ -463,9 +463,9 @@ configAdded() setDirty() setDefaultOptions() - - - + + + kurlrequester.h klineedit.h diff --git a/buildtools/pascal/pascalproject_part.cpp b/buildtools/pascal/pascalproject_part.cpp index 2ed25fc0..6d26ac60 100644 --- a/buildtools/pascal/pascalproject_part.cpp +++ b/buildtools/pascal/pascalproject_part.cpp @@ -52,8 +52,8 @@ typedef KDevGenericFactory PascalProjectFactory; static const KDevPluginInfo data("kdevpascalproject"); K_EXPORT_COMPONENT_FACTORY( libkdevpascalproject, PascalProjectFactory( data ) ) -PascalProjectPart::PascalProjectPart(TQObject *parent, const char *name, const TQStringList& ) - :KDevBuildTool(&data, parent, name ? name : "PascalProjectPart" ) +PascalProjectPart::PascalProjectPart(TQObject *tqparent, const char *name, const TQStringList& ) + :KDevBuildTool(&data, tqparent, name ? name : "PascalProjectPart" ) { setInstance(PascalProjectFactory::instance()); setXMLFile("kdevpascalproject.rc"); @@ -149,7 +149,7 @@ void PascalProjectPart::openProject(const TQString &dirName, const TQString &pro do { dir.setPath(s.pop()); kdDebug(9033) << "Examining: " << dir.path() << endl; - const QFileInfoList *dirEntries = dir.entryInfoList(); + const TQFileInfoList *dirEntries = dir.entryInfoList(); TQPtrListIterator it(*dirEntries); for (; it.current(); ++it) { TQString fileName = it.current()->fileName(); @@ -256,7 +256,7 @@ TQString PascalProjectPart::mainSource() const void PascalProjectPart::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() ); } @@ -273,7 +273,7 @@ TQString PascalProjectPart::projectName() const TQString PascalProjectPart::activeDirectory() const { TQFileInfo fi(mainSource()); - return fi.dirPath(true).replace(TQRegExp(projectDirectory()),""); + return fi.dirPath(true).tqreplace(TQRegExp(projectDirectory()),""); } TQString PascalProjectPart::buildDirectory() const @@ -287,7 +287,7 @@ void PascalProjectPart::listOfFiles(TQStringList &result, TQString path) const TQDir d(path); if (!d.exists()) return; - QFileInfoList *entries = const_cast(d.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::Hidden)); + TQFileInfoList *entries = const_cast(d.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::Hidden)); for (TQFileInfo *it = entries->first(); it; it = entries->next()) { if ((it->isDir()) && (it->filePath() != path)) @@ -448,7 +448,7 @@ KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &na if (!factory) { TQString errorMessage = KLibLoader::self()->lastErrorMessage(); KMessageBox::error(0, i18n("There was an error loading the module %1.\n" - "The diagnostics is:\n%2").arg(service->name()).arg(errorMessage)); + "The diagnostics is:\n%2").tqarg(service->name()).tqarg(errorMessage)); exit(1); } diff --git a/buildtools/pascal/pascalproject_part.h b/buildtools/pascal/pascalproject_part.h index 944250e4..81565cc4 100644 --- a/buildtools/pascal/pascalproject_part.h +++ b/buildtools/pascal/pascalproject_part.h @@ -22,8 +22,9 @@ class KDevCompilerOptions; class PascalProjectPart : public KDevBuildTool { Q_OBJECT + TQ_OBJECT public: - PascalProjectPart(TQObject *parent, const char *name, const TQStringList &); + PascalProjectPart(TQObject *tqparent, const char *name, const TQStringList &); ~PascalProjectPart(); virtual void openProject(const TQString &dirName, const TQString &projectName); diff --git a/buildtools/pascal/pascalproject_widget.h b/buildtools/pascal/pascalproject_widget.h index bfd9c328..e7bd5d1d 100644 --- a/buildtools/pascal/pascalproject_widget.h +++ b/buildtools/pascal/pascalproject_widget.h @@ -10,9 +10,10 @@ class KDevProject; class PascalProjectPart; -class PascalProjectWidget : public QWidget +class PascalProjectWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: diff --git a/buildtools/pascal/pascalprojectoptionsdlg.cpp b/buildtools/pascal/pascalprojectoptionsdlg.cpp index 6bbff084..d1ce1f5f 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.cpp +++ b/buildtools/pascal/pascalprojectoptionsdlg.cpp @@ -26,10 +26,10 @@ #include "pascalproject_part.h" #include "pascalprojectoptionsdlg.h" -PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl) - : PascalProjectOptionsDlgBase(parent,name, fl), m_part(part) +PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* tqparent, const char* name, WFlags fl) + : PascalProjectOptionsDlgBase(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] == 'Pascal'"); @@ -44,7 +44,7 @@ PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidg dirty = false; TQDomDocument &dom = *(m_part->projectDom()); - currentConfig = TQString::null; + currentConfig = TQString(); configChanged(DomUtil::readEntry(dom, "/kdevpascalproject/general/useconfiguration", "default")); } @@ -96,7 +96,7 @@ void PascalProjectOptionsDlg::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 PascalProjectOptionsDlg::readConfig( TQString config ) @@ -130,8 +130,8 @@ void PascalProjectOptionsDlg::readConfig( TQString config ) void PascalProjectOptionsDlg::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); } @@ -139,7 +139,7 @@ void PascalProjectOptionsDlg::configComboTextChanged(const TQString &config) void PascalProjectOptionsDlg::configChanged(const TQString &config) { - if (config == currentConfig || !allConfigs.contains(config)) + if (config == currentConfig || !allConfigs.tqcontains(config)) return; if (!currentConfig.isNull() && dirty) @@ -180,7 +180,7 @@ void PascalProjectOptionsDlg::configRemoved() config_combo->clear(); config_combo->insertStringList(allConfigs); - currentConfig = TQString::null; + currentConfig = TQString(); configChanged("default"); } diff --git a/buildtools/pascal/pascalprojectoptionsdlg.h b/buildtools/pascal/pascalprojectoptionsdlg.h index 6e483338..9ebcbe45 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.h +++ b/buildtools/pascal/pascalprojectoptionsdlg.h @@ -21,9 +21,10 @@ class KDevCompilerOptions; class PascalProjectOptionsDlg : public PascalProjectOptionsDlgBase { Q_OBJECT + TQ_OBJECT public: - PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~PascalProjectOptionsDlg(); public slots: diff --git a/buildtools/pascal/service.cpp b/buildtools/pascal/service.cpp index ea3846b2..b49274ea 100644 --- a/buildtools/pascal/service.cpp +++ b/buildtools/pascal/service.cpp @@ -34,7 +34,7 @@ void ServiceComboBox::insertStringList(TQComboBox *combo, const TQValueListcurrentItem() == -1) - return TQString::null; + return TQString(); return names[combo->currentItem()]; } -- cgit v1.2.1