forked from qt-creator/qt-creator
Bookmark: const correct BookmarkManager::gotoBookmark
Change-Id: Id6118c741d0f21b9c6b968939769ca2ab3d683fd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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();
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user