use new api

wilder
Laurent Montel 7 years ago
parent c0ccec7c93
commit a793c3d96f
  1. 2
      CMakeLists.txt
  2. 3
      src/editor/widgets/snippetwidget.cpp

@ -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")

@ -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());

Loading…
Cancel
Save