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
fd884c5f
Commit
fd884c5f
authored
Jul 22, 2022
by
Ahmad Samir
Browse files
Konsole plugin: use QUrl::toDisplayString() in error message
Since it's not a local file, no need to show the path() only.
parent
8e45d772
Pipeline
#208159
passed with stage
in 5 minutes and 34 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
addons/konsole/kateconsole.cpp
View file @
fd884c5f
...
...
@@ -392,9 +392,9 @@ void KateConsole::slotRun()
}
KTextEditor
::
Document
*
document
=
view
->
document
();
QUrl
u
=
document
->
url
();
if
(
!
u
.
isLocalFile
())
{
QPointer
<
KTextEditor
::
Message
>
message
=
new
KTextEditor
::
Message
(
i18n
(
"Not a local file: '%1'"
,
u
.
path
()),
KTextEditor
::
Message
::
Error
);
const
QUrl
u
rl
=
document
->
url
();
if
(
!
u
rl
.
isLocalFile
())
{
QPointer
<
KTextEditor
::
Message
>
message
=
new
KTextEditor
::
Message
(
i18n
(
"Not a local file: '%1'"
,
u
rl
.
toDisplayString
()),
KTextEditor
::
Message
::
Error
);
// auto hide is enabled and set to a sane default value of several seconds.
message
->
setAutoHide
(
2000
);
message
->
setAutoHideMode
(
KTextEditor
::
Message
::
Immediate
);
...
...
@@ -420,7 +420,7 @@ void KateConsole::slotRun()
}
// then filename
QFileInfo
fileInfo
(
u
.
path
());
QFileInfo
fileInfo
(
u
rl
.
path
());
const
bool
removeExt
=
cg
.
readEntry
(
"RemoveExtension"
,
true
);
// append filename without extension (i.e. keep only the basename)
const
QString
path
=
fileInfo
.
absolutePath
()
+
QLatin1Char
(
'/'
)
+
(
removeExt
?
fileInfo
.
baseName
()
:
fileInfo
.
fileName
());
...
...
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