Commit 87d1ae65 authored by hjk's avatar hjk
Browse files

bookmarks: minor style changes

parent e838a3dd
......@@ -486,7 +486,7 @@ void BookmarkManager::removeBookmark(Bookmark *bookmark)
saveBookmarks();
}
Bookmark *BookmarkManager::bookmarkForIndex(QModelIndex index)
Bookmark *BookmarkManager::bookmarkForIndex(const QModelIndex &index)
{
if (!index.isValid() || index.row() >= m_bookmarksList.size())
return 0;
......@@ -494,7 +494,7 @@ Bookmark *BookmarkManager::bookmarkForIndex(QModelIndex index)
}
bool BookmarkManager::gotoBookmark(Bookmark* bookmark)
bool BookmarkManager::gotoBookmark(Bookmark *bookmark)
{
using namespace TextEditor;
if (ITextEditor *editor = BaseTextEditorWidget::openEditorAt(bookmark->filePath(), bookmark->lineNumber()))
......@@ -524,7 +524,7 @@ void BookmarkManager::documentPrevNext(bool next)
int lastLine = -1;
int prevLine = -1;
int nextLine = -1;
const QList<Bookmark*> marks = m_bookmarksMap.value(fi.path())->values(fi.fileName());
const QList<Bookmark *> marks = m_bookmarksMap.value(fi.path())->values(fi.fileName());
for (int i = 0; i < marks.count(); ++i) {
int markLine = marks.at(i)->lineNumber();
if (firstLine == -1 || firstLine > markLine)
......@@ -677,7 +677,7 @@ void BookmarkManager::moveDown()
}
/* Returns the bookmark at the given file and line number, or 0 if no such bookmark exists. */
Bookmark* BookmarkManager::findBookmark(const QString &path, const QString &fileName, int lineNumber)
Bookmark *BookmarkManager::findBookmark(const QString &path, const QString &fileName, int lineNumber)
{
if (m_bookmarksMap.contains(path)) {
foreach (Bookmark *bookmark, m_bookmarksMap.value(path)->values(fileName)) {
......@@ -774,7 +774,6 @@ void BookmarkManager::loadBookmarks()
BookmarkViewFactory::BookmarkViewFactory(BookmarkManager *bm)
: m_manager(bm)
{
}
QString BookmarkViewFactory::displayName() const
......
......@@ -76,7 +76,7 @@ public:
void updateBookmark(Bookmark *bookmark);
void removeBookmark(Bookmark *bookmark); // Does not remove the mark
void removeAllBookmarks();
Bookmark *bookmarkForIndex(QModelIndex index);
Bookmark *bookmarkForIndex(const QModelIndex &index);
enum State { NoBookMarks, HasBookMarks, HasBookmarksInDocument };
State state() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment