From 9f2ec226ec0952e45d4cc5de2643f3865f7334c0 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sun, 1 Nov 2020 13:08:04 +0100 Subject: [PATCH] Use new KNS install location --- src/CMakeLists.txt | 6 +++++- src/alkonlinequotesprofile.cpp | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a19d34..f5f2768 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -163,7 +163,11 @@ if(BUILD_QT4) set(APPDATA_INSTALL_DIR ${SHARE_INSTALL_DIR}/kde4/apps) set(FQ_LOCAL_INSTALL_PATH ${CMAKE_BINARY_DIR}/share/apps/alkimia${ALKIMIA_PATH_SUFFIX}/misc) else() - set(KNSRC_INSTALL_DIR ${CONFIG_INSTALL_DIR}) + if(KF5NewStuff_VERSION VERSION_GREATER "5.56.0") + set(KNSRC_INSTALL_DIR ${KDE_INSTALL_KNSRCDIR}) + else() + set(KNSRC_INSTALL_DIR ${CONFIG_INSTALL_DIR}) + endif() set(APPDATA_INSTALL_DIR ${SHARE_INSTALL_DIR}) set(FQ_LOCAL_INSTALL_PATH ${CMAKE_BINARY_DIR}/share/alkimia${ALKIMIA_PATH_SUFFIX}/misc) endif() diff --git a/src/alkonlinequotesprofile.cpp b/src/alkonlinequotesprofile.cpp index cc4b70a..d778383 100644 --- a/src/alkonlinequotesprofile.cpp +++ b/src/alkonlinequotesprofile.cpp @@ -323,6 +323,9 @@ QString AlkOnlineQuotesProfile::name() const QString AlkOnlineQuotesProfile::hotNewStuffConfigFile() const { QString configFile = KStandardDirs::locate("config", d->m_GHNSFile); + if (configFile.isEmpty()) { + configFile = KStandardDirs::locate("data", "knsrcfiles/" + d->m_GHNSFile); + } if (configFile.isEmpty()) { configFile = QString("%1/%2").arg(KNSRC_DIR, d->m_GHNSFile); } -- 2.30.0