X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.h;h=47a519f5a48a9a8c992591f1b084d8af6bb2ea23;hb=fb80dab2044d302eb8ccacd0b34d4cbaf5fe904c;hp=feb48a11b0a378f7c605e041d41df77f08bf1b35;hpb=5c4459d5df51a99bc6ee2e7389e3a7aec3f81091;p=quassel.git diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index feb48a11..47a519f5 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -68,8 +68,8 @@ public slots: void nextBuffer(); void previousBuffer(); void hideCurrentBuffer(); - void filterTextChanged(QString filterString); - void changeHighlight(const Direction direction); + void filterTextChanged(const QString& filterString); + void changeHighlight(Direction direction); void selectHighlighted(); void clearHighlight(); @@ -85,11 +85,7 @@ protected: 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); @@ -135,12 +131,12 @@ private: WasActive = 0x02 }; QHash _expandedState; - QModelIndex m_currentHighlight; + QModelIndex _currentHighlight; }; // ****************************** -// BufferViewDelgate +// BufferViewDelegate // ****************************** class BufferViewDelegate : public QStyledItemDelegate @@ -151,11 +147,13 @@ public: BufferViewDelegate(QObject *parent = 0); bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override; - QModelIndex currentHighlight; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; +public: + QModelIndex currentHighlight; + protected: - virtual void customEvent(QEvent *event) override; + void customEvent(QEvent *event) override; };