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
f12456dd
Commit
f12456dd
authored
Feb 03, 2021
by
Christoph Cullmann
🐮
Browse files
early out for files
parent
09ca221c
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/project/kateprojectviewtree.cpp
View file @
f12456dd
...
...
@@ -116,15 +116,16 @@ void KateProjectViewTree::slotClicked(const QModelIndex &index)
const
QString
filePath
=
index
.
data
(
Qt
::
UserRole
).
toString
();
if
(
!
filePath
.
isEmpty
())
{
/**
* normal file?
* normal file?
=> just trigger open of it
*/
if
(
index
.
data
(
KateProjectItem
::
TypeRole
).
toInt
()
==
KateProjectItem
::
File
)
{
m_pluginView
->
mainWindow
()
->
openUrl
(
QUrl
::
fromLocalFile
(
filePath
));
selectionModel
()
->
setCurrentIndex
(
index
,
QItemSelectionModel
::
Clear
|
QItemSelectionModel
::
Select
);
return
;
}
/**
*
we might be a
linked project =>
trigger that we switch to the selected one!
* linked project
?
=>
switch the current active project
*/
if
(
index
.
data
(
KateProjectItem
::
TypeRole
).
toInt
()
==
KateProjectItem
::
LinkedProject
)
{
m_pluginView
->
switchToProject
(
QDir
(
filePath
));
...
...
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