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 --- languages/fortran/README.dox | 2 +- .../compiler/pgioptions/pgioptionsfactory.cpp | 10 +-- .../compiler/pgioptions/pgioptionsfactory.h | 5 +- .../compiler/pgioptions/pgioptionsplugin.cpp | 58 ++++++++-------- .../fortran/compiler/pgioptions/pgioptionsplugin.h | 7 +- languages/fortran/fixedformparser.cpp | 2 +- languages/fortran/fortransupportpart.cpp | 8 +-- languages/fortran/fortransupportpart.h | 3 +- languages/fortran/ftnchekconfigwidget.cpp | 24 +++---- languages/fortran/ftnchekconfigwidget.h | 3 +- languages/fortran/ftnchekconfigwidgetbase.ui | 80 +++++++++++----------- 11 files changed, 103 insertions(+), 99 deletions(-) (limited to 'languages/fortran') diff --git a/languages/fortran/README.dox b/languages/fortran/README.dox index 65a4e645..d0a5e953 100644 --- a/languages/fortran/README.dox +++ b/languages/fortran/README.dox @@ -14,7 +14,7 @@ and images. \maintainer nth maintainer full name \feature Fortran language support -\feature Consult \ref LangSupportStatus for a up to date features/status of this programming language support part. +\feature Consult \ref LangSupporttqStatus for a up to date features/status of this programming language support part. \bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. .. diff --git a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp index 66a12fbb..f6c3465e 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp +++ b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp @@ -25,8 +25,8 @@ extern "C" { } -PgiOptionsFactory::PgiOptionsFactory(TQObject *parent, const char *name) - : KLibFactory(parent, name) +PgiOptionsFactory::PgiOptionsFactory(TQObject *tqparent, const char *name) + : KLibFactory(tqparent, name) { instance(); } @@ -39,15 +39,15 @@ PgiOptionsFactory::~PgiOptionsFactory() } -TQObject *PgiOptionsFactory::createObject(TQObject *parent, const char *name, +TQObject *PgiOptionsFactory::createObject(TQObject *tqparent, const char *name, const char * /*classname*/, const TQStringList &args) { if (args.count() > 0 && qstrcmp(args[0].latin1(), "pghpf") == 0) { kdDebug(9021) << "Building PgiOptions for PGHPF" << endl; - return new PgiOptionsPlugin(PgiOptionsPlugin::PGHPF, parent, name); + return new PgiOptionsPlugin(PgiOptionsPlugin::PGHPF, tqparent, name); } else if (args.count() > 0 && qstrcmp(args[0].latin1(), "pgf77") == 0) { kdDebug(9021) << "Building PgiOptions for PGF77" << endl; - return new PgiOptionsPlugin(PgiOptionsPlugin::PGF77, parent, name); + return new PgiOptionsPlugin(PgiOptionsPlugin::PGF77, tqparent, name); } else { kdDebug(9021) << "Wrong args for kdevpgioptions library" << endl; if (args.count() > 0) diff --git a/languages/fortran/compiler/pgioptions/pgioptionsfactory.h b/languages/fortran/compiler/pgioptions/pgioptionsfactory.h index 4fd73b7f..e66e0cf2 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsfactory.h +++ b/languages/fortran/compiler/pgioptions/pgioptionsfactory.h @@ -18,12 +18,13 @@ class PgiOptionsFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - PgiOptionsFactory( TQObject *parent=0, const char *name=0 ); + PgiOptionsFactory( TQObject *tqparent=0, const char *name=0 ); ~PgiOptionsFactory(); - virtual TQObject* createObject( TQObject *parent, const char *name, + virtual TQObject* createObject( TQObject *tqparent, const char *name, const char *classname, const TQStringList &args); static KInstance *instance(); diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp index 8f22453a..267c67f0 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp +++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp @@ -72,10 +72,10 @@ const char * const hpf_flags[] = { -class GeneralTab : public QWidget +class GeneralTab : public TQWidget { public: - GeneralTab( TQWidget *parent=0, const char *name=0 ); + GeneralTab( TQWidget *tqparent=0, const char *name=0 ); ~GeneralTab(); void readFlags(TQStringList *str); @@ -83,10 +83,10 @@ public: }; -class OptimizationTab : public QWidget +class OptimizationTab : public TQWidget { public: - OptimizationTab( PgiOptionsPlugin::Type type, TQWidget *parent=0, const char *name=0 ); + OptimizationTab( PgiOptionsPlugin::Type type, TQWidget *tqparent=0, const char *name=0 ); ~OptimizationTab(); void readFlags(TQStringList *str); @@ -98,10 +98,10 @@ private: }; -class HpfTab : public QWidget +class HpfTab : public TQWidget { public: - HpfTab( TQWidget *parent=0, const char *name=0 ); + HpfTab( TQWidget *tqparent=0, const char *name=0 ); ~HpfTab(); void readFlags(TQStringList *str); @@ -112,11 +112,11 @@ private: }; -OptimizationTab::OptimizationTab(PgiOptionsPlugin::Type type, TQWidget *parent, const char *name) - : TQWidget(parent, name) +OptimizationTab::OptimizationTab(PgiOptionsPlugin::Type type, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { - TQBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - layout->setAutoAdd(true); + TQBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + tqlayout->setAutoAdd(true); TQVButtonGroup *group = new TQVButtonGroup(i18n("Optimization Level"), this); Odefault = new TQRadioButton(i18n("Default"), group); @@ -127,7 +127,7 @@ OptimizationTab::OptimizationTab(PgiOptionsPlugin::Type type, TQWidget *parent, if (type == PgiOptionsPlugin::PGHPF) { optBox = new TQListView(this); - optBox->addColumn(TQString::null); + optBox->addColumn(TQString()); optBox->header()->hide(); for (const char * const *p = optimization_flags; *p; ++p) { new TQCheckListItem(optBox, *p, TQCheckListItem::CheckBox); @@ -137,7 +137,7 @@ OptimizationTab::OptimizationTab(PgiOptionsPlugin::Type type, TQWidget *parent, optBox = 0; TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); - layout->addStretch(); + tqlayout->addStretch(); } @@ -150,7 +150,7 @@ void OptimizationTab::readFlags(TQStringList *list) if (optBox) { TQListViewItem *item = optBox->firstChild(); for (; item; item = item->nextSibling()) { - TQStringList::Iterator sli = list->find(item->text(0)); + TQStringList::Iterator sli = list->tqfind(item->text(0)); if (sli != list->end()) { static_cast(item)->setOn(true); list->remove(sli); @@ -159,17 +159,17 @@ void OptimizationTab::readFlags(TQStringList *list) } TQStringList::Iterator sli; - sli = list->find("-O0"); + sli = list->tqfind("-O0"); if (sli != list->end()) { O0->setChecked(true); list->remove(sli); } - sli = list->find("-O1"); + sli = list->tqfind("-O1"); if (sli != list->end()) { O1->setChecked(true); list->remove(sli); } - sli = list->find("-O2"); + sli = list->tqfind("-O2"); if (sli != list->end()) { O2->setChecked(true); list->remove(sli); @@ -195,20 +195,20 @@ void OptimizationTab::writeFlags(TQStringList *list) } -HpfTab::HpfTab(TQWidget *parent, const char *name) - : TQWidget(parent, name) +HpfTab::HpfTab(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { - TQBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - layout->setAutoAdd(true); + TQBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + tqlayout->setAutoAdd(true); hpfBox = new TQListView(this); - hpfBox->addColumn(TQString::null); + hpfBox->addColumn(TQString()); hpfBox->header()->hide(); for (const char * const *p = hpf_flags; *p; ++p) new TQCheckListItem(hpfBox, *p, TQCheckListItem::CheckBox); TQApplication::sendPostedEvents(this, TQEvent::ChildInserted); - layout->addStretch(); + tqlayout->addStretch(); } @@ -220,7 +220,7 @@ void HpfTab::readFlags(TQStringList *list) { TQListViewItem *item = hpfBox->firstChild(); for (; item; item = item->nextSibling()) { - TQStringList::Iterator sli = list->find(item->text(0)); + TQStringList::Iterator sli = list->tqfind(item->text(0)); if (sli != list->end()) { static_cast(item)->setOn(true); list->remove(sli); @@ -239,9 +239,9 @@ void HpfTab::writeFlags(TQStringList *list) } -PgiOptionsDialog::PgiOptionsDialog(PgiOptionsPlugin::Type type, TQWidget *parent, const char *name) +PgiOptionsDialog::PgiOptionsDialog(PgiOptionsPlugin::Type type, TQWidget *tqparent, const char *name) : KDialogBase(Tabbed, (type == PgiOptionsPlugin::PGHPF)? i18n("PGHPF Compiler Options") : i18n("PGF77 Compiler Options"), - Ok|Cancel, Ok, parent, name, true) + Ok|Cancel, Ok, tqparent, name, true) { TQVBox *vbox; @@ -299,8 +299,8 @@ TQString PgiOptionsDialog::flags() const } -PgiOptionsPlugin::PgiOptionsPlugin(Type type, TQObject *parent, const char *name) - : KDevCompilerOptions(parent, name) +PgiOptionsPlugin::PgiOptionsPlugin(Type type, TQObject *tqparent, const char *name) + : KDevCompilerOptions(tqparent, name) { pgitype = type; } @@ -310,9 +310,9 @@ PgiOptionsPlugin::~PgiOptionsPlugin() {} -TQString PgiOptionsPlugin::exec(TQWidget *parent, const TQString &flags) +TQString PgiOptionsPlugin::exec(TQWidget *tqparent, const TQString &flags) { - PgiOptionsDialog *dlg = new PgiOptionsDialog(pgitype, parent, "pgi options dialog"); + PgiOptionsDialog *dlg = new PgiOptionsDialog(pgitype, tqparent, "pgi options dialog"); TQString newFlags = flags; dlg->setFlags(flags); if (dlg->exec() == TQDialog::Accepted) diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h index aba83fbc..28392c0d 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h +++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h @@ -24,14 +24,15 @@ class HpfTab; class PgiOptionsPlugin : public KDevCompilerOptions { Q_OBJECT + TQ_OBJECT public: enum Type { PGHPF, PGF77 }; - PgiOptionsPlugin( Type type, TQObject *parent=0, const char *name=0 ); + PgiOptionsPlugin( Type type, TQObject *tqparent=0, const char *name=0 ); ~PgiOptionsPlugin(); - virtual TQString exec(TQWidget *parent, const TQString &flags); + virtual TQString exec(TQWidget *tqparent, const TQString &flags); private: Type pgitype; @@ -41,7 +42,7 @@ private: class PgiOptionsDialog : public KDialogBase { public: - PgiOptionsDialog(PgiOptionsPlugin::Type type, TQWidget *parent=0, const char *name=0 ); + PgiOptionsDialog(PgiOptionsPlugin::Type type, TQWidget *tqparent=0, const char *name=0 ); ~PgiOptionsDialog(); void setFlags(const TQString &flags); diff --git a/languages/fortran/fixedformparser.cpp b/languages/fortran/fixedformparser.cpp index 312d811e..8f07ad4a 100644 --- a/languages/fortran/fixedformparser.cpp +++ b/languages/fortran/fixedformparser.cpp @@ -73,7 +73,7 @@ void FixedFormParser::parse(const TQString &fileName) while (!stream.atEnd()) { ++lineNum; TQCString str = stream.readLine().local8Bit(); - if (!str.isEmpty() && TQCString("*Cc#!").find(str[0]) != -1) + if (!str.isEmpty() && TQCString("*Cc#!").tqfind(str[0]) != -1) continue; // Continuation line if (str.length() > 6 && str.left(5) == " " && str[5] != ' ') { diff --git a/languages/fortran/fortransupportpart.cpp b/languages/fortran/fortransupportpart.cpp index 7d4ed1bc..63a06584 100644 --- a/languages/fortran/fortransupportpart.cpp +++ b/languages/fortran/fortransupportpart.cpp @@ -48,8 +48,8 @@ typedef KDevGenericFactory FortranSupportFactory; static const KDevPluginInfo data("kdevfortransupport"); K_EXPORT_COMPONENT_FACTORY( libkdevfortransupport, FortranSupportFactory( data ) ) -FortranSupportPart::FortranSupportPart(TQObject *parent, const char *name, const TQStringList &) - : KDevLanguageSupport(&data, parent, name ? name : "FortranSupportPart") +FortranSupportPart::FortranSupportPart(TQObject *tqparent, const char *name, const TQStringList &) + : KDevLanguageSupport(&data, tqparent, name ? name : "FortranSupportPart") { setInstance(FortranSupportFactory::instance()); @@ -151,7 +151,7 @@ void FortranSupportPart::slotFtnchek() } } - makeFrontend()->queueCommand(TQString::null, cmdline); + makeFrontend()->queueCommand(TQString(), cmdline); } @@ -267,7 +267,7 @@ void FortranSupportPart::savedFile(const KURL &fileName) { kdDebug(9019) << "savedFile()" << endl; - if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) { + if (project()->allFiles().tqcontains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) { maybeParse(fileName.path()); emit addedSourceInfo( fileName.path() ); } diff --git a/languages/fortran/fortransupportpart.h b/languages/fortran/fortransupportpart.h index 2a6f8787..8bd5872b 100644 --- a/languages/fortran/fortransupportpart.h +++ b/languages/fortran/fortransupportpart.h @@ -23,9 +23,10 @@ class KDevMakeFrontend; class FortranSupportPart : public KDevLanguageSupport { Q_OBJECT + TQ_OBJECT public: - FortranSupportPart( TQObject *parent, const char *name, const TQStringList & ); + FortranSupportPart( TQObject *tqparent, const char *name, const TQStringList & ); ~FortranSupportPart(); protected: diff --git a/languages/fortran/ftnchekconfigwidget.cpp b/languages/fortran/ftnchekconfigwidget.cpp index 1c50a1e1..eaef8434 100644 --- a/languages/fortran/ftnchekconfigwidget.cpp +++ b/languages/fortran/ftnchekconfigwidget.cpp @@ -22,12 +22,12 @@ #include "domutil.h" -class FtnchekItem : public QCheckListItem +class FtnchekItem : public TQCheckListItem { public: - FtnchekItem(TQListView *parent, const TQString &flagstr, + FtnchekItem(TQListView *tqparent, const TQString &flagstr, const TQString &description) - : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox), + : TQCheckListItem(tqparent, flagstr, TQCheckListItem::CheckBox), flag(flagstr), desc(description) { setText(1, desc); @@ -48,7 +48,7 @@ void FtnchekItem::readFlagsToListView(TQListView *listview, TQStringList *list) TQListViewItem *item = listview->firstChild(); for (; item; item = item->nextSibling()) { FtnchekItem *flitem = static_cast(item); - TQStringList::Iterator sli = list->find(flitem->flag); + TQStringList::Iterator sli = list->tqfind(flitem->flag); if (sli != list->end()) { flitem->setOn(true); list->remove(sli); @@ -70,21 +70,21 @@ void FtnchekItem::writeFlagsFromListView(TQListView *listview, TQStringList *lis } -class FtnchekToolTip : public QToolTip +class FtnchekToolTip : public TQToolTip { public: - FtnchekToolTip(TQWidget *parent) - : TQToolTip(parent) + FtnchekToolTip(TQWidget *tqparent) + : TQToolTip(tqparent) {} protected: void maybeTip(const TQPoint &pos) { - TQListView *listview = static_cast(parentWidget()); + TQListView *listview = static_cast(tqparentWidget()); TQListViewItem *item = listview->itemAt(pos); FtnchekItem *flitem = static_cast(item); if (item) - tip(listview->itemRect(item), flitem->desc); + tip(listview->tqitemRect(item), flitem->desc); } }; @@ -141,14 +141,14 @@ const char *f77_flags[] = { const char *portability_flags[] = { "backslash", I18N_NOOP("Backslash characters in strings"), - "common-alignment", I18N_NOOP("COMMON block variables not in descending order of storage sizes"), + "common-tqalignment", I18N_NOOP("COMMON block variables not in descending order of storage sizes"), "hollerith", I18N_NOOP("Hollerith constants"), 0, 0 }; -FtnchekConfigWidget::FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name) - : FtnchekConfigWidgetBase(parent, name), dom(projectDom) +FtnchekConfigWidget::FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *tqparent, const char *name) + : FtnchekConfigWidgetBase(tqparent, name), dom(projectDom) { arguments_group = new TQButtonGroup; arguments_group->insert(argumentsall_button); diff --git a/languages/fortran/ftnchekconfigwidget.h b/languages/fortran/ftnchekconfigwidget.h index 703b2462..78cdd93e 100644 --- a/languages/fortran/ftnchekconfigwidget.h +++ b/languages/fortran/ftnchekconfigwidget.h @@ -20,9 +20,10 @@ class TQButtonGroup; class FtnchekConfigWidget : public FtnchekConfigWidgetBase { Q_OBJECT + TQ_OBJECT public: - FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name); + FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *tqparent, const char *name); ~FtnchekConfigWidget(); public slots: diff --git a/languages/fortran/ftnchekconfigwidgetbase.ui b/languages/fortran/ftnchekconfigwidgetbase.ui index b6bb2184..d7180514 100644 --- a/languages/fortran/ftnchekconfigwidgetbase.ui +++ b/languages/fortran/ftnchekconfigwidgetbase.ui @@ -1,6 +1,6 @@ FtnchekConfigWidgetBase - + ftcheck_config_widget @@ -25,11 +25,11 @@ 0 - + TabWidget4 - + tab @@ -40,7 +40,7 @@ unnamed - + extern_box @@ -48,7 +48,7 @@ &External subprograms without definition - + division_box @@ -56,7 +56,7 @@ &Divisions - + declare_box @@ -64,7 +64,7 @@ &Identifiers without explicit type - + pure_box @@ -82,14 +82,14 @@ Preferred - + 20 20 - + TextLabel1 @@ -100,7 +100,7 @@ argumentsall_button - + argumentsall_button @@ -111,7 +111,7 @@ false - + argumentsonly_button @@ -132,7 +132,7 @@ Preferred - + 20 20 @@ -149,14 +149,14 @@ Preferred - + 20 20 - + commonall_button @@ -164,7 +164,7 @@ All - + commononly_button @@ -175,7 +175,7 @@ true - + @@ -205,7 +205,7 @@ NoColumn - + @@ -235,7 +235,7 @@ NoColumn - + TextLabel2 @@ -248,7 +248,7 @@ - + tab @@ -259,7 +259,7 @@ unnamed - + truncationonly_button @@ -270,7 +270,7 @@ true - + TextLabel4 @@ -281,7 +281,7 @@ truncationall_button - + truncationall_button @@ -289,7 +289,7 @@ All - + TextLabel3 @@ -300,7 +300,7 @@ usageall_button - + usageall_button @@ -308,7 +308,7 @@ All - + @@ -338,7 +338,7 @@ NoColumn - + usageonly_button @@ -359,14 +359,14 @@ Preferred - + 20 20 - + @@ -398,7 +398,7 @@ - + tab @@ -409,7 +409,7 @@ unnamed - + f77all_button @@ -417,7 +417,7 @@ All - + f77only_button @@ -428,7 +428,7 @@ true - + @@ -458,7 +458,7 @@ NoColumn - + @@ -498,14 +498,14 @@ Preferred - + 20 20 - + TextLabel4_2 @@ -516,7 +516,7 @@ f77all_button - + TextLabel3_2 @@ -527,7 +527,7 @@ portabilityall_button - + portabilityall_button @@ -535,7 +535,7 @@ All - + portabilityonly_button @@ -579,6 +579,6 @@ kdialog.h - - + + -- cgit v1.2.1