Commit c6d41320 authored by Giovana Vitor Dionisio Santana's avatar Giovana Vitor Dionisio Santana ✍🏾 Committed by Christoph Cullmann
Browse files

fixing path removal when closing project

parent f03e678c
...@@ -123,7 +123,14 @@ KateProjectPlugin::~KateProjectPlugin() ...@@ -123,7 +123,14 @@ KateProjectPlugin::~KateProjectPlugin()
unregisterVariables(); unregisterVariables();
for (KateProject *project : qAsConst(m_projects)) { for (KateProject *project : qAsConst(m_projects)) {
<<<<<<< HEAD
delete project; delete project;
=======
if (!QFileInfo(project->fileName()).canonicalPath().isEmpty()){
m_fileWatcher.removePath(QFileInfo(project->fileName()).canonicalPath());
delete project;
}
>>>>>>> e1da932a6 (fixing path removal when closing project)
} }
m_projects.clear(); m_projects.clear();
} }
...@@ -249,8 +256,16 @@ bool KateProjectPlugin::closeProject(KateProject *project) ...@@ -249,8 +256,16 @@ bool KateProjectPlugin::closeProject(KateProject *project)
Q_EMIT pluginViewProjectClosing(project); Q_EMIT pluginViewProjectClosing(project);
if (m_projects.removeOne(project)) { if (m_projects.removeOne(project)) {
<<<<<<< HEAD
delete project; delete project;
return true; return true;
=======
if(!QFileInfo(project->fileName()).canonicalPath().isEmpty()){
m_fileWatcher.removePath(QFileInfo(project->fileName()).canonicalPath());
delete project;
return true;
}
>>>>>>> e1da932a6 (fixing path removal when closing project)
} }
return false; return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment