Bookmark: const correct BookmarkManager::gotoBookmark

Change-Id: Id6118c741d0f21b9c6b968939769ca2ab3d683fd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2018-01-10 15:34:51 +01:00
parent 319990d7c5
commit ec9c2f78d8
2 changed files with 2 additions and 2 deletions

View File

@@ -500,7 +500,7 @@ Bookmark *BookmarkManager::bookmarkForIndex(const QModelIndex &index) const
return m_bookmarksList.at(index.row()); return m_bookmarksList.at(index.row());
} }
bool BookmarkManager::gotoBookmark(Bookmark *bookmark) bool BookmarkManager::gotoBookmark(const Bookmark *bookmark) const
{ {
if (IEditor *editor = EditorManager::openEditorAt(bookmark->fileName(), bookmark->lineNumber())) if (IEditor *editor = EditorManager::openEditorAt(bookmark->fileName(), bookmark->lineNumber()))
return editor->currentLine() == bookmark->lineNumber(); return editor->currentLine() == bookmark->lineNumber();

View File

@@ -96,7 +96,7 @@ public:
void moveDown(); void moveDown();
void edit(); void edit();
void editByFileAndLine(const Utils::FileName &fileName, int lineNumber); void editByFileAndLine(const Utils::FileName &fileName, int lineNumber);
bool gotoBookmark(Bookmark *bookmark); bool gotoBookmark(const Bookmark *bookmark) const;
signals: signals:
void updateActions(bool enableToggle, int state); void updateActions(bool enableToggle, int state);