diff options
author | Daniel Teske <daniel.teske@nokia.com> | 2012-02-15 17:52:23 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-02-22 11:20:19 +0100 |
commit | 6ad99a42d1bd40918e7b9c6c568d86f25369e020 (patch) | |
tree | 90e2ff04145c7c7c486e5356486ad15b389a6abb /src/plugins/bookmarks/bookmark.cpp | |
parent | b7062b01a0568a331d11402f6982b91f8e3563c7 (diff) | |
download | qt-creator-6ad99a42d1bd40918e7b9c6c568d86f25369e020.tar.gz |
Bookmark: Use ITextMark::lineNumber() instead of tracking linenumber
Change-Id: I476041991fbcc4a540f62d8221846375cdf52dea
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/bookmarks/bookmark.cpp')
-rw-r--r-- | src/plugins/bookmarks/bookmark.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/bookmarks/bookmark.cpp b/src/plugins/bookmarks/bookmark.cpp index 4f2d7cf144..8b771db021 100644 --- a/src/plugins/bookmarks/bookmark.cpp +++ b/src/plugins/bookmarks/bookmark.cpp @@ -44,8 +44,7 @@ Bookmark::Bookmark(const QString& fileName, int lineNumber, BookmarkManager *man m_fileInfo(fileName), m_fileName(fileName), m_onlyFile(m_fileInfo.fileName()), - m_path(m_fileInfo.path()), - m_lineNumber(lineNumber) + m_path(m_fileInfo.path()) { setPriority(TextEditor::ITextMark::LowPriority); setIcon(m_manager->bookmarkIcon()); @@ -56,13 +55,11 @@ void Bookmark::removedFromEditor() m_manager->removeBookmark(this); } -void Bookmark::updateLineNumber(int lineNumber) +void Bookmark::updateLineNumber(int line) { - if (lineNumber != m_lineNumber) { - m_lineNumber = lineNumber; + if (line != lineNumber()) m_manager->updateBookmark(this); - } - BaseTextMark::updateLineNumber(lineNumber); + BaseTextMark::updateLineNumber(line); } void Bookmark::updateBlock(const QTextBlock &block) |