[network/ktorrent] /: Update KF and Qt deprecated versions to 6.28 and 6.11 respectively
Jack Hill <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 778f6cac2a7f489611d1be83bc2653b3f4611fa6 by Jack Hill.
Committed on 14/08/2026 at 20:41.
Pushed by jackh into branch 'master'.
Update KF and Qt deprecated versions to 6.28 and 6.11 respectively
And fix subsequent build failures. These are the latest releases as of
today. Requires a bump to KF 6.5.0 for KLocalization::setupSpinBoxFormatString
Also use ecm deprecation settings.
M +3 -3 CMakeLists.txt
M +3 -2 plugins/ipfilter/ipblockingprefpage.cpp
M +1 -1 plugins/ipfilter/ipblockingprefpage.ui
https://invent.kde.org/network/ktorrent/-/commit/778f6cac2a7f489611d1be83bc2653b3f4611fa6
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2efe52d0..bb3da1472 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ add_definitions(-D'VERSION="${RELEASE_SERVICE_VERSION}"'
-D'VERSION_MICRO=${RELEASE_SERVICE_VERSION_MICRO}')
set (QT_MIN_VERSION "6.7.0")
-set (KF_MIN_VERSION "5.240.0")
+set (KF_MIN_VERSION "6.5.0")
set (LIBKTORRENT_MIN_VERSION "26.07.70")
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
@@ -37,6 +37,7 @@ include(ECMMarkNonGuiExecutable)
include(ECMSetupVersion)
include(KDEClangFormat)
include(KDEGitCommitHooks)
+include(ECMDeprecationSettings)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -204,8 +205,7 @@ add_definitions(
-DQT_NO_KEYWORDS
-DQT_USE_FAST_OPERATOR_PLUS
)
-add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060500)
-add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055900)
+ecm_set_disabled_deprecation_versions(QT 6.11.0 KF 6.28.0)
set (KTORRENT_DBUS_XML_DIR ${CMAKE_SOURCE_DIR}/dbus_xml)
set (KTORRENT_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/ktorrent)
diff --git a/plugins/ipfilter/ipblockingprefpage.cpp b/plugins/ipfilter/ipblockingprefpage.cpp
index c856360cd..6a74437e7 100644
--- a/plugins/ipfilter/ipblockingprefpage.cpp
+++ b/plugins/ipfilter/ipblockingprefpage.cpp
@@ -3,6 +3,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
+#include <KLocalization>
#include <KLocalizedString>
#include "downloadandconvertjob.h"
@@ -23,8 +24,8 @@ IPBlockingPrefPage::IPBlockingPrefPage(IPFilterPlugin *p)
connect(kcfg_useLevel1, &QCheckBox::toggled, this, &IPBlockingPrefPage::checkUseLevel1Toggled);
connect(m_download, &QPushButton::clicked, this, &IPBlockingPrefPage::downloadClicked);
connect(kcfg_autoUpdate, &QCheckBox::toggled, this, &IPBlockingPrefPage::autoUpdateToggled);
- connect(kcfg_autoUpdateInterval, &KPluralHandlingSpinBox::valueChanged, this, &IPBlockingPrefPage::autoUpdateIntervalChanged);
- kcfg_autoUpdateInterval->setSuffix(ki18np(" day", " days"));
+ connect(kcfg_autoUpdateInterval, &QSpinBox::valueChanged, this, &IPBlockingPrefPage::autoUpdateIntervalChanged);
+ KLocalization::setupSpinBoxFormatString(kcfg_autoUpdateInterval, ki18ncp("@item %v is a number of days", "%v day", "%v days"));
m_job = nullptr;
m_verbose = true;
}
diff --git a/plugins/ipfilter/ipblockingprefpage.ui b/plugins/ipfilter/ipblockingprefpage.ui
index 49bd42293..c66a1f33a 100644
--- a/plugins/ipfilter/ipblockingprefpage.ui
+++ b/plugins/ipfilter/ipblockingprefpage.ui
@@ -130,7 +130,7 @@ NOTE: archive files like zip and tar.gz or tar.bz2 are supported.</string>
</widget>
</item>
<item>
- <widget class="KPluralHandlingSpinBox" name="kcfg_autoUpdateInterval">
+ <widget class="QSpinBox" name="kcfg_autoUpdateInterval">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>