Commit 778411eb authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

remove slotUpdateOpenWith

we have some more generic slot for that
parent 1bf0dad3
Pipeline #221683 canceled with stage
in 15 minutes and 28 seconds
......@@ -429,7 +429,6 @@ void KateMainWindow::setupActions()
}
connect(m_viewManager, &KateViewManager::viewChanged, this, &KateMainWindow::slotWindowActivated);
connect(m_viewManager, &KateViewManager::viewChanged, this, &KateMainWindow::slotUpdateOpenWith);
connect(m_viewManager, &KateViewManager::viewChanged, this, &KateMainWindow::slotUpdateActionsNeedingUrl);
connect(m_viewManager, &KateViewManager::viewChanged, this, &KateMainWindow::slotUpdateBottomViewBar);
......@@ -772,15 +771,6 @@ void KateMainWindow::slotWindowActivated()
centralWidget()->setFocusProxy(m_viewManager->activeView());
}
void KateMainWindow::slotUpdateOpenWith()
{
if (m_viewManager->activeView()) {
documentOpenWith->setEnabled(!m_viewManager->activeView()->document()->url().isEmpty());
} else {
documentOpenWith->setEnabled(false);
}
}
void KateMainWindow::slotUpdateActionsNeedingUrl()
{
auto &&view = viewManager()->activeView();
......@@ -791,6 +781,7 @@ void KateMainWindow::slotUpdateActionsNeedingUrl()
action("file_rename")->setEnabled(hasUrl);
action("file_delete")->setEnabled(hasUrl);
action("file_properties")->setEnabled(hasUrl);
documentOpenWith->setEnabled(hasUrl);
}
void KateMainWindow::dragEnterEvent(QDragEnterEvent *event)
......@@ -1044,7 +1035,6 @@ void KateMainWindow::slotDocumentCreated(KTextEditor::Document *doc)
connect(doc, &KTextEditor::Document::readWriteChanged, this, QOverload<KTextEditor::Document *>::of(&KateMainWindow::updateCaption));
connect(doc, &KTextEditor::Document::documentNameChanged, this, QOverload<KTextEditor::Document *>::of(&KateMainWindow::updateCaption));
connect(doc, &KTextEditor::Document::documentUrlChanged, this, QOverload<KTextEditor::Document *>::of(&KateMainWindow::updateCaption));
connect(doc, &KTextEditor::Document::documentUrlChanged, this, &KateMainWindow::slotUpdateOpenWith);
connect(doc, &KTextEditor::Document::documentUrlChanged, this, &KateMainWindow::slotUpdateActionsNeedingUrl);
updateCaption(doc);
......
......@@ -187,7 +187,6 @@ private Q_SLOTS:
void slotEditToolbars();
void slotNewToolbarConfig();
void slotUpdateOpenWith();
void slotUpdateActionsNeedingUrl();
void slotOpenDocument(const QUrl &);
......
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