summaryrefslogtreecommitdiff
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-05-28 14:06:57 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-05-28 15:44:59 +0200
commit76020b61527db086e7b13fdad63ee5b43ff5f2b8 (patch)
treebd36d90a798e86411d8bbb69c480c9c167a289ef /src/plugins/resourceeditor
parenta36d4b9b57762e2998feda565868a22a4e88dfa6 (diff)
downloadqt-creator-76020b61527db086e7b13fdad63ee5b43ff5f2b8.tar.gz
Make sure bookmarks survive a document reload
While reloading a text document, the bookmarks got lost since their associated QTextBlocks were deleted. This patch makes sure that before reloading, the bookmarks are removed non-persistently in the same way as when closing a document, and that they are restored after the document was reloaded. Currently, no effort is made to update the location of the bookmarks based on the way the file changed. Task-number: QTCREATORBUG-1281 Reviewed-by: dt
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index 75f9fb2265..b37169bf77 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -203,7 +203,9 @@ void ResourceEditorFile::reload(ReloadFlag flag, ChangeType type)
if (type == TypePermissions) {
emit changed();
} else {
- m_parent->open(m_parent->m_resourceEditor->fileName());
+ emit aboutToReload();
+ if (m_parent->open(m_parent->m_resourceEditor->fileName()))
+ emit reloaded();
}
}