Skip to content
GitLab
Menu
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
f7519ea9
Commit
f7519ea9
authored
Mar 08, 2021
by
Christoph Cullmann
🐮
Browse files
ensure correct full path is registered
parent
e6c3c8a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/project/kateprojectworker.cpp
View file @
f7519ea9
...
...
@@ -313,14 +313,15 @@ void KateProjectWorker::loadFilesEntry(QStandardItem *parent, const QVariantMap
const
int
slashIndex
=
filePath
.
lastIndexOf
(
QLatin1Char
(
'/'
));
const
QString
fileName
=
(
slashIndex
<
0
)
?
filePath
:
filePath
.
mid
(
slashIndex
+
1
);
const
QString
filePathName
=
(
slashIndex
<
0
)
?
QString
()
:
filePath
.
left
(
slashIndex
);
const
QString
fullFilePath
=
dirPath
+
filePath
;
/**
* construct the item with right directory prefix
* already hang in directories in tree
*/
KateProjectItem
*
fileItem
=
new
KateProjectItem
(
KateProjectItem
::
File
,
fileName
);
fileItem
->
setData
(
filePath
,
Qt
::
UserRole
);
(
*
file2Item
)[
filePath
]
=
fileItem
;
fileItem
->
setData
(
f
ullF
ilePath
,
Qt
::
UserRole
);
(
*
file2Item
)[
f
ullF
ilePath
]
=
fileItem
;
// put in our item to the right directory parent
directoryParent
(
dir
,
dir2Item
,
filePathName
)
->
appendRow
(
fileItem
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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