OSDN Git Service

don't ignore file changes while reload dialog is up
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thu, 14 Apr 2011 19:07:13 +0000 (21:07 +0200)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thu, 14 Apr 2011 19:08:55 +0000 (21:08 +0200)
we cannot clear the list of modified files after possibly entering the main
loop again, as that might discard new notifications which we have not
processed yet.

Reviewed-by: dt
src/plugins/coreplugin/filemanager.cpp

index 3831d1a..e8114c7 100644 (file)
@@ -866,6 +866,10 @@ void FileManager::checkForReload()
             changedIFiles.insert(file);
     }
 
+    // clean up. do this before we may enter the main loop, otherwise we would
+    // lose consecutive notifications.
+    d->m_changedFiles.clear();
+
     // collect information about "expected" file names
     // we can't do the "resolving" already in expectFileChange, because
     // if the resolved names are different when unexpectFileChange is called
@@ -1006,9 +1010,6 @@ void FileManager::checkForReload()
         d->m_blockedIFile = 0;
     }
 
-    // clean up
-    d->m_changedFiles.clear();
-
     // handle deleted files
     EditorManager::instance()->closeEditors(editorsToClose, false);
     QMapIterator<IFile *, QString> it(filesToSave);