Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
778411eb
Commit
778411eb
authored
Aug 23, 2022
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/lib/katemainwindow.cpp
View file @
778411eb
...
...
@@ -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
);
...
...
apps/lib/katemainwindow.h
View file @
778411eb
...
...
@@ -187,7 +187,6 @@ private Q_SLOTS:
void
slotEditToolbars
();
void
slotNewToolbarConfig
();
void
slotUpdateOpenWith
();
void
slotUpdateActionsNeedingUrl
();
void
slotOpenDocument
(
const
QUrl
&
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment