diff options
author | Friedrich W. H. Kossebau <kossebau@kde.org> | 2019-10-08 15:22:49 +0200 |
---|---|---|
committer | Friedrich W. H. Kossebau <kossebau@kde.org> | 2019-10-18 21:23:32 +0200 |
commit | fb37084b3e7c396cd10bf4d3253fee730320988a (patch) | |
tree | 3c58974a533b9ec963d315481d38671ba8f10613 /src/gui/kstandardshortcut.cpp | |
parent | 3f68be12f87e83b67f9270eb139d894bf65ebef1 (diff) | |
download | kconfig-fb37084b3e7c396cd10bf4d3253fee730320988a.tar.gz kconfig-fb37084b3e7c396cd10bf4d3253fee730320988a.tar.bz2 |
Use ECMGenerateExportHeader to manage deprecated API better
Summary:
Allows
* projects linking to KConfigCore/Gui to hide deprecated API up to a
given version or silence deprecation warnings after a given version,
using
* -DKCONFIGCORE_DISABLE_DEPRECATED_BEFORE_AND_AT
* -DKCONFIGCORE_NO_DEPRECATED
* -DKCONFIGCORE_DEPRECATED_WARNINGS_SINCE
* -DKCONFIGCORE_NO_DEPRECATED_WARNINGS
* -DKCONFIGGUI_DISABLE_DEPRECATED_BEFORE_AND_AT
* -DKCONFIGGUI_NO_DEPRECATED
* -DKCONFIGGUI_DEPRECATED_WARNINGS_SINCE
* -DKCONFIGGUI_NO_DEPRECATED_WARNINGS
or
* -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
* -DKF_NO_DEPRECATED
* -DKF_DEPRECATED_WARNINGS_SINCE
* -DKF_NO_DEPRECATED_WARNINGS
* to build KConfigCore/Gui optionally with deprecated API excluded from
the build, using "EXCLUDE_DEPRECATED_BEFORE_AND_AT" cmake argument.
Test Plan:
Builds with EXCLUDE_DEPRECATED_BEFORE_AND_AT set to 0, 4.0.0, 5.0.0,
5.11.0, 5.24.0, 5.39.0, 5.42.0, CURRENT.
Reviewers: #frameworks, mlaurent
Reviewed By: mlaurent
Subscribers: mlaurent, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D24496
Diffstat (limited to 'src/gui/kstandardshortcut.cpp')
-rw-r--r-- | src/gui/kstandardshortcut.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp index a8215138..4506be7d 100644 --- a/src/gui/kstandardshortcut.cpp +++ b/src/gui/kstandardshortcut.cpp @@ -154,7 +154,12 @@ static KStandardShortcutInfo g_infoStandardShortcut[] = { { Spelling, "Spelling", QT_TRANSLATE_NOOP3("KStandardShortcut", "Spelling", "@action"), 0, 0, QList<QKeySequence>(), false }, { ShowToolbar, "ShowToolbar", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show Toolbar", "@action"), 0, 0, QList<QKeySequence>(), false }, { ShowStatusbar, "ShowStatusbar", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show Statusbar", "@action"), 0, 0, QList<QKeySequence>(), false }, +#if KCONFIGGUI_BUILD_DEPRECATED_SINCE(5, 39) { SaveOptions, "SaveOptions", QT_TRANSLATE_NOOP3("KStandardShortcut", "Save Options", "@action"), 0, 0, QList<QKeySequence>(), false }, +#else + // dummy entry + { SaveOptions_DEPRECATED_DO_NOT_USE, nullptr, {nullptr, nullptr}, 0, 0, QList<QKeySequence>(), false }, +#endif { KeyBindings, "KeyBindings", QT_TRANSLATE_NOOP3("KStandardShortcut", "Key Bindings", "@action"), 0, 0, QList<QKeySequence>(), false }, { Preferences, "Preferences", QT_TRANSLATE_NOOP3("KStandardShortcut", "Configure Application", "@action"), CTRLSHIFT(Comma), 0, QList<QKeySequence>(), false }, { ConfigureToolbars, "ConfigureToolbars", QT_TRANSLATE_NOOP3("KStandardShortcut", "Configure Toolbars", "@action"), 0, 0, QList<QKeySequence>(), false }, |