Commit 53dd31b4 authored by loh tar's avatar loh tar Committed by Kåre Särs

SearchView: Fix missing signal/slot connection to project plugin

Summary: notice project change after session switch

Without this patch was the project offer in the m_ui.searchPlaceCombo
after a session switch gone

Reviewers: #kate, sars

Reviewed By: #kate, sars

Subscribers: sars, kwrite-devel, #kate

Tags: #kate

Differential Revision:

parent 2667d1b4
......@@ -400,10 +400,9 @@ m_mainWindow (mainWin)
connect(m_mainWindow, &KTextEditor::MainWindow::viewChanged, this, &KatePluginSearchView::docViewChanged);
// update once project plugin state manually
m_projectPluginView = m_mainWindow->pluginView (QStringLiteral("kateprojectplugin"));
slotProjectFileNameChanged ();
// Connect signals from project plugin to our slots
m_projectPluginView = m_mainWindow->pluginView(QStringLiteral("kateprojectplugin"));
slotPluginViewCreated(QStringLiteral("kateprojectplugin"), m_projectPluginView);
connect(&m_replacer, &ReplaceMatches::replaceDone, this, &KatePluginSearchView::replaceDone);
......@@ -2100,26 +2099,26 @@ void KatePluginSearchView::replaceContextMenu(const QPoint& pos)
void KatePluginSearchView::slotPluginViewCreated (const QString &name, QObject *pluginView)
void KatePluginSearchView::slotPluginViewCreated(const QString &name, QObject *pluginView)
// add view
if (name == QStringLiteral("kateprojectplugin")) {
if (pluginView && name == QStringLiteral("kateprojectplugin")) {
m_projectPluginView = pluginView;
slotProjectFileNameChanged ();
connect (pluginView, SIGNAL(projectFileNameChanged()), this, SLOT(slotProjectFileNameChanged()));
void KatePluginSearchView::slotPluginViewDeleted (const QString &name, QObject *)
void KatePluginSearchView::slotPluginViewDeleted(const QString &name, QObject *)
// remove view
if (name == QStringLiteral("kateprojectplugin")) {
m_projectPluginView = nullptr;
slotProjectFileNameChanged ();
void KatePluginSearchView::slotProjectFileNameChanged ()
void KatePluginSearchView::slotProjectFileNameChanged()
// query new project file name
QString projectFileName;
Markdown is supported
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