X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.h;h=b2798389f1095d0d30b836ff8dd4ee8144e0b977;hp=5b6bb7b7c67758b7948b146a3e400d642d7a6e23;hb=52209badc8e769e50aa3019b63689dda0e79e9d0;hpb=92fc8c5b119111a35ab8423c3cbde5b2a022badf diff --git a/src/uisupport/abstractbuffercontainer.h b/src/uisupport/abstractbuffercontainer.h index 5b6bb7b7..b2798389 100644 --- a/src/uisupport/abstractbuffercontainer.h +++ b/src/uisupport/abstractbuffercontainer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -34,18 +34,17 @@ class UISUPPORT_EXPORT AbstractBufferContainer : public AbstractItemView Q_OBJECT public: - AbstractBufferContainer(QWidget *parent); - virtual ~AbstractBufferContainer(); + AbstractBufferContainer(QWidget* parent); inline BufferId currentBuffer() const { return _currentBuffer; } signals: void currentChanged(BufferId); - void currentChanged(const QModelIndex &); + void currentChanged(const QModelIndex&); protected: //! Create an AbstractChatView for the given BufferId and add it to the UI if necessary - virtual AbstractChatView *createChatView(BufferId) = 0; + virtual AbstractChatView* createChatView(BufferId) = 0; //! Remove a chat view from the UI and delete it /** This method shall remove the view from the UI (for example, from a QStackedWidget) if appropriate. @@ -60,8 +59,8 @@ protected: virtual inline bool autoMarkerLine() const { return true; } protected slots: - virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); + void currentChanged(const QModelIndex& current, const QModelIndex& previous) override; + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override; //! Show the given chat view /** This method is called when the given chat view should be displayed. Use this e.g. for @@ -76,13 +75,12 @@ private slots: private: BufferId _currentBuffer; - QHash _chatViews; + QHash _chatViews; }; - class AbstractChatView { public: - virtual ~AbstractChatView() {}; + virtual ~AbstractChatView() = default; virtual MsgId lastMsgId() const = 0; };