[libraries/ktextaddons] textaddonswidgets: Use config-textaddonswidgets.h.in not target_compile_definitions

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 67acd706c929c0b174359dbef5596c989512d05c by Laurent Montel.
Committed on 27/07/2026 at 06:07.
Pushed by mlaurent into branch 'master'.

Use config-textaddonswidgets.h.in not target_compile_definitions

M  +2    -6    textaddonswidgets/CMakeLists.txt
M  +2    -2    textaddonswidgets/needupdateversion/needupdateversionutils.cpp

https://invent.kde.org/libraries/ktextaddons/-/commit/67acd706c929c0b174359dbef5596c989512d05c

diff --git a/textaddonswidgets/CMakeLists.txt b/textaddonswidgets/CMakeLists.txt
index 9a3ff7bb7..cf95c1273 100644
--- a/textaddonswidgets/CMakeLists.txt
+++ b/textaddonswidgets/CMakeLists.txt
@@ -11,6 +11,8 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX TEXTADDONSWIDGETS
     SOVERSION 1
 )
 
+configure_file(config-textaddonswidgets.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-textaddonswidgets.h)
+
 add_library(KF6TextAddonsWidgets)
 add_library(KF6::TextAddonsWidgets ALIAS KF6TextAddonsWidgets)
 
@@ -26,12 +28,6 @@ if(ENABLE_PCH)
     )
 endif()
 
-if(ENABLE_WARN_OUTDATED)
-    target_compile_definitions(KF6TextAddonsWidgets PRIVATE ENABLE_WARN_OUTDATED=1)
-else()
-    target_compile_definitions(KF6TextAddonsWidgets PRIVATE ENABLE_WARN_OUTDATED=0)
-endif()
-
 target_sources(
     KF6TextAddonsWidgets
     PRIVATE
diff --git a/textaddonswidgets/needupdateversion/needupdateversionutils.cpp b/textaddonswidgets/needupdateversion/needupdateversionutils.cpp
index 4d6186ca4..92bb76f39 100644
--- a/textaddonswidgets/needupdateversion/needupdateversionutils.cpp
+++ b/textaddonswidgets/needupdateversion/needupdateversionutils.cpp
@@ -6,7 +6,7 @@
 */
 
 #include "needupdateversionutils.h"
-
+#include "config-textaddonswidgets.h"
 #include <KConfigGroup>
 #include <KSharedConfig>
 
@@ -62,7 +62,7 @@ void TextAddonsWidgets::NeedUpdateVersionUtils::disableCheckVersion()
 
 bool TextAddonsWidgets::NeedUpdateVersionUtils::checkVersion()
 {
-#if ENABLE_WARN_OUTDATED == 1
+#if ENABLE_WARN_OUTDATED
     const KSharedConfig::Ptr config = KSharedConfig::openConfig();
     const KConfigGroup group(config, QStringLiteral("Check Version"));
     return group.readEntry("checkerVersionEnabled", true);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.