diff options
author | Daniel Teske <daniel.teske@nokia.com> | 2012-03-12 16:56:25 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2012-04-05 16:47:15 +0200 |
commit | 10438d2e9d74fe5ad38f2ccbaf1fbbe8316b4061 (patch) | |
tree | ea026b58c71f3fc87704b1d973493ddd343f058b /src/plugins/bookmarks | |
parent | f1c299a85e08c5ce16fc8dad371a11115687edf0 (diff) | |
download | qt-creator-10438d2e9d74fe5ad38f2ccbaf1fbbe8316b4061.tar.gz |
BaseTextMark: Support renaming files
Change-Id: I8d712f76fca5d8f5ecad70f1485228e21c00648d
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r-- | src/plugins/bookmarks/bookmark.cpp | 10 | ||||
-rw-r--r-- | src/plugins/bookmarks/bookmark.h | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/bookmarks/bookmark.cpp b/src/plugins/bookmarks/bookmark.cpp index 4de678563d..45fb4bdee3 100644 --- a/src/plugins/bookmarks/bookmark.cpp +++ b/src/plugins/bookmarks/bookmark.cpp @@ -70,6 +70,16 @@ void Bookmark::updateBlock(const QTextBlock &block) } } +void Bookmark::updateFileName(const QString &fileName) +{ + m_fileName = fileName; + QFileInfo fi(fileName); + m_onlyFile = fi.fileName(); + m_path = fi.path(); + m_manager->updateBookmark(this); + BaseTextMark::updateFileName(fileName); +} + QString Bookmark::lineText() const { return m_lineText; diff --git a/src/plugins/bookmarks/bookmark.h b/src/plugins/bookmarks/bookmark.h index 62d55f7d1b..f26a66920f 100644 --- a/src/plugins/bookmarks/bookmark.h +++ b/src/plugins/bookmarks/bookmark.h @@ -54,6 +54,7 @@ public: void updateLineNumber(int lineNumber); void updateBlock(const QTextBlock &block); + void updateFileName(const QString &fileName); void removedFromEditor(); QString filePath() const; @@ -63,7 +64,7 @@ public: private: BookmarkManager *m_manager; - const QString m_fileName; + QString m_fileName; QString m_onlyFile; QString m_path; QString m_lineText; |