Commit 5c847824 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

externaltools: Fix version check for on save trigger

parent ff39ac3a
Pipeline #129063 passed with stage
in 4 minutes and 17 seconds
......@@ -272,7 +272,7 @@ void KateExternalToolsPluginView::slotViewChanged(KTextEditor::View *v)
{
if (m_currentView) {
disconnect(m_currentView->document(), &KTextEditor::Document::documentSavedOrUploaded, this, &KateExternalToolsPluginView::onDocumentSaved);
#if KTEXTEDITOR_VERSION >= QT_VERSION_CHECK(5, 90, 0)
#if KTEXTEDITOR_VERSION >= QT_VERSION_CHECK(5, 91, 0)
disconnect(m_currentView->document(), &KTextEditor::Document::aboutToSave, this, &KateExternalToolsPluginView::onDocumentAboutToSave);
#endif
}
......@@ -284,7 +284,7 @@ void KateExternalToolsPluginView::slotViewChanged(KTextEditor::View *v)
connect(v->document(), &KTextEditor::Document::documentSavedOrUploaded, this, &KateExternalToolsPluginView::onDocumentSaved, Qt::UniqueConnection);
#if KTEXTEDITOR_VERSION >= QT_VERSION_CHECK(5, 90, 0)
#if KTEXTEDITOR_VERSION >= QT_VERSION_CHECK(5, 91, 0)
connect(v->document(), &KTextEditor::Document::aboutToSave, this, &KateExternalToolsPluginView::onDocumentAboutToSave, Qt::UniqueConnection);
#endif
}
......@@ -312,7 +312,7 @@ void KateExternalToolsPluginView::onDocumentAboutToSave(KTextEditor::Document *d
return;
}
#if KTEXTEDITOR_VERSION >= QT_VERSION_CHECK(5, 90, 0)
#if KTEXTEDITOR_VERSION >= QT_VERSION_CHECK(5, 91, 0)
const auto tools = m_plugin->tools();
for (KateExternalTool *tool : tools) {
const bool hasSaveTrigger = tool->trigger == KateExternalTool::Trigger::BeforeSave;
......
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