CodePaster: Do not show popup about modified files on Windows.

QTemporaryFile destructor causes a file changed signal due to it
holding on to it.

Reviewed-by: dt
Task-number: QTCREATORBUG-2083
(cherry picked from commit 3e31a770b5)
This commit is contained in:
Friedemann Kleint
2010-08-18 15:38:05 +02:00
committed by hjk
parent d85fca41ae
commit 58de9b5803

View File

@@ -351,6 +351,8 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
// Keep the file and store in list of files to be removed. // Keep the file and store in list of files to be removed.
tempFile->setAutoRemove(false); tempFile->setAutoRemove(false);
const QString fileName = tempFile->fileName(); const QString fileName = tempFile->fileName();
// Discard to temporary file to make sure it is closed and no changes are triggered.
tempFile = TemporaryFilePtr();
m_fetchedSnippets.push_back(fileName); m_fetchedSnippets.push_back(fileName);
// Open editor with title. // Open editor with title.
Core::IEditor* editor = EditorManager::instance()->openEditor(fileName); Core::IEditor* editor = EditorManager::instance()->openEditor(fileName);