Commit 25e88a16 authored by Daniel Teske's avatar Daniel Teske

SideBar: BookmarkView: Support Return/Enter on OS X

Change-Id: Iffbbf345f8ec2ce3152f9be38e6b05e372a7e4b9
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 92a639ec
......@@ -212,7 +212,7 @@ void BookmarkDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
}
BookmarkView::BookmarkView(QWidget *parent) :
QListView(parent),
Utils::ListView(parent),
m_bookmarkContext(new BookmarkContext(this)),
m_manager(0)
{
......@@ -290,7 +290,7 @@ void BookmarkView::keyPressEvent(QKeyEvent *event)
event->accept();
return;
}
QListView::keyPressEvent(event);
Utils::ListView::keyPressEvent(event);
}
void BookmarkView::removeAll()
......@@ -314,7 +314,7 @@ void BookmarkView::setModel(QAbstractItemModel *model)
BookmarkManager *manager = qobject_cast<BookmarkManager *>(model);
QTC_ASSERT(manager, return);
m_manager = manager;
QListView::setModel(model);
Utils::ListView::setModel(model);
setSelectionModel(manager->selectionModel());
setSelectionMode(QAbstractItemView::SingleSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
......
......@@ -30,6 +30,7 @@
#ifndef BOOKMARKMANAGER_H
#define BOOKMARKMANAGER_H
#include <utils/itemviews.h>
#include <coreplugin/icontext.h>
#include <coreplugin/inavigationwidgetfactory.h>
......@@ -137,7 +138,7 @@ private:
QItemSelectionModel *m_selectionModel;
};
class BookmarkView : public QListView
class BookmarkView : public Utils::ListView
{
Q_OBJECT
public:
......
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