mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Bookmarks: Fix bookmarksSelected signal
Regression from recent commits
This commit is contained in:
parent
5b161b74be
commit
50b9dd9023
|
@ -41,9 +41,8 @@ BookmarksTreeView::BookmarksTreeView(QWidget* parent)
|
|||
setItemDelegate(new BookmarksItemDelegate(this));
|
||||
header()->resizeSections(QHeaderView::ResizeToContents);
|
||||
|
||||
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(indexExpanded(QModelIndex)));
|
||||
connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(indexCollapsed(QModelIndex)));
|
||||
connect(this, SIGNAL(slotSelectionChanged(QItemSelection,QItemSelection)), this, SLOT(slotSelectionChanged()));
|
||||
connect(this, &QTreeView::expanded, this, &BookmarksTreeView::indexExpanded);
|
||||
connect(this, &QTreeView::collapsed, this, &BookmarksTreeView::indexCollapsed);
|
||||
}
|
||||
|
||||
BookmarksTreeView::ViewType BookmarksTreeView::viewType() const
|
||||
|
@ -151,11 +150,6 @@ void BookmarksTreeView::indexCollapsed(const QModelIndex &parent)
|
|||
}
|
||||
}
|
||||
|
||||
void BookmarksTreeView::slotSelectionChanged()
|
||||
{
|
||||
emit bookmarksSelected(selectedBookmarks());
|
||||
}
|
||||
|
||||
void BookmarksTreeView::restoreExpandedState(const QModelIndex &parent)
|
||||
{
|
||||
for (int i = 0; i < m_filter->rowCount(parent); ++i) {
|
||||
|
@ -172,6 +166,14 @@ void BookmarksTreeView::rowsInserted(const QModelIndex &parent, int start, int e
|
|||
QTreeView::rowsInserted(parent, start, end);
|
||||
}
|
||||
|
||||
void BookmarksTreeView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
|
||||
{
|
||||
Q_UNUSED(selected)
|
||||
Q_UNUSED(deselected)
|
||||
|
||||
emit bookmarksSelected(selectedBookmarks());
|
||||
}
|
||||
|
||||
void BookmarksTreeView::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
emit contextMenuRequested(viewport()->mapToGlobal(event->pos()));
|
||||
|
|
|
@ -70,11 +70,10 @@ private slots:
|
|||
void indexExpanded(const QModelIndex &parent);
|
||||
void indexCollapsed(const QModelIndex &parent);
|
||||
|
||||
void slotSelectionChanged();
|
||||
|
||||
private:
|
||||
void restoreExpandedState(const QModelIndex &parent);
|
||||
void rowsInserted(const QModelIndex &parent, int start, int end);
|
||||
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
|
||||
void contextMenuEvent(QContextMenuEvent* event);
|
||||
void mouseMoveEvent(QMouseEvent* event);
|
||||
|
|
Loading…
Reference in New Issue
Block a user