diff options
-rw-r--r-- | src/plugins/cpaster/cpasterplugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 47cbf0091b..e3a17c01d9 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -351,6 +351,8 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription, // Keep the file and store in list of files to be removed. tempFile->setAutoRemove(false); 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); // Open editor with title. Core::IEditor* editor = EditorManager::instance()->openEditor(fileName); |