diff options
Diffstat (limited to 'src/plugins/coreplugin/documentmanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/documentmanager.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp index 292b31fb6e..59bd39936a 100644 --- a/src/plugins/coreplugin/documentmanager.cpp +++ b/src/plugins/coreplugin/documentmanager.cpp @@ -244,10 +244,9 @@ static void addFileInfo(const QString &fileName, IDocument *document, bool isLin state.modified = fi.lastModified(); state.permissions = fi.permissions(); // Add watcher if we don't have that already - if (!d->m_states.contains(fileName)) { + if (!d->m_states.contains(fileName)) d->m_states.insert(fileName, FileState()); - } QFileSystemWatcher *watcher = 0; if (isLink) watcher = d->linkWatcher(); @@ -860,9 +859,8 @@ void DocumentManager::changedFile(const QString &fileName) if (d->m_states.contains(fileName)) d->m_changedFiles.insert(fileName); - if (wasempty && !d->m_changedFiles.isEmpty()) { + if (wasempty && !d->m_changedFiles.isEmpty()) QTimer::singleShot(200, this, SLOT(checkForReload())); - } } void DocumentManager::mainWindowActivated() @@ -963,11 +961,10 @@ void DocumentManager::checkForReload() // find out the type IDocument::ChangeType fileChange = changeTypes.value(fileName); - if (fileChange == IDocument::TypeRemoved) { + if (fileChange == IDocument::TypeRemoved) type = IDocument::TypeRemoved; - } else if (fileChange == IDocument::TypeContents && type == IDocument::TypePermissions) { + else if (fileChange == IDocument::TypeContents && type == IDocument::TypePermissions) type = IDocument::TypeContents; - } } if (!changed) // probably because the change was blocked with (un)blockFileChange |