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
405efcee
Commit
405efcee
authored
Dec 18, 2021
by
Christoph Cullmann
🐮
Committed by
Waqar Ahmed
Dec 21, 2021
Browse files
do nothing if use canceled project open
BUG: 447194
(cherry picked from commit
4cae287c
)
parent
5abbcb31
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/project/kateprojectpluginview.cpp
View file @
405efcee
...
...
@@ -721,10 +721,14 @@ void KateProjectPluginView::slotUpdateStatus(bool visible)
void
KateProjectPluginView
::
openDirectoryOrProject
()
{
const
QString
dir
=
QFileDialog
::
getExistingDirectory
(
nullptr
,
i18n
(
"Choose a directory"
),
QDir
::
currentPath
());
auto
project
=
m_plugin
->
projectForDir
(
dir
,
true
);
// switch to this project
if
(
project
)
{
// get dir or do nothing
const
QString
dir
=
QFileDialog
::
getExistingDirectory
(
m_mainWindow
->
window
(),
i18n
(
"Choose a directory"
),
QDir
::
currentPath
());
if
(
dir
.
isEmpty
())
{
return
;
}
// switch to this project if there
if
(
auto
project
=
m_plugin
->
projectForDir
(
dir
,
true
))
{
int
index
=
m_projectsCombo
->
findData
(
project
->
fileName
());
if
(
index
>=
0
)
{
m_projectsCombo
->
setCurrentIndex
(
index
);
...
...
Write
Preview
Markdown
is supported
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