modernize: Use override instead of virtual
[quassel.git] / src / client / coreaccountmodel.h
index 93d2d7e..88bc341 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef COREACCOUNTMODEL_H_
-#define COREACCOUNTMODEL_H_
+#pragma once
+
+#include "client-export.h"
 
 #include <QAbstractListModel>
 #include <QUuid>
 
 #include "coreaccount.h"
 
-class CoreAccountModel : public QAbstractListModel
+class CLIENT_EXPORT CoreAccountModel : public QAbstractListModel
 {
     Q_OBJECT
 
@@ -36,11 +37,11 @@ public:
         UuidRole
     };
 
-    CoreAccountModel(QObject *parent = 0);
-    CoreAccountModel(const CoreAccountModel *other, QObject *parent = 0);
+    CoreAccountModel(QObject *parent = nullptr);
+    CoreAccountModel(const CoreAccountModel *other, QObject *parent = nullptr);
 
-    inline int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+    inline int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
 
     CoreAccount account(const QModelIndex &) const;
     CoreAccount account(AccountId) const;
@@ -57,6 +58,7 @@ public:
     void update(const CoreAccountModel *other);
 
     bool operator==(const CoreAccountModel &other) const;
+    bool operator!=(const CoreAccountModel &other) const;
 
 public slots:
     void save();
@@ -87,6 +89,3 @@ AccountId CoreAccountModel::internalAccount() const
 {
     return _internalAccount;
 }
-
-
-#endif