From 533e8284bef6f70f5649c9fbb5b6038ba864f590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 28 Feb 2013 00:31:58 +0100 Subject: Fix unintended rename of ftnchekconfig* --- languages/fortran/CMakeLists.txt | 2 +- languages/fortran/Makefile.am | 2 +- languages/fortran/fortransupportpart.cpp | 2 +- languages/fortran/ftnchekconfigwidget.cpp | 290 ++++++++++++ languages/fortran/ftnchekconfigwidget.h | 42 ++ languages/fortran/ftnchekconfigwidgetbase.ui | 584 +++++++++++++++++++++++++ languages/fortran/ftnchetdeconfigwidget.cpp | 290 ------------ languages/fortran/ftnchetdeconfigwidget.h | 42 -- languages/fortran/ftnchetdeconfigwidgetbase.ui | 584 ------------------------- 9 files changed, 919 insertions(+), 919 deletions(-) create mode 100644 languages/fortran/ftnchekconfigwidget.cpp create mode 100644 languages/fortran/ftnchekconfigwidget.h create mode 100644 languages/fortran/ftnchekconfigwidgetbase.ui delete mode 100644 languages/fortran/ftnchetdeconfigwidget.cpp delete mode 100644 languages/fortran/ftnchetdeconfigwidget.h delete mode 100644 languages/fortran/ftnchetdeconfigwidgetbase.ui (limited to 'languages/fortran') diff --git a/languages/fortran/CMakeLists.txt b/languages/fortran/CMakeLists.txt index 3b2dd46a..507795aa 100644 --- a/languages/fortran/CMakeLists.txt +++ b/languages/fortran/CMakeLists.txt @@ -40,7 +40,7 @@ install( FILES kdevfortransupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfortran tde_add_kpart( libkdevfortransupport AUTOMOC SOURCES fortransupportpart.cpp fixedformparser.cpp - ftnchetdeconfigwidget.cpp ftnchetdeconfigwidgetbase.ui + ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/fortran/Makefile.am b/languages/fortran/Makefile.am index 148c4228..73f4582c 100644 --- a/languages/fortran/Makefile.am +++ b/languages/fortran/Makefile.am @@ -9,7 +9,7 @@ kde_module_LTLIBRARIES = libkdevfortransupport.la libkdevfortransupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) libkdevfortransupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libkdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchetdeconfigwidget.cpp ftnchetdeconfigwidgetbase.ui +libkdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui METASOURCES = AUTO diff --git a/languages/fortran/fortransupportpart.cpp b/languages/fortran/fortransupportpart.cpp index 13c21b52..d2b252e1 100644 --- a/languages/fortran/fortransupportpart.cpp +++ b/languages/fortran/fortransupportpart.cpp @@ -14,7 +14,7 @@ ***************************************************************************/ #include "fortransupportpart.h" -#include "ftnchetdeconfigwidget.h" +#include "ftnchekconfigwidget.h" #include "fixedformparser.h" #include diff --git a/languages/fortran/ftnchekconfigwidget.cpp b/languages/fortran/ftnchekconfigwidget.cpp new file mode 100644 index 00000000..6381950a --- /dev/null +++ b/languages/fortran/ftnchekconfigwidget.cpp @@ -0,0 +1,290 @@ +/*************************************************************************** + * Copyright (C) 2001 by Bernd Gehrmann * + * bernd@tdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "ftnchekconfigwidget.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "domutil.h" + + +class FtnchekItem : public TQCheckListItem +{ +public: + FtnchekItem(TQListView *parent, const TQString &flagstr, + const TQString &description) + : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox), + flag(flagstr), desc(description) + { + setText(1, desc); + } + + static void readFlagsToListView(TQListView *listview, TQStringList *list); + static void writeFlagsFromListView(TQListView *listview, TQStringList *list); + +private: + TQString flag; + TQString desc; + friend class FtnchekToolTip; +}; + + +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); + if (sli != list->end()) { + flitem->setOn(true); + list->remove(sli); + } + } +} + + +void FtnchekItem::writeFlagsFromListView(TQListView *listview, TQStringList *list) +{ + (*list).clear(); + + TQListViewItem *item = listview->firstChild(); + for (; item; item = item->nextSibling()) { + FtnchekItem *flitem = static_cast(item); + if (flitem->isOn()) + (*list) << flitem->flag; + } +} + + +class FtnchekToolTip : public TQToolTip +{ +public: + FtnchekToolTip(TQWidget *parent) + : TQToolTip(parent) + {} +protected: + void maybeTip(const TQPoint &pos) + { + TQListView *listview = static_cast(parentWidget()); + TQListViewItem *item = listview->itemAt(pos); + FtnchekItem *flitem = static_cast(item); + + if (item) + tip(listview->itemRect(item), flitem->desc); + } +}; + + +const char *arguments_flags[] = { + "arrayness", I18N_NOOP("Warn about inconsistent use of arguments that use arrays"), + "type", I18N_NOOP("Warn about dummy arguments of a data type different from " + "the actual arguments"), + "function-type", I18N_NOOP("Warn if the invocation assumes a different data type for the return type, " + "different from the actual return type"), + "number", I18N_NOOP("Warn about invoking a subprogram with an incorrect number of arguments"), + 0, 0 +}; + + +const char *common_flags[] = { + "dimension", I18N_NOOP("Corresponding arrays in each declaration of a block must agree in size " + "and number of dimensions"), + "exact", I18N_NOOP("The comparison of two blocks is done variable-by-variable"), + "length", I18N_NOOP("Warn if different declarations of the same block are not equal in total length"), + "type", I18N_NOOP("In each declaration of a block, corresponding memory locations " + "must agree in data type"), + 0, 0 +}; + + +const char *truncation_flags[] = { + "int-div-exponent", I18N_NOOP("Use of the result of integer division as an exponent"), + "int-div-real", I18N_NOOP("Conversion of an expression involving an integer division to real"), + "int-div-zero", I18N_NOOP("Division in an integer constant expression that yields a result of zero"), + 0, 0 +}; + + +const char *usage_flags[] = { + "arg-alias", I18N_NOOP("A scalar dummy argument is actually the same as another " + "and is (or may be) modified"), + "arg-array-alias", I18N_NOOP("A dummy argument which is an array or array element " + "is the same array as another and is modified"), + "arg-common-alias", I18N_NOOP("A scalar dummy argument is the same as a common variable in " + "the subprogram, and either is modified"), + 0, 0 +}; + + +const char *f77_flags[] = { + "accept-type", I18N_NOOP("ACCEPT and TYPE I/O statements"), + "array-bounds", I18N_NOOP("Expressions defining array bounds that contain array " + "elements or function references"), + "assignment-stmt", I18N_NOOP("Assignment statements involving arrays"), + 0, 0 +}; + + +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"), + "hollerith", I18N_NOOP("Hollerith constants"), + 0, 0 +}; + + +FtnchekConfigWidget::FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name) + : FtnchekConfigWidgetBase(parent, name), dom(projectDom) +{ + arguments_group = new TQButtonGroup; + arguments_group->insert(argumentsall_button); + arguments_group->insert(argumentsonly_button); + common_group = new TQButtonGroup; + common_group->insert(commonall_button); + common_group->insert(commononly_button); + truncation_group = new TQButtonGroup; + truncation_group->insert(truncationall_button); + truncation_group->insert(truncationonly_button); + usage_group = new TQButtonGroup; + usage_group->insert(usageall_button); + usage_group->insert(usageonly_button); + f77_group = new TQButtonGroup; + f77_group->insert(f77all_button); + f77_group->insert(f77only_button); + portability_group = new TQButtonGroup; + portability_group->insert(portabilityall_button); + portability_group->insert(portabilityonly_button); + + arguments_listview->header()->hide(); + new FtnchekToolTip(arguments_listview); + + common_listview->header()->hide(); + new FtnchekToolTip(common_listview); + + truncation_listview->header()->hide(); + new FtnchekToolTip(truncation_listview); + + usage_listview->header()->hide(); + new FtnchekToolTip(usage_listview); + + f77_listview->header()->hide(); + new FtnchekToolTip(f77_listview); + + portability_listview->header()->hide(); + new FtnchekToolTip(portability_listview); + + for (const char **p = arguments_flags; *p; p += 2) + new FtnchekItem(arguments_listview, TQString::fromUtf8(*p), i18n(*(p+1))); + + for (const char **p = common_flags; *p; p += 2) + new FtnchekItem(common_listview, TQString::fromUtf8(*p), i18n(*(p+1))); + + for (const char **p = truncation_flags; *p; p += 2) + new FtnchekItem(truncation_listview, TQString::fromUtf8(*p), i18n(*(p+1))); + + for (const char **p = usage_flags; *p; p += 2) + new FtnchekItem(usage_listview, TQString::fromUtf8(*p), i18n(*(p+1))); + + for (const char **p = f77_flags; *p; p += 2) + new FtnchekItem(f77_listview, TQString::fromUtf8(*p), i18n(*(p+1))); + + for (const char **p = portability_flags; *p; p += 2) + new FtnchekItem(portability_listview, TQString::fromUtf8(*p), i18n(*(p+1))); + + readConfig(); +} + + +FtnchekConfigWidget::~FtnchekConfigWidget() +{ + delete arguments_group; + delete common_group; + delete truncation_group; + delete usage_group; + delete f77_group; + delete portability_group; +} + + +void FtnchekConfigWidget::accept() +{ + storeConfig(); +} + + +void FtnchekConfigWidget::readConfig() +{ + division_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/division")); + extern_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/extern")); + declare_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/declare")); + pure_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/pure")); + + argumentsall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall")); + commonall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall")); + truncationall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall")); + usageall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall")); + f77all_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all")); + portabilityall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall")); + + TQStringList list; + + list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly")); + FtnchekItem::readFlagsToListView(arguments_listview, &list); + list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/commononly")); + FtnchekItem::readFlagsToListView(common_listview, &list); + list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/truncationonly")); + FtnchekItem::readFlagsToListView(truncation_listview, &list); + list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/usageonly")); + FtnchekItem::readFlagsToListView(usage_listview, &list); + list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/f77only")); + FtnchekItem::readFlagsToListView(f77_listview, &list); + list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly")); + FtnchekItem::readFlagsToListView(portability_listview, &list); +} + + +void FtnchekConfigWidget::storeConfig() +{ + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/division", division_box->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/extern", extern_box->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/declare", declare_box->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/pure", pure_box->isChecked()); + + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall", argumentsall_button->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall", commonall_button->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall", truncationall_button->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall", usageall_button->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all", f77all_button->isChecked()); + DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall", portabilityall_button->isChecked()); + + TQStringList list; + + FtnchekItem::writeFlagsFromListView(arguments_listview, &list); + DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly", list.join(",")); + FtnchekItem::writeFlagsFromListView(common_listview, &list); + DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/commononly", list.join(",")); + FtnchekItem::writeFlagsFromListView(truncation_listview, &list); + DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/truncationonly", list.join(",")); + FtnchekItem::writeFlagsFromListView(usage_listview, &list); + DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/usageonly", list.join(",")); + FtnchekItem::writeFlagsFromListView(f77_listview, &list); + DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/f77only", list.join(",")); + FtnchekItem::writeFlagsFromListView(portability_listview, &list); + DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly", list.join(",")); +} + +#include "ftnchekconfigwidget.moc" diff --git a/languages/fortran/ftnchekconfigwidget.h b/languages/fortran/ftnchekconfigwidget.h new file mode 100644 index 00000000..786701ce --- /dev/null +++ b/languages/fortran/ftnchekconfigwidget.h @@ -0,0 +1,42 @@ +/*************************************************************************** + * Copyright (C) 2001 by Bernd Gehrmann * + * bernd@tdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef _FTNCHEKCONFIGWIDGET_H_ +#define _FTNCHEKCONFIGWIDGET_H_ + +#include +#include "ftnchekconfigwidgetbase.h" + +class TQButtonGroup; + +class FtnchekConfigWidget : public FtnchekConfigWidgetBase +{ + Q_OBJECT + + +public: + FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name); + ~FtnchekConfigWidget(); + +public slots: + void accept(); + +private: + void readConfig(); + void storeConfig(); + + TQButtonGroup *arguments_group, *common_group; + TQButtonGroup *truncation_group, *usage_group; + TQButtonGroup *f77_group, *portability_group; + TQDomDocument dom; +}; + +#endif diff --git a/languages/fortran/ftnchekconfigwidgetbase.ui b/languages/fortran/ftnchekconfigwidgetbase.ui new file mode 100644 index 00000000..f01271af --- /dev/null +++ b/languages/fortran/ftnchekconfigwidgetbase.ui @@ -0,0 +1,584 @@ + +FtnchekConfigWidgetBase + + + ftcheck_config_widget + + + + 0 + 0 + 798 + 507 + + + + Ftnchek Options + + + + unnamed + + + 0 + + + 0 + + + + TabWidget4 + + + + tab + + + &1 + + + + unnamed + + + + extern_box + + + &External subprograms without definition + + + + + division_box + + + &Divisions + + + + + declare_box + + + &Identifiers without explicit type + + + + + pure_box + + + &Assume functions have no side effects + + + + + Spacer2_3 + + + Vertical + + + Preferred + + + + 20 + 20 + + + + + + TextLabel1 + + + Ar&guments: + + + argumentsall_button + + + + + argumentsall_button + + + All + + + false + + + + + argumentsonly_button + + + Only the following: + + + true + + + + + Spacer4 + + + Horizontal + + + Preferred + + + + 20 + 20 + + + + + + Spacer3 + + + Vertical + + + Preferred + + + + 20 + 20 + + + + + + commonall_button + + + All + + + + + commononly_button + + + Only the following: + + + true + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + arguments_listview + + + NoColumn + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + common_listview + + + NoColumn + + + + + TextLabel2 + + + Common &blocks: + + + commonall_button + + + + + + + tab + + + &2 + + + + unnamed + + + + truncationonly_button + + + Only the following: + + + true + + + + + TextLabel4 + + + &Truncation and roundoff errors: + + + truncationall_button + + + + + truncationall_button + + + All + + + + + TextLabel3 + + + &Use of variables: + + + usageall_button + + + + + usageall_button + + + All + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + truncation_listview + + + NoColumn + + + + + usageonly_button + + + Only the following: + + + true + + + + + Spacer1_2 + + + Horizontal + + + Preferred + + + + 20 + 20 + + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + usage_listview + + + NoColumn + + + + + + + tab + + + &3 + + + + unnamed + + + + f77all_button + + + All + + + + + f77only_button + + + Only the following: + + + true + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + f77_listview + + + NoColumn + + + + + + + + + true + + + true + + + + + + + + true + + + true + + + + portability_listview + + + NoColumn + + + + + Spacer2 + + + Horizontal + + + Preferred + + + + 20 + 20 + + + + + + TextLabel4_2 + + + Fortran 77 language &extensions: + + + f77all_button + + + + + TextLabel3_2 + + + Other &portability warnings: + + + portabilityall_button + + + + + portabilityall_button + + + All + + + + + portabilityonly_button + + + Only the following: + + + true + + + + + + + + + declare_box + pure_box + extern_box + division_box + argumentsall_button + argumentsonly_button + arguments_listview + commonall_button + commononly_button + common_listview + TabWidget4 + truncationall_button + truncationonly_button + truncation_listview + usageall_button + usageonly_button + usage_listview + f77all_button + f77only_button + f77_listview + portabilityall_button + portabilityonly_button + portability_listview + + + kdialog.h + + + + diff --git a/languages/fortran/ftnchetdeconfigwidget.cpp b/languages/fortran/ftnchetdeconfigwidget.cpp deleted file mode 100644 index de42014b..00000000 --- a/languages/fortran/ftnchetdeconfigwidget.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2001 by Bernd Gehrmann * - * bernd@tdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "ftnchetdeconfigwidget.h" - -#include -#include -#include -#include -#include -#include -#include - -#include "domutil.h" - - -class FtnchekItem : public TQCheckListItem -{ -public: - FtnchekItem(TQListView *parent, const TQString &flagstr, - const TQString &description) - : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox), - flag(flagstr), desc(description) - { - setText(1, desc); - } - - static void readFlagsToListView(TQListView *listview, TQStringList *list); - static void writeFlagsFromListView(TQListView *listview, TQStringList *list); - -private: - TQString flag; - TQString desc; - friend class FtnchekToolTip; -}; - - -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); - if (sli != list->end()) { - flitem->setOn(true); - list->remove(sli); - } - } -} - - -void FtnchekItem::writeFlagsFromListView(TQListView *listview, TQStringList *list) -{ - (*list).clear(); - - TQListViewItem *item = listview->firstChild(); - for (; item; item = item->nextSibling()) { - FtnchekItem *flitem = static_cast(item); - if (flitem->isOn()) - (*list) << flitem->flag; - } -} - - -class FtnchekToolTip : public TQToolTip -{ -public: - FtnchekToolTip(TQWidget *parent) - : TQToolTip(parent) - {} -protected: - void maybeTip(const TQPoint &pos) - { - TQListView *listview = static_cast(parentWidget()); - TQListViewItem *item = listview->itemAt(pos); - FtnchekItem *flitem = static_cast(item); - - if (item) - tip(listview->itemRect(item), flitem->desc); - } -}; - - -const char *arguments_flags[] = { - "arrayness", I18N_NOOP("Warn about inconsistent use of arguments that use arrays"), - "type", I18N_NOOP("Warn about dummy arguments of a data type different from " - "the actual arguments"), - "function-type", I18N_NOOP("Warn if the invocation assumes a different data type for the return type, " - "different from the actual return type"), - "number", I18N_NOOP("Warn about invoking a subprogram with an incorrect number of arguments"), - 0, 0 -}; - - -const char *common_flags[] = { - "dimension", I18N_NOOP("Corresponding arrays in each declaration of a block must agree in size " - "and number of dimensions"), - "exact", I18N_NOOP("The comparison of two blocks is done variable-by-variable"), - "length", I18N_NOOP("Warn if different declarations of the same block are not equal in total length"), - "type", I18N_NOOP("In each declaration of a block, corresponding memory locations " - "must agree in data type"), - 0, 0 -}; - - -const char *truncation_flags[] = { - "int-div-exponent", I18N_NOOP("Use of the result of integer division as an exponent"), - "int-div-real", I18N_NOOP("Conversion of an expression involving an integer division to real"), - "int-div-zero", I18N_NOOP("Division in an integer constant expression that yields a result of zero"), - 0, 0 -}; - - -const char *usage_flags[] = { - "arg-alias", I18N_NOOP("A scalar dummy argument is actually the same as another " - "and is (or may be) modified"), - "arg-array-alias", I18N_NOOP("A dummy argument which is an array or array element " - "is the same array as another and is modified"), - "arg-common-alias", I18N_NOOP("A scalar dummy argument is the same as a common variable in " - "the subprogram, and either is modified"), - 0, 0 -}; - - -const char *f77_flags[] = { - "accept-type", I18N_NOOP("ACCEPT and TYPE I/O statements"), - "array-bounds", I18N_NOOP("Expressions defining array bounds that contain array " - "elements or function references"), - "assignment-stmt", I18N_NOOP("Assignment statements involving arrays"), - 0, 0 -}; - - -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"), - "hollerith", I18N_NOOP("Hollerith constants"), - 0, 0 -}; - - -FtnchekConfigWidget::FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name) - : FtnchekConfigWidgetBase(parent, name), dom(projectDom) -{ - arguments_group = new TQButtonGroup; - arguments_group->insert(argumentsall_button); - arguments_group->insert(argumentsonly_button); - common_group = new TQButtonGroup; - common_group->insert(commonall_button); - common_group->insert(commononly_button); - truncation_group = new TQButtonGroup; - truncation_group->insert(truncationall_button); - truncation_group->insert(truncationonly_button); - usage_group = new TQButtonGroup; - usage_group->insert(usageall_button); - usage_group->insert(usageonly_button); - f77_group = new TQButtonGroup; - f77_group->insert(f77all_button); - f77_group->insert(f77only_button); - portability_group = new TQButtonGroup; - portability_group->insert(portabilityall_button); - portability_group->insert(portabilityonly_button); - - arguments_listview->header()->hide(); - new FtnchekToolTip(arguments_listview); - - common_listview->header()->hide(); - new FtnchekToolTip(common_listview); - - truncation_listview->header()->hide(); - new FtnchekToolTip(truncation_listview); - - usage_listview->header()->hide(); - new FtnchekToolTip(usage_listview); - - f77_listview->header()->hide(); - new FtnchekToolTip(f77_listview); - - portability_listview->header()->hide(); - new FtnchekToolTip(portability_listview); - - for (const char **p = arguments_flags; *p; p += 2) - new FtnchekItem(arguments_listview, TQString::fromUtf8(*p), i18n(*(p+1))); - - for (const char **p = common_flags; *p; p += 2) - new FtnchekItem(common_listview, TQString::fromUtf8(*p), i18n(*(p+1))); - - for (const char **p = truncation_flags; *p; p += 2) - new FtnchekItem(truncation_listview, TQString::fromUtf8(*p), i18n(*(p+1))); - - for (const char **p = usage_flags; *p; p += 2) - new FtnchekItem(usage_listview, TQString::fromUtf8(*p), i18n(*(p+1))); - - for (const char **p = f77_flags; *p; p += 2) - new FtnchekItem(f77_listview, TQString::fromUtf8(*p), i18n(*(p+1))); - - for (const char **p = portability_flags; *p; p += 2) - new FtnchekItem(portability_listview, TQString::fromUtf8(*p), i18n(*(p+1))); - - readConfig(); -} - - -FtnchekConfigWidget::~FtnchekConfigWidget() -{ - delete arguments_group; - delete common_group; - delete truncation_group; - delete usage_group; - delete f77_group; - delete portability_group; -} - - -void FtnchekConfigWidget::accept() -{ - storeConfig(); -} - - -void FtnchekConfigWidget::readConfig() -{ - division_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/division")); - extern_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/extern")); - declare_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/declare")); - pure_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/pure")); - - argumentsall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall")); - commonall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall")); - truncationall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall")); - usageall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall")); - f77all_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all")); - portabilityall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall")); - - TQStringList list; - - list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly")); - FtnchekItem::readFlagsToListView(arguments_listview, &list); - list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/commononly")); - FtnchekItem::readFlagsToListView(common_listview, &list); - list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/truncationonly")); - FtnchekItem::readFlagsToListView(truncation_listview, &list); - list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/usageonly")); - FtnchekItem::readFlagsToListView(usage_listview, &list); - list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/f77only")); - FtnchekItem::readFlagsToListView(f77_listview, &list); - list = TQStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly")); - FtnchekItem::readFlagsToListView(portability_listview, &list); -} - - -void FtnchekConfigWidget::storeConfig() -{ - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/division", division_box->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/extern", extern_box->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/declare", declare_box->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/pure", pure_box->isChecked()); - - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall", argumentsall_button->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall", commonall_button->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall", truncationall_button->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall", usageall_button->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all", f77all_button->isChecked()); - DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall", portabilityall_button->isChecked()); - - TQStringList list; - - FtnchekItem::writeFlagsFromListView(arguments_listview, &list); - DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly", list.join(",")); - FtnchekItem::writeFlagsFromListView(common_listview, &list); - DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/commononly", list.join(",")); - FtnchekItem::writeFlagsFromListView(truncation_listview, &list); - DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/truncationonly", list.join(",")); - FtnchekItem::writeFlagsFromListView(usage_listview, &list); - DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/usageonly", list.join(",")); - FtnchekItem::writeFlagsFromListView(f77_listview, &list); - DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/f77only", list.join(",")); - FtnchekItem::writeFlagsFromListView(portability_listview, &list); - DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly", list.join(",")); -} - -#include "ftnchetdeconfigwidget.moc" diff --git a/languages/fortran/ftnchetdeconfigwidget.h b/languages/fortran/ftnchetdeconfigwidget.h deleted file mode 100644 index 0636aff9..00000000 --- a/languages/fortran/ftnchetdeconfigwidget.h +++ /dev/null @@ -1,42 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2001 by Bernd Gehrmann * - * bernd@tdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef _FTNCHEKCONFIGWIDGET_H_ -#define _FTNCHEKCONFIGWIDGET_H_ - -#include -#include "ftnchetdeconfigwidgetbase.h" - -class TQButtonGroup; - -class FtnchekConfigWidget : public FtnchekConfigWidgetBase -{ - Q_OBJECT - - -public: - FtnchekConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name); - ~FtnchekConfigWidget(); - -public slots: - void accept(); - -private: - void readConfig(); - void storeConfig(); - - TQButtonGroup *arguments_group, *common_group; - TQButtonGroup *truncation_group, *usage_group; - TQButtonGroup *f77_group, *portability_group; - TQDomDocument dom; -}; - -#endif diff --git a/languages/fortran/ftnchetdeconfigwidgetbase.ui b/languages/fortran/ftnchetdeconfigwidgetbase.ui deleted file mode 100644 index f01271af..00000000 --- a/languages/fortran/ftnchetdeconfigwidgetbase.ui +++ /dev/null @@ -1,584 +0,0 @@ - -FtnchekConfigWidgetBase - - - ftcheck_config_widget - - - - 0 - 0 - 798 - 507 - - - - Ftnchek Options - - - - unnamed - - - 0 - - - 0 - - - - TabWidget4 - - - - tab - - - &1 - - - - unnamed - - - - extern_box - - - &External subprograms without definition - - - - - division_box - - - &Divisions - - - - - declare_box - - - &Identifiers without explicit type - - - - - pure_box - - - &Assume functions have no side effects - - - - - Spacer2_3 - - - Vertical - - - Preferred - - - - 20 - 20 - - - - - - TextLabel1 - - - Ar&guments: - - - argumentsall_button - - - - - argumentsall_button - - - All - - - false - - - - - argumentsonly_button - - - Only the following: - - - true - - - - - Spacer4 - - - Horizontal - - - Preferred - - - - 20 - 20 - - - - - - Spacer3 - - - Vertical - - - Preferred - - - - 20 - 20 - - - - - - commonall_button - - - All - - - - - commononly_button - - - Only the following: - - - true - - - - - - - - - true - - - true - - - - - - - - true - - - true - - - - arguments_listview - - - NoColumn - - - - - - - - - true - - - true - - - - - - - - true - - - true - - - - common_listview - - - NoColumn - - - - - TextLabel2 - - - Common &blocks: - - - commonall_button - - - - - - - tab - - - &2 - - - - unnamed - - - - truncationonly_button - - - Only the following: - - - true - - - - - TextLabel4 - - - &Truncation and roundoff errors: - - - truncationall_button - - - - - truncationall_button - - - All - - - - - TextLabel3 - - - &Use of variables: - - - usageall_button - - - - - usageall_button - - - All - - - - - - - - - true - - - true - - - - - - - - true - - - true - - - - truncation_listview - - - NoColumn - - - - - usageonly_button - - - Only the following: - - - true - - - - - Spacer1_2 - - - Horizontal - - - Preferred - - - - 20 - 20 - - - - - - - - - - true - - - true - - - - - - - - true - - - true - - - - usage_listview - - - NoColumn - - - - - - - tab - - - &3 - - - - unnamed - - - - f77all_button - - - All - - - - - f77only_button - - - Only the following: - - - true - - - - - - - - - true - - - true - - - - - - - - true - - - true - - - - f77_listview - - - NoColumn - - - - - - - - - true - - - true - - - - - - - - true - - - true - - - - portability_listview - - - NoColumn - - - - - Spacer2 - - - Horizontal - - - Preferred - - - - 20 - 20 - - - - - - TextLabel4_2 - - - Fortran 77 language &extensions: - - - f77all_button - - - - - TextLabel3_2 - - - Other &portability warnings: - - - portabilityall_button - - - - - portabilityall_button - - - All - - - - - portabilityonly_button - - - Only the following: - - - true - - - - - - - - - declare_box - pure_box - extern_box - division_box - argumentsall_button - argumentsonly_button - arguments_listview - commonall_button - commononly_button - common_listview - TabWidget4 - truncationall_button - truncationonly_button - truncation_listview - usageall_button - usageonly_button - usage_listview - f77all_button - f77only_button - f77_listview - portabilityall_button - portabilityonly_button - portability_listview - - - kdialog.h - - - - -- cgit v1.2.3