summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2026-03-06 14:58:19 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2026-03-06 14:58:19 +0900
commit9a2740ecf67a5b15c55240e2a45d7e083ebc57b0 (patch)
treeee67466401f5666e213f472dabca0c91bf3a5375
parented20f2ccdd027081000243d86b3529568212e958 (diff)
downloadkmymoney-remove/kde-is-version.tar.gz
kmymoney-remove/kde-is-version.zip
Remove use of KDE_IS_VERSIONremove/kde-is-version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--kdecompat.h8
-rw-r--r--kmymoney2/dialogs/kimportdlg.cpp4
-rw-r--r--kmymoney2/dialogs/knewfiledlg.cpp7
-rw-r--r--kmymoney2/dialogs/kstartdlg.cpp4
-rw-r--r--kmymoney2/dialogs/mymoneyqifprofileeditor.cpp26
-rw-r--r--kmymoney2/export.h11
-rw-r--r--kmymoney2/kmymoney2.cpp4
-rw-r--r--kmymoney2/reports/reportstestcommon.cpp6
-rw-r--r--kmymoney2/views/kmymoneyview.cpp4
-rw-r--r--kmymoney2/widgets/kmymoneycalendar.cpp3
-rw-r--r--kmymoney2/widgets/kmymoneycalendar.h4
-rw-r--r--kmymoney2/widgets/kmymoneydateinput.cpp2
-rw-r--r--kmymoney2/widgets/kmymoneydatetbl.cpp2
-rw-r--r--kmymoney2/widgets/kmymoneydatetbl.h4
-rw-r--r--kmymoney2/widgets/tdelistviewsearchline.cpp6
15 files changed, 5 insertions, 90 deletions
diff --git a/kdecompat.h b/kdecompat.h
index 57935d7..3a24b7d 100644
--- a/kdecompat.h
+++ b/kdecompat.h
@@ -23,16 +23,8 @@
#define TDE_MAKE_VERSION(a,b,c) (((a)<<16) | ((b)<<8) | (c))
#endif
-#ifndef KDE_IS_VERSION
-#define KDE_IS_VERSION(a,b,c) (TDE_VERSION >= TDE_MAKE_VERSION(a,b,c))
-#endif
-
#ifndef QT_IS_VERSION
#define QT_IS_VERSION(a,b,c) (TQT_VERSION >= TDE_MAKE_VERSION(a,b,c))
#endif
-#if TDE_VERSION < TDE_MAKE_VERSION(3,2,0)
-#define TDE_DEPRECATED
-#endif
-
#endif // _KDECOMPAT_H
diff --git a/kmymoney2/dialogs/kimportdlg.cpp b/kmymoney2/dialogs/kimportdlg.cpp
index 119a1e4..deea816 100644
--- a/kmymoney2/dialogs/kimportdlg.cpp
+++ b/kmymoney2/dialogs/kimportdlg.cpp
@@ -116,11 +116,7 @@ void KImportDlg::slotBrowse()
dialog.setMode(KFile::File | KFile::ExistingOnly);
if(dialog.exec() == TQDialog::Accepted) {
-#if KDE_IS_VERSION(3,4,0)
m_qlineeditFile->setText(dialog.selectedURL().pathOrURL());
-#else
- m_qlineeditFile->setText(dialog.selectedURL().prettyURL(0, KURL::StripFileProtocol));
-#endif
}
}
diff --git a/kmymoney2/dialogs/knewfiledlg.cpp b/kmymoney2/dialogs/knewfiledlg.cpp
index ce746aa..eabc150 100644
--- a/kmymoney2/dialogs/knewfiledlg.cpp
+++ b/kmymoney2/dialogs/knewfiledlg.cpp
@@ -35,11 +35,8 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
#include <tdemessagebox.h>
-
-#if KDE_IS_VERSION(3,1,90)
#include <tdeabc/addressee.h>
#include <tdeabc/stdaddressbook.h>
-#endif
// ----------------------------------------------------------------------------
// Project Includes
@@ -77,12 +74,10 @@ void KNewFileDlg::init(const TQString& title)
if (!title.isEmpty())
setCaption(title);
-#if KDE_IS_VERSION( 3, 1, 90 )
TDEABC::StdAddressBook *ab = static_cast<TDEABC::StdAddressBook*>
( TDEABC::StdAddressBook::self() );
if ( ab && !ab->whoAmI().isEmpty() )
showLoadButton = true;
-#endif
if(!showLoadButton)
tdeabcBtn->hide();
@@ -112,7 +107,6 @@ void KNewFileDlg::okClicked()
void KNewFileDlg::loadFromKABC(void)
{
-#if KDE_IS_VERSION( 3, 1, 90 )
TDEABC::StdAddressBook *ab = static_cast<TDEABC::StdAddressBook*>
( TDEABC::StdAddressBook::self() );
if ( !ab )
@@ -135,7 +129,6 @@ void KNewFileDlg::loadFromKABC(void)
postcodeEdit->setText( a.postalCode() );
townEdit->setText( a.locality() );
streetEdit->setText( a.street() );
-#endif
}
#include "knewfiledlg.moc"
diff --git a/kmymoney2/dialogs/kstartdlg.cpp b/kmymoney2/dialogs/kstartdlg.cpp
index 29c936b..380f108 100644
--- a/kmymoney2/dialogs/kstartdlg.cpp
+++ b/kmymoney2/dialogs/kstartdlg.cpp
@@ -193,11 +193,7 @@ void KStartDlg::slotOk()
bool KStartDlg::fileExists(KURL url)
{
-#if KDE_IS_VERSION(3,2,0)
return TDEIO::NetAccess::exists(url, true, this);
-#else
- return TDEIO::NetAccess::exists(url);
-#endif
}
void KStartDlg::slotTemplateSelectionChanged(TQIconViewItem* item)
diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp
index 0b93ce6..1af0674 100644
--- a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp
+++ b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp
@@ -41,12 +41,8 @@
#include <kurlrequester.h>
#include <kiconloader.h>
#include <tdeapplication.h>
+#include <kinputdialog.h>
-#if KDE_IS_VERSION(3,2,0)
- #include <kinputdialog.h>
-#else
- #include <klineeditdlg.h>
-#endif
// ----------------------------------------------------------------------------
// Project Includes
@@ -403,7 +399,6 @@ void MyMoneyQifProfileEditor::slotNew(void)
const TQString MyMoneyQifProfileEditor::enterName(bool& ok)
{
MyMoneyQifProfileNameValidator val(this, "Validator");
-#if KDE_IS_VERSION(3,2,0)
return KInputDialog::getText(i18n("QIF Profile Editor"),
i18n("Enter new profile name"),
TQString(),
@@ -412,25 +407,6 @@ const TQString MyMoneyQifProfileEditor::enterName(bool& ok)
0,
&val,
0);
-#else
- TQString rc;
-
- // the blank in the next line as the value for the edit box is
- // there on purpose, so that with the following call to validateAndSet
- // the state is changed and the OK-Button is greyed
- KLineEditDlg* dlg = new KLineEditDlg(i18n("Enter new profile name"), " ", this);
- dlg->lineEdit()->setValidator(&val);
- dlg->lineEdit()->validateAndSet("", 0, 0, 0);
-
- ok = false;
- if(dlg->exec()) {
- ok = true;
- }
- rc = dlg->lineEdit()->text();
- delete dlg;
-
- return rc;
-#endif
}
void MyMoneyQifProfileEditor::slotDelete(void)
diff --git a/kmymoney2/export.h b/kmymoney2/export.h
index 8945eef..b3cd785 100644
--- a/kmymoney2/export.h
+++ b/kmymoney2/export.h
@@ -23,15 +23,12 @@
#include <tdeversion.h>
-#if KDE_IS_VERSION(3,2,90)
- #ifdef __TDE_HAVE_GCC_VISIBILITY
- #include <tdemacros.h>
- #define KMYMONEY_EXPORT TDE_EXPORT
- #else
- #define KMYMONEY_EXPORT
- #endif
+#ifdef __TDE_HAVE_GCC_VISIBILITY
+ #include <tdemacros.h>
+ #define KMYMONEY_EXPORT TDE_EXPORT
#else
#define KMYMONEY_EXPORT
#endif
+
#endif /* _KMYMONEY_EXPORT_H */
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp
index 3da4a9f..eee3563 100644
--- a/kmymoney2/kmymoney2.cpp
+++ b/kmymoney2/kmymoney2.cpp
@@ -948,11 +948,7 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url)
if(!duplicate) {
-#if KDE_IS_VERSION(3,2,0)
if((url.protocol() == "sql") || (url.isValid() && TDEIO::NetAccess::exists(url, true, this))) {
-#else
- if((url.protocol() == "sql") || (url.isValid() && TDEIO::NetAccess::exists(url))) {
-#endif
KURL dburl = url;
// check if a password is needed. it may be if the URL came from the last/recent file list
if ((dburl.queryItem("secure") == "yes") && dburl.pass().isEmpty()) {
diff --git a/kmymoney2/reports/reportstestcommon.cpp b/kmymoney2/reports/reportstestcommon.cpp
index f411fc3..11de77b 100644
--- a/kmymoney2/reports/reportstestcommon.cpp
+++ b/kmymoney2/reports/reportstestcommon.cpp
@@ -402,14 +402,8 @@ void writeRCFtoXML( const MyMoneyReport& filter, const TQString& _filename )
g.open( IO_WriteOnly );
TQTextStream stream(&g);
-#if KDE_IS_VERSION(3,2,0)
stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << doc->toString();
-#else
- //stream.setEncoding(TQTextStream::Locale);
- TQString temp = doc->toString();
- stream << temp.data();
-#endif
g.close();
delete doc;
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp
index 013b845..d9f59c0 100644
--- a/kmymoney2/views/kmymoneyview.cpp
+++ b/kmymoney2/views/kmymoneyview.cpp
@@ -554,11 +554,7 @@ bool KMyMoneyView::readFile(const KURL& url)
IMyMoneyStorageFormat* pReader = NULL;
-#if KDE_IS_VERSION(3,2,0)
if(!url.isValid()) {
-#else
- if(url.isMalformed()) {
-#endif
tqDebug(TQString("Invalid URL '%1'").arg(url.url()));
return false;
}
diff --git a/kmymoney2/widgets/kmymoneycalendar.cpp b/kmymoney2/widgets/kmymoneycalendar.cpp
index 7c5549c..88b39bc 100644
--- a/kmymoney2/widgets/kmymoneycalendar.cpp
+++ b/kmymoney2/widgets/kmymoneycalendar.cpp
@@ -73,10 +73,7 @@
#include <knotifyclient.h>
#include <kdatetbl.h> // for maximum re-use
#include <tdepopupmenu.h>
-
-#if KDE_IS_VERSION(3,2,0)
#include <kcalendarsystem.h>
-#endif
// ----------------------------------------------------------------------------
// Project Includes
diff --git a/kmymoney2/widgets/kmymoneycalendar.h b/kmymoney2/widgets/kmymoneycalendar.h
index fd71369..08d8bc3 100644
--- a/kmymoney2/widgets/kmymoneycalendar.h
+++ b/kmymoney2/widgets/kmymoneycalendar.h
@@ -253,11 +253,7 @@ private:
// calculate ISO 8601 week number
int weekOfYear(TQDate);
-#if KDE_IS_VERSION(3,2,0)
#define MONTH_NAME(a,b,c) TDEGlobal::locale()->calendar()->monthName(a,b,c)
-#else
- #define MONTH_NAME(a,b,c) TDEGlobal::locale()->monthName(a,c)
-#endif
};
#endif
diff --git a/kmymoney2/widgets/kmymoneydateinput.cpp b/kmymoney2/widgets/kmymoneydateinput.cpp
index a4f0b7f..ee0c3c0 100644
--- a/kmymoney2/widgets/kmymoneydateinput.cpp
+++ b/kmymoney2/widgets/kmymoneydateinput.cpp
@@ -130,10 +130,8 @@ kMyMoneyDateInput::kMyMoneyDateInput(TQWidget *parent, const char *name, TQt::Al
dateEdit->setSeparator(separator);
m_datePicker = new KDatePicker(m_dateFrame, m_date);
-#if KDE_IS_VERSION(3,1,0)
// Let the date picker have a close button (Added in 3.1)
m_datePicker->setCloseButton(true);
-#endif
// the next line is a try to add an icon to the button
m_dateButton = new KPushButton(TQIconSet(TQPixmap(TDEGlobal::iconLoader()->iconPath("date", -TDEIcon::SizeSmall))), TQString(""), this);
diff --git a/kmymoney2/widgets/kmymoneydatetbl.cpp b/kmymoney2/widgets/kmymoneydatetbl.cpp
index 0601132..c4e2095 100644
--- a/kmymoney2/widgets/kmymoneydatetbl.cpp
+++ b/kmymoney2/widgets/kmymoneydatetbl.cpp
@@ -65,9 +65,7 @@
#include <tdelocale.h>
#include <kdebug.h>
#include <knotifyclient.h>
-#if KDE_IS_VERSION(3,2,0)
#include <kcalendarsystem.h>
-#endif
// ----------------------------------------------------------------------------
// Project Includes
diff --git a/kmymoney2/widgets/kmymoneydatetbl.h b/kmymoney2/widgets/kmymoneydatetbl.h
index 9ff7528..74e6a10 100644
--- a/kmymoney2/widgets/kmymoneydatetbl.h
+++ b/kmymoney2/widgets/kmymoneydatetbl.h
@@ -177,11 +177,7 @@ protected:
private:
-#if KDE_IS_VERSION(3,2,0)
#define WEEK_DAY_NAME(a,b) TDEGlobal::locale()->calendar()->weekDayName(a,b)
-#else
- #define WEEK_DAY_NAME(a,b) TDEGlobal::locale()->weekDayName(a,b)
-#endif
};
#endif
diff --git a/kmymoney2/widgets/tdelistviewsearchline.cpp b/kmymoney2/widgets/tdelistviewsearchline.cpp
index 9bce5a6..5f56d6a 100644
--- a/kmymoney2/widgets/tdelistviewsearchline.cpp
+++ b/kmymoney2/widgets/tdelistviewsearchline.cpp
@@ -74,10 +74,8 @@ TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, TDEListView *list
connect(listView, TQ_SIGNAL(destroyed()),
this, TQ_SLOT(listViewDeleted()));
-#if KDE_IS_VERSION(3,3,0)
connect(listView, TQ_SIGNAL(itemAdded(TQListViewItem *)),
this, TQ_SLOT(itemAdded(TQListViewItem *)));
-#endif
}
else
setEnabled(false);
@@ -187,10 +185,8 @@ void TDEListViewSearchLine::setListView(TDEListView *lv)
disconnect(d->listView, TQ_SIGNAL(destroyed()),
this, TQ_SLOT(listViewDeleted()));
-#if KDE_IS_VERSION(3,3,0)
disconnect(d->listView, TQ_SIGNAL(itemAdded(TQListViewItem *)),
this, TQ_SLOT(itemAdded(TQListViewItem *)));
-#endif
}
d->listView = lv;
@@ -199,10 +195,8 @@ void TDEListViewSearchLine::setListView(TDEListView *lv)
connect(d->listView, TQ_SIGNAL(destroyed()),
this, TQ_SLOT(listViewDeleted()));
-#if KDE_IS_VERSION(3,3,0)
connect(d->listView, TQ_SIGNAL(itemAdded(TQListViewItem *)),
this, TQ_SLOT(itemAdded(TQListViewItem *)));
-#endif
}
setEnabled(bool(lv));