Skip to content

Commit

Permalink
Fix channel filtering not working.
Browse files Browse the repository at this point in the history
Channel filtering broke for windows Snapshots delivered with Qt 5
due to a signature change on the QAbstractView::dataChanged function
overridden in UserView to implement the channel filtering functionality.
See http://qt-project.org/doc/qt-5/sourcebreaks.html#changes-to-qt-widgets .

Fixes #1328 .
  • Loading branch information
hacst committed Aug 18, 2014
1 parent 34daf71 commit b5d3758
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/mumble/UserView.cpp
Expand Up @@ -385,7 +385,11 @@ void UserView::updateChannel(const QModelIndex &idx) {
} }
} }


void UserView::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ) #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
void UserView::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight, const QVector<int> &)
#else
void UserView::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight)
#endif
{ {
UserModel *um = static_cast<UserModel *>(model()); UserModel *um = static_cast<UserModel *>(model());
int nRowCount = um->rowCount(); int nRowCount = um->rowCount();
Expand Down
7 changes: 6 additions & 1 deletion src/mumble/UserView.h
Expand Up @@ -77,10 +77,15 @@ class UserView : public QTreeView {
public: public:
UserView(QWidget *); UserView(QWidget *);
void keyboardSearch(const QString &search); void keyboardSearch(const QString &search);
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight, const QVector<int> & roles = QVector<int> ());
#else
void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
#endif

public slots: public slots:
void nodeActivated(const QModelIndex &idx); void nodeActivated(const QModelIndex &idx);
void selectSearchResult(); void selectSearchResult();
void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
void updateChannel(const QModelIndex &index); void updateChannel(const QModelIndex &index);
}; };


Expand Down

0 comments on commit b5d3758

Please sign in to comment.