| 95 | }; |
| 96 | |
| 97 | void AbstractFileManagerPluginPrivate::projectClosing(IProject* project) |
| 98 | { |
| 99 | const auto projectJobIt = m_projectJobs.constFind(project); |
| 100 | if (projectJobIt != m_projectJobs.constEnd()) { |
| 101 | // make sure the import job does not live longer than the project |
| 102 | // see also addLotsOfFiles test |
| 103 | for (FileManagerListJob* job : *projectJobIt) { |
| 104 | qCDebug(FILEMANAGER) << "killing project job:" << job; |
| 105 | job->kill(); |
| 106 | } |
| 107 | m_projectJobs.remove(project); |
| 108 | } |
| 109 | #ifdef TIME_IMPORT_JOB |
| 110 | QElapsedTimer timer; |
| 111 | if (m_watchers.contains(project)) { |
| 112 | timer.start(); |
| 113 | } |
| 114 | #endif |
| 115 | delete m_watchers.take(project); |
| 116 | #ifdef TIME_IMPORT_JOB |
| 117 | if (timer.isValid()) { |
| 118 | qCDebug(FILEMANAGER) << "Deleting dir watcher took" << timer.elapsed() / 1000.0 << "seconds for project" << project->name(); |
| 119 | } |
| 120 | #endif |
| 121 | m_filters.remove(project); |
| 122 | } |
| 123 | |
| 124 | KJob* AbstractFileManagerPluginPrivate::eventuallyReadFolder(ProjectFolderItem* item) |
| 125 | { |