From: Manuel Nickschas Date: Mon, 24 Mar 2014 23:15:47 +0000 (+0100) Subject: QTreeView::dataChanged() signature changed in Qt5 X-Git-Tag: 0.11.0~60 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=27e9a474a8c205829067a017f7d7fbde0891c42a;ds=inline QTreeView::dataChanged() signature changed in Qt5 --- diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 4c09a46b..167d6b99 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -392,10 +392,15 @@ void BufferView::setExpandedState(const QModelIndex &networkIdx) storeExpandedState(networkIdx); // this call is needed to keep track of the isActive state } - +#if QT_VERSION < 0x050000 void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { QTreeView::dataChanged(topLeft, bottomRight); +#else +void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles) +{ + QTreeView::dataChanged(topLeft, bottomRight, roles); +#endif // determine how many items have been changed and if any of them is a networkitem // which just swichted from active to inactive or vice versa diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index 8a576640..1c0c52ec 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -76,12 +76,17 @@ protected: virtual void keyPressEvent(QKeyEvent *); virtual void dropEvent(QDropEvent *event); virtual void rowsInserted(const QModelIndex &parent, int start, int end); - virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); virtual void wheelEvent(QWheelEvent *); virtual QSize sizeHint() const; virtual void focusInEvent(QFocusEvent *event) { QAbstractScrollArea::focusInEvent(event); } virtual void contextMenuEvent(QContextMenuEvent *event); +#if QT_VERSION < 0x050000 + virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); +#else + virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles); +#endif + private slots: void joinChannel(const QModelIndex &index); void toggleHeader(bool checked);