From a793c3d96ff090bf3e1b82e5adf883dca447b439 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 16 Sep 2019 09:03:51 +0200 Subject: [PATCH] use new api --- CMakeLists.txt | 2 +- src/editor/widgets/snippetwidget.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2372161d1..33879f240 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ option(KDEPIM_RUN_AKONADI_TEST "Enable autotest based on Akonadi." TRUE) find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network Test Widgets WebEngine WebEngineWidgets) set(LIBGRAVATAR_VERSION_LIB "5.12.40") -set(MAILCOMMON_LIB_VERSION_LIB "5.12.41") +set(MAILCOMMON_LIB_VERSION_LIB "5.12.42") set(KDEPIM_APPS_LIB_VERSION_LIB "5.12.40") set(MESSAGELIB_LIB_VERSION_LIB "5.12.45") set(LIBKLEO_LIB_VERSION_LIB "5.12.40") diff --git a/src/editor/widgets/snippetwidget.cpp b/src/editor/widgets/snippetwidget.cpp index f347b1ffd..88fb36f8f 100644 --- a/src/editor/widgets/snippetwidget.cpp +++ b/src/editor/widgets/snippetwidget.cpp @@ -33,7 +33,8 @@ SnippetWidget::SnippetWidget(KMComposerEditorNg *editor, KActionCollection *acti setRootIsDecorated(true); setAlternatingRowColors(true); mSnippetsManager = new MailCommon::SnippetsManager(actionCollection, this, this); - mSnippetsManager->setEditor(editor, "insertPlainText", SIGNAL(insertSnippet())); + mSnippetsManager->setEditor(editor); + connect(editor, &KMComposerEditorNg::insertSnippet, mSnippetsManager, &MailCommon::SnippetsManager::insertSnippet); setModel(mSnippetsManager->model()); setSelectionModel(mSnippetsManager->selectionModel());