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
a4ddde63
Commit
a4ddde63
authored
Sep 06, 2022
by
Waqar Ahmed
Browse files
Hide history action for docs with no url
parent
69bb92f4
Pipeline
#227858
passed with stage
in 6 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
addons/filetree/katefiletree.cpp
View file @
a4ddde63
...
...
@@ -375,13 +375,15 @@ void KateFileTree::contextMenuEvent(QContextMenuEvent *event)
menu
.
addAction
(
m_filelistDeleteDocument
);
menu
.
addAction
(
m_filelistReloadDocument
);
auto
a
=
menu
.
addAction
(
i18n
(
"Show File Git History"
));
connect
(
a
,
&
QAction
::
triggered
,
this
,
[
doc
]
{
auto
url
=
doc
->
url
();
if
(
url
.
isValid
()
&&
url
.
isLocalFile
())
{
FileHistory
::
showFileHistory
(
url
.
toLocalFile
());
}
});
if
(
doc
->
url
().
isValid
()
&&
doc
->
url
().
isLocalFile
())
{
auto
a
=
menu
.
addAction
(
i18n
(
"Show File Git History"
));
connect
(
a
,
&
QAction
::
triggered
,
this
,
[
doc
]
{
auto
url
=
doc
->
url
();
if
(
url
.
isValid
()
&&
url
.
isLocalFile
())
{
FileHistory
::
showFileHistory
(
url
.
toLocalFile
());
}
});
}
menu
.
addSeparator
();
menu
.
addAction
(
m_filelistOpenContainingFolder
);
...
...
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