diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,14 +33,16 @@ include(KDECMakeSettings) -include(GenerateExportHeader) +include(ECMGenerateExportHeader) include(ECMSetupVersion) include(ECMGenerateHeaders) include(ECMMarkNonGuiExecutable) include(ECMPoQmTools) include(ECMAddQch) include(ECMQtDeclareLoggingCategory) +set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") + option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp --- a/autotests/kconfigtest.cpp +++ b/autotests/kconfigtest.cpp @@ -748,7 +748,7 @@ KConfigGroup sc3(&sc, "Hello"); QCOMPARE(sc3.name(), QString("Hello")); KConfigGroup newGroup(sc3); -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) newGroup.changeGroup("FooBar"); // deprecated! QCOMPARE(newGroup.name(), QString("FooBar")); QCOMPARE(sc3.name(), QString("Hello")); // unchanged @@ -764,7 +764,7 @@ KConfigGroup sc32(rootGroup.group("Hello")); QCOMPARE(sc32.name(), QString("Hello")); KConfigGroup newGroup2(sc32); -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) newGroup2.changeGroup("FooBar"); // deprecated! QCOMPARE(newGroup2.name(), QString("FooBar")); QCOMPARE(sc32.name(), QString("Hello")); // unchanged diff --git a/autotests/kdesktopfiletest.h b/autotests/kdesktopfiletest.h --- a/autotests/kdesktopfiletest.h +++ b/autotests/kdesktopfiletest.h @@ -20,14 +20,17 @@ #define KDESKTOPFILETEST_H #include +#include class KDesktopFileTest : public QObject { Q_OBJECT private Q_SLOTS: void initTestCase(); void testRead(); +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) void testReadDirectory(); +#endif void testReadLocalized_data(); void testReadLocalized(); void testUnsuccessfulTryExec(); diff --git a/autotests/kdesktopfiletest.cpp b/autotests/kdesktopfiletest.cpp --- a/autotests/kdesktopfiletest.cpp +++ b/autotests/kdesktopfiletest.cpp @@ -62,7 +62,7 @@ QCOMPARE(df.fileName(), QFileInfo(fileName).canonicalFilePath()); } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) void KDesktopFileTest::testReadDirectory() { QTemporaryFile file("testReadDirectoryXXXXXX.directory"); diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -21,8 +21,14 @@ configure_file(config-kconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kconfig.h ) add_library(KF5ConfigCore ${libkconfigcore_SRCS}) -generate_export_header(KF5ConfigCore BASE_NAME KConfigCore) add_library(KF5::ConfigCore ALIAS KF5ConfigCore) +ecm_generate_export_header(KF5ConfigCore + BASE_NAME KConfigCore + GROUP_BASE_NAME KF + VERSION ${KF5_VERSION} + DEPRECATION_VERSIONS 4.0 5.0 5.24 5.42 + EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} +) target_compile_definitions(KF5ConfigCore PRIVATE diff --git a/src/core/kauthorized.h b/src/core/kauthorized.h --- a/src/core/kauthorized.h +++ b/src/core/kauthorized.h @@ -96,6 +96,7 @@ */ KCONFIGCORE_EXPORT bool authorizeAction(const QString &action); +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 24) /** * Returns whether the user is permitted to perform a certain action. * @@ -121,8 +122,8 @@ * @see authorize() * @deprecated since 5.24, use authorizeAction() instead. */ -#ifndef KDE_NO_DEPRECATED -KCONFIGCORE_DEPRECATED_EXPORT bool authorizeKAction(const QString &action); +KCONFIGCORE_DEPRECATED_VERSION(5, 24, "Use KAuthorized::authorizeAction(const QString&)") +KCONFIGCORE_EXPORT bool authorizeKAction(const QString &action); #endif /** diff --git a/src/core/kauthorized.cpp b/src/core/kauthorized.cpp --- a/src/core/kauthorized.cpp +++ b/src/core/kauthorized.cpp @@ -229,7 +229,7 @@ return authorize(QLatin1String("action/") + action); } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 24) bool KAuthorized::authorizeKAction(const QString &action) { return authorizeAction(action); diff --git a/src/core/kconfig.h b/src/core/kconfig.h --- a/src/core/kconfig.h +++ b/src/core/kconfig.h @@ -324,29 +324,29 @@ /// @} /// @{ global +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(4, 0) /** - * @deprecated - * * Forces all following write-operations to be performed on @c kdeglobals, * independent of the @c Global flag in writeEntry(). * * @param force true to force writing to kdeglobals * @see forceGlobal + * @deprecated Since 4.0 */ -#ifndef KDE_NO_DEPRECATED - KCONFIGCORE_DEPRECATED void setForceGlobal(bool force); + KCONFIGCORE_DEPRECATED_VERSION(4, 0, "Not recommended") + void setForceGlobal(bool force); #endif + +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(4, 0) /** - * @deprecated - * * Returns whether all entries are being written to @c kdeglobals. * * @return @c true if all entries are being written to @c kdeglobals * @see setForceGlobal - * @deprecated + * @deprecated Since 4.0 */ -#ifndef KDE_NO_DEPRECATED - KCONFIGCORE_DEPRECATED bool forceGlobal() const; + KCONFIGCORE_DEPRECATED_VERSION(4, 0, "Not recommended") + bool forceGlobal() const; #endif /// @} diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -847,15 +847,15 @@ return isImmutable() || d->entryMap.getEntryOption(aGroup, nullptr, nullptr, KEntryMap::EntryImmutable); } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(4, 0) void KConfig::setForceGlobal(bool b) { Q_D(KConfig); d->bForceGlobal = b; } #endif -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(4, 0) bool KConfig::forceGlobal() const { Q_D(const KConfig); diff --git a/src/core/kconfiggroup.h b/src/core/kconfiggroup.h --- a/src/core/kconfiggroup.h +++ b/src/core/kconfiggroup.h @@ -141,23 +141,26 @@ */ const KConfig *config() const; +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** * Changes the group of the object * - * @deprecated + * @deprecated Since 5.0 * Create another KConfigGroup from the parent of this group instead. */ -#ifndef KDE_NO_DEPRECATED - KCONFIGCORE_DEPRECATED void changeGroup(const QString &group); + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Create another KConfigGroup from the parent of this group") + void changeGroup(const QString &group); #endif + +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** * Overload for changeGroup(const QString&) * - * @deprecated + * @deprecated Since 5.0. * Create another KConfigGroup from the parent of this group instead. */ -#ifndef KDE_NO_DEPRECATED - KCONFIGCORE_DEPRECATED void changeGroup(const char *group); + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Create another KConfigGroup from the parent of this group") + void changeGroup(const char *group); #endif /** diff --git a/src/core/kconfiggroup.cpp b/src/core/kconfiggroup.cpp --- a/src/core/kconfiggroup.cpp +++ b/src/core/kconfiggroup.cpp @@ -574,16 +574,16 @@ config()->deleteGroup(d->fullName(), flags); } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) void KConfigGroup::changeGroup(const QString &group) { Q_ASSERT_X(isValid(), "KConfigGroup::changeGroup", "accessing an invalid group"); d.detach(); d->mName = group.toUtf8(); } #endif -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) void KConfigGroup::changeGroup(const char *group) { Q_ASSERT_X(isValid(), "KConfigGroup::changeGroup", "accessing an invalid group"); diff --git a/src/core/kcoreconfigskeleton.h b/src/core/kcoreconfigskeleton.h --- a/src/core/kcoreconfigskeleton.h +++ b/src/core/kcoreconfigskeleton.h @@ -662,8 +662,8 @@ qint64 mMin; qint64 mMax; }; -#ifndef KDE_NO_DEPRECATED - typedef KCONFIGCORE_DEPRECATED ItemLongLong ItemInt64; +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) + typedef KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use ItemLongLong") ItemLongLong ItemInt64; #endif /** @@ -782,8 +782,8 @@ quint64 mMin; quint64 mMax; }; -#ifndef KDE_NO_DEPRECATED - typedef KCONFIGCORE_DEPRECATED ItemULongLong ItemUInt64; +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) + typedef KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use ItemULongLong") ItemULongLong ItemUInt64; #endif /** @@ -1054,12 +1054,13 @@ */ void load(); -#ifndef KCONFIGCORE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** * @deprecated since 5.0, call load() instead (to reload from disk) or just read() * if the underlying KConfig object is already up-to-date. */ - KCONFIGCORE_DEPRECATED void readConfig() + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use KCoreConfigSkeleton::load() or KCoreConfigSkeleton::read()") + void readConfig() { load(); } @@ -1224,12 +1225,12 @@ qint64 defaultValue = 0, const QString &key = QString()); +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** - * @deprecated - * Use addItemLongLong(). + * @deprecated Since 5.0, use addItemLongLong(). */ -#ifndef KDE_NO_DEPRECATED - KCONFIGCORE_DEPRECATED ItemLongLong *addItemInt64(const QString &name, qint64 &reference, + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use KCoreConfigSkeleton::addItemLongLong(...)") + ItemLongLong *addItemInt64(const QString &name, qint64 &reference, qint64 defaultValue = 0, const QString &key = QString()); #endif @@ -1249,12 +1250,12 @@ quint64 defaultValue = 0, const QString &key = QString()); +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** - * @deprecated - * Use addItemULongLong(). + * @deprecated Since 5.0, use addItemULongLong(). */ -#ifndef KDE_NO_DEPRECATED - KCONFIGCORE_DEPRECATED ItemULongLong *addItemUInt64(const QString &name, quint64 &reference, + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use KCoreConfigSkeleton::addItemULongLong(...)") + ItemULongLong *addItemUInt64(const QString &name, quint64 &reference, quint64 defaultValue = 0, const QString &key = QString()); #endif @@ -1438,11 +1439,12 @@ */ bool save(); -#ifndef KCONFIGCORE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** * @deprecated since 5.0, call save() instead. */ - KCONFIGCORE_DEPRECATED void writeConfig() + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use KCoreConfigSkeleton::save()") + void writeConfig() { save(); } @@ -1486,17 +1488,23 @@ */ virtual bool usrSave(); +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) /** * @deprecated since 5.0, override usrRead instead. This method is still called from usrRead * for compatibility. */ - KCONFIGCORE_DEPRECATED virtual void usrReadConfig(); + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Override KCoreConfigSkeleton::usrRead()") + virtual void usrReadConfig(); +#endif +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) /** * @deprecated since 5.0, override usrSave instead. This method is still called from usrSave * for compatibility. */ - KCONFIGCORE_DEPRECATED virtual bool usrWriteConfig(); + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Override KCoreConfigSkeleton::usrSave()") + virtual bool usrWriteConfig(); +#endif private: KCoreConfigSkeletonPrivate *const d; diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -1120,38 +1120,37 @@ { } -#ifdef Q_CC_GNU -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif void KCoreConfigSkeleton::usrRead() { +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) usrReadConfig(); +#endif } #ifdef Q_CC_GNU #pragma GCC diagnostic pop #endif +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) void KCoreConfigSkeleton::usrReadConfig() { } - -#ifdef Q_CC_GNU -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif + bool KCoreConfigSkeleton::usrSave() { +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) return usrWriteConfig(); -} -#ifdef Q_CC_GNU -#pragma GCC diagnostic pop +#else + return true; #endif +} +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) bool KCoreConfigSkeleton::usrWriteConfig() { return true; } +#endif void KCoreConfigSkeleton::addItem(KConfigSkeletonItem *item, const QString &name) { @@ -1273,7 +1272,7 @@ return item; } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) KCoreConfigSkeleton::ItemLongLong *KCoreConfigSkeleton::addItemInt64( const QString &name, qint64 &reference, @@ -1294,7 +1293,7 @@ return item; } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemUInt64( const QString &name, quint64 &reference, diff --git a/src/core/kdesktopfile.h b/src/core/kdesktopfile.h --- a/src/core/kdesktopfile.h +++ b/src/core/kdesktopfile.h @@ -214,15 +214,16 @@ */ QString readDocPath() const; -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 42) /** * Returns the entry of the "SortOrder=" entry. * @return the value of the "SortOrder=" entry. * @deprecated since 5.42 * SortOrder was used to specify the order of menu items, but * the Desktop Menu Specification defines another mechanism for it. */ - KCONFIGCORE_DEPRECATED QStringList sortOrder() const; + KCONFIGCORE_DEPRECATED_VERSION(5, 42, "Not recommended, Desktop Menu Specification defines another mechanism") + QStringList sortOrder() const; #endif /** diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp --- a/src/core/kdesktopfile.cpp +++ b/src/core/kdesktopfile.cpp @@ -331,7 +331,7 @@ //QString //KDesktopFile::resource() const { return backEnd->resource(); } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 42) QStringList KDesktopFile::sortOrder() const { diff --git a/src/core/kemailsettings.h b/src/core/kemailsettings.h --- a/src/core/kemailsettings.h +++ b/src/core/kemailsettings.h @@ -69,7 +69,7 @@ OutServer, OutServerLogin, OutServerPass, -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** * @deprecated since Frameworks 5.0 */ @@ -82,11 +82,15 @@ * @deprecated since Frameworks 5.0 */ OutServerTLS, +#else + OutServerType_DO_NOT_USE, + OutServerCommand_DO_NOT_USE, + OutServerTLS_DO_NOT_USE, #endif InServer, InServerLogin, InServerPass, -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** * @deprecated since Frameworks 5.0 */ @@ -131,13 +135,15 @@ **/ QStringList profiles() const; -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) /** - * @deprecated since Frameworks 5.0 * Returns the name of the current profile. * @returns what profile we're currently using + * @deprecated Since 5.0 **/ - KCONFIGCORE_DEPRECATED QString currentProfileName() const; + KCONFIGCORE_DEPRECATED_VERSION(5, 0, "API planned to be changed") + QString currentProfileName() const; + // see https://git.reviewboard.kde.org/r/111910/ #endif /** diff --git a/src/core/kemailsettings.cpp b/src/core/kemailsettings.cpp --- a/src/core/kemailsettings.cpp +++ b/src/core/kemailsettings.cpp @@ -78,6 +78,7 @@ case OutServerPass: { return cg.readEntry("OutgoingPassword"); } +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) case OutServerType: { return cg.readEntry("OutgoingServerType"); } @@ -87,6 +88,12 @@ case OutServerTLS: { return cg.readEntry("OutgoingServerTLS", QVariant(false)).toString(); } +#else + case OutServerType_DO_NOT_USE: + case OutServerCommand_DO_NOT_USE: + case OutServerTLS_DO_NOT_USE: + break; +#endif case InServer: { return cg.readEntry("IncomingServer"); } @@ -96,6 +103,7 @@ case InServerPass: { return cg.readEntry("IncomingPassword"); } +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) case InServerType: { return cg.readEntry("IncomingServerType"); } @@ -105,6 +113,7 @@ case InServerTLS: { return cg.readEntry("IncomingServerTLS", QVariant(false)).toString(); } +#endif }; return QString(); } @@ -148,6 +157,7 @@ cg.writeEntry("OutgoingPassword", v); break; } +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) case OutServerType: { cg.writeEntry("OutgoingServerType", v); break; @@ -160,6 +170,12 @@ cg.writeEntry("OutgoingServerTLS", (v == QLatin1String("true"))); break; } +#else + case OutServerType_DO_NOT_USE: + case OutServerCommand_DO_NOT_USE: + case OutServerTLS_DO_NOT_USE: + break; +#endif case InServer: { cg.writeEntry("IncomingServer", v); break; @@ -172,6 +188,7 @@ cg.writeEntry("IncomingPassword", v); break; } +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) case InServerType: { cg.writeEntry("IncomingServerType", v); break; @@ -184,6 +201,7 @@ cg.writeEntry("IncomingServerTLS", (v == QLatin1String("true"))); break; } +#endif }; cg.sync(); } @@ -207,7 +225,7 @@ } } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) QString KEMailSettings::currentProfileName() const { return p->m_sCurrentProfile; diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -9,8 +9,14 @@ ecm_create_qm_loader(libkconfiggui_SRCS kconfig5_qt) add_library(KF5ConfigGui ${libkconfiggui_SRCS}) -generate_export_header(KF5ConfigGui BASE_NAME KConfigGui) add_library(KF5::ConfigGui ALIAS KF5ConfigGui) +ecm_generate_export_header(KF5ConfigGui + BASE_NAME KConfigGui + GROUP_BASE_NAME KF + VERSION ${KF5_VERSION} + DEPRECATION_VERSIONS 5.11 5.39 + EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} +) target_include_directories(KF5ConfigGui INTERFACE "$") diff --git a/src/gui/kconfiggui.h b/src/gui/kconfiggui.h --- a/src/gui/kconfiggui.h +++ b/src/gui/kconfiggui.h @@ -60,14 +60,15 @@ */ KCONFIGGUI_EXPORT bool hasSessionConfig(); +#if KCONFIGGUI_ENABLE_DEPRECATED_SINCE(5, 11) /** * Returns the name of the application session * * @return the application session name * @deprecated since 5.11, use sessionConfig()->name() */ -#ifndef KDE_NO_DEPRECATED -KCONFIGGUI_DEPRECATED_EXPORT QString sessionConfigName(); +KCONFIGGUI_DEPRECATED_VERSION(5, 11, "Use KConfigGui::sessionConfig()->name()") +KCONFIGGUI_EXPORT QString sessionConfigName(); #endif } diff --git a/src/gui/kconfiggui.cpp b/src/gui/kconfiggui.cpp --- a/src/gui/kconfiggui.cpp +++ b/src/gui/kconfiggui.cpp @@ -67,7 +67,7 @@ return s_sessionConfig != nullptr; } -#ifndef KDE_NO_DEPRECATED +#if KCONFIGGUI_BUILD_DEPRECATED_SINCE(5, 11) QString KConfigGui::sessionConfigName() { return sessionConfig()->name(); diff --git a/src/gui/kconfigloader.h b/src/gui/kconfigloader.h --- a/src/gui/kconfigloader.h +++ b/src/gui/kconfigloader.h @@ -166,10 +166,14 @@ QStringList groupList() const; protected: +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) /** * Hack used to force writing when no default exists in config file. */ bool usrWriteConfig() override; +#else + bool usrSave() override; +#endif private: ConfigLoaderPrivate *const d; diff --git a/src/gui/kconfigloader.cpp b/src/gui/kconfigloader.cpp --- a/src/gui/kconfigloader.cpp +++ b/src/gui/kconfigloader.cpp @@ -425,7 +425,11 @@ return d->groups; } +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0) bool KConfigLoader::usrWriteConfig() +#else +bool KConfigLoader::usrSave() +#endif { if (d->saveDefaults) { const auto listItems = items(); diff --git a/src/gui/kstandardshortcut.h b/src/gui/kstandardshortcut.h --- a/src/gui/kstandardshortcut.h +++ b/src/gui/kstandardshortcut.h @@ -134,8 +134,12 @@ Spelling, ///< Pop up the spell checker. ShowToolbar, ///< Show/Hide the toolbar. ShowStatusbar, ///< Show/Hide the statusbar. +#if KCONFIGGUI_ENABLE_DEPRECATED_SINCE(5, 39) SaveOptions, ///< @deprecated since 5.39 - KeyBindings, ///< Display the configure key bindings dialog. +#else + SaveOptions_DO_NOT_USE, +#endif + KeyBindings = ShowStatusbar, ///< Display the configure key bindings dialog. Preferences, ///< Display the preferences/options dialog. ConfigureToolbars, ///< Display the toolbar configuration dialog. ConfigureNotifications, ///< Display the notifications configuration dialog. diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp --- a/src/gui/kstandardshortcut.cpp +++ b/src/gui/kstandardshortcut.cpp @@ -154,7 +154,12 @@ { Spelling, "Spelling", QT_TRANSLATE_NOOP3("KStandardShortcut", "Spelling", "@action"), 0, 0, QList(), false }, { ShowToolbar, "ShowToolbar", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show Toolbar", "@action"), 0, 0, QList(), false }, { ShowStatusbar, "ShowStatusbar", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show Statusbar", "@action"), 0, 0, QList(), false }, +#if KCONFIGGUI_BUILD_DEPRECATED_SINCE(5, 39) { SaveOptions, "SaveOptions", QT_TRANSLATE_NOOP3("KStandardShortcut", "Save Options", "@action"), 0, 0, QList(), false }, +#else + // dummy entry + { SaveOptions_DO_NOT_USE, nullptr, {nullptr, nullptr}, 0, 0, QList(), false }, +#endif { KeyBindings, "KeyBindings", QT_TRANSLATE_NOOP3("KStandardShortcut", "Key Bindings", "@action"), 0, 0, QList(), false }, { Preferences, "Preferences", QT_TRANSLATE_NOOP3("KStandardShortcut", "Configure Application", "@action"), CTRLSHIFT(Comma), 0, QList(), false }, { ConfigureToolbars, "ConfigureToolbars", QT_TRANSLATE_NOOP3("KStandardShortcut", "Configure Toolbars", "@action"), 0, 0, QList(), false },