Commit 48b40e65 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make compile without deprecated methods

parent 8cdf0e46
Pipeline #171334 passed with stage
in 2 minutes and 19 seconds
......@@ -116,7 +116,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include_directories(${knotes_SOURCE_DIR} ${knotes_BINARY_DIR})
ecm_set_disabled_deprecation_versions(QT 5.15.2
KF 5.93.0
KF 5.94.0
KCOREADDONS 5.88.0 #KPluginFactory::registerPlugin
)
......
......@@ -155,7 +155,7 @@ add_library(kcm_knote_static STATIC ${kcm_knotes_PART_SRCS} )
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kcm_knote_static PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kcm_knote_static knotesprivate KF5::AkonadiCore KF5::KCMUtils KF5::NewStuff notesharedprivate KF5::AkonadiNotes KF5::PimCommon KF5::I18n KF5::AkonadiWidgets)
target_link_libraries(kcm_knote_static knotesprivate KF5::NewStuffWidgets KF5::AkonadiCore KF5::KCMUtils KF5::NewStuff notesharedprivate KF5::AkonadiNotes KF5::PimCommon KF5::I18n KF5::AkonadiWidgets)
# Create the individual KCMs
kcoreaddons_add_plugin(kcm_knote_action SOURCES kcm_knote_action.cpp INSTALL_NAMESPACE "pim/kcms/knotes")
......
......@@ -19,7 +19,8 @@
#include "configdialog/knoteeditorconfigwidget.h"
#include <KAuthorized>
#include <KLocalizedString>
#include <KNewStuff3/KNS3/QtQuickDialogWrapper>
#include <KNS3/QtQuickDialogWrapper>
#include <knewstuffcore_version.h>
#include <QCheckBox>
#include <QLabel>
......@@ -167,9 +168,20 @@ KNotePrintConfig::KNotePrintConfig(QWidget *parent, const QVariantList &args)
void KNotePrintConfig::slotDownloadNewThemes()
{
#if KNEWSTUFFCORE_VERSION < QT_VERSION_CHECK(5, 94, 0)
if (!KNS3::QtQuickDialogWrapper(QStringLiteral("kwinswitcher.knsrc")).exec().isEmpty()) {
mSelectTheme->loadThemes();
}
#else
auto newStuffDialog = new KNS3::QtQuickDialogWrapper(QStringLiteral("kwinswitcher.knsrc"));
connect(newStuffDialog, &KNS3::QtQuickDialogWrapper::closed, this, [newStuffDialog, this]() {
if (!newStuffDialog->changedEntries().isEmpty()) {
mSelectTheme->loadThemes();
}
newStuffDialog->deleteLater();
});
newStuffDialog->open();
#endif
}
void KNotePrintConfig::slotThemeChanged()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment