diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/gui/kconfiggui.cpp | 2 | ||||
| -rw-r--r-- | src/gui/kconfiggui.h | 5 | ||||
| -rw-r--r-- | src/gui/kconfigloader.cpp | 4 | ||||
| -rw-r--r-- | src/gui/kconfigloader.h | 4 | ||||
| -rw-r--r-- | src/gui/kstandardshortcut.cpp | 5 | ||||
| -rw-r--r-- | src/gui/kstandardshortcut.h | 4 | 
7 files changed, 29 insertions, 4 deletions
| diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 6ae7729c..58afe38a 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -9,8 +9,15 @@ set(libkconfiggui_SRCS  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 <- enable once all of KF modules use ecm_generate_export_header +    VERSION ${KF5_VERSION} +    DEPRECATED_BASE_VERSION 0 +    DEPRECATION_VERSIONS 5.11 5.39 +    EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} +)  target_include_directories(KF5ConfigGui INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KConfigGui>") diff --git a/src/gui/kconfiggui.cpp b/src/gui/kconfiggui.cpp index 6948b968..f65bba59 100644 --- a/src/gui/kconfiggui.cpp +++ b/src/gui/kconfiggui.cpp @@ -67,7 +67,7 @@ bool KConfigGui::hasSessionConfig()      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/kconfiggui.h b/src/gui/kconfiggui.h index 12644658..b9d9cadb 100644 --- a/src/gui/kconfiggui.h +++ b/src/gui/kconfiggui.h @@ -60,14 +60,15 @@ KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key);   */  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/kconfigloader.cpp b/src/gui/kconfigloader.cpp index 63d3ff6e..760b1500 100644 --- a/src/gui/kconfigloader.cpp +++ b/src/gui/kconfigloader.cpp @@ -425,7 +425,11 @@ QStringList KConfigLoader::groupList() const      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/kconfigloader.h b/src/gui/kconfigloader.h index 3eb3879d..e46e4c6e 100644 --- a/src/gui/kconfigloader.h +++ b/src/gui/kconfigloader.h @@ -166,10 +166,14 @@ public:      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/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 }, diff --git a/src/gui/kstandardshortcut.h b/src/gui/kstandardshortcut.h index 15cdc1b9..6f673272 100644 --- a/src/gui/kstandardshortcut.h +++ b/src/gui/kstandardshortcut.h @@ -134,7 +134,11 @@ enum StandardShortcut {      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 +#else +    SaveOptions_DEPRECATED_DO_NOT_USE, +#endif      KeyBindings, ///< Display the configure key bindings dialog.      Preferences, ///< Display the preferences/options dialog.      ConfigureToolbars, ///< Display the toolbar configuration dialog. | 
