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
fd038bcc
Commit
fd038bcc
authored
May 02, 2021
by
Mark Nauwelaerts
Browse files
quickopen: use common base dir as project base to ensure successful strip of base
parent
f3673010
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/quickopen/katequickopenmodel.cpp
View file @
fd038bcc
...
...
@@ -79,16 +79,17 @@ void KateQuickOpenModel::refresh(KateMainWindow *mainWindow)
const
QStringList
projectDocs
=
projectView
?
(
m_listMode
==
CurrentProject
?
projectView
->
property
(
"projectFiles"
)
:
projectView
->
property
(
"allProjectsFiles"
)).
toStringList
()
:
QStringList
();
const
QString
projectBase
=
[
this
,
projectView
]()
->
QString
{
const
QString
projectBase
=
[
projectView
]()
->
QString
{
if
(
!
projectView
)
{
return
QString
();
}
QString
ret
;
if
(
m_listMode
==
CurrentProject
)
{
ret
=
projectView
->
property
(
"projectBaseDir"
).
toString
();
}
else
{
ret
=
projectView
->
property
(
"allProjectsCommonBaseDir"
).
toString
();
}
// open files are always included in the listing, even if list mode == CurrentProject
// those open files may belong to another project than the current one
// so we should always consistently strip the common base
// otherwise it will be confusing and the opened files of anther project
// end up with an unstripped complete file path
ret
=
projectView
->
property
(
"allProjectsCommonBaseDir"
).
toString
();
if
(
!
ret
.
endsWith
(
QLatin1Char
(
'/'
)))
{
ret
.
append
(
QLatin1Char
(
'/'
));
}
...
...
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