diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-04-09 16:03:23 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-04-11 11:30:11 +0200 |
commit | 25e88a161dc9454d38b674c12898b1b4c605815d (patch) | |
tree | eea5ac2b8d35bc7aa76d4d2f51bd167c54adf1ec /src/plugins/bookmarks | |
parent | 92a639ec5aab9337f1a3a0e1fabfdf484a952a9b (diff) | |
download | qt-creator-25e88a161dc9454d38b674c12898b1b4c605815d.tar.gz |
SideBar: BookmarkView: Support Return/Enter on OS X
Change-Id: Iffbbf345f8ec2ce3152f9be38e6b05e372a7e4b9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/bookmarks')
-rw-r--r-- | src/plugins/bookmarks/bookmarkmanager.cpp | 6 | ||||
-rw-r--r-- | src/plugins/bookmarks/bookmarkmanager.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index 2d9d9133a9..2e779bc400 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -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); diff --git a/src/plugins/bookmarks/bookmarkmanager.h b/src/plugins/bookmarks/bookmarkmanager.h index 1f1a5fe93a..61ea756009 100644 --- a/src/plugins/bookmarks/bookmarkmanager.h +++ b/src/plugins/bookmarks/bookmarkmanager.h @@ -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: |