test: Add build system support and a main function for unit tests
[quassel.git] / src / client / bufferviewoverlay.h
index bb95991..4f3ab46 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2014 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -18,8 +18,9 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef BUFFERVIEWOVERLAY_H
-#define BUFFERVIEWOVERLAY_H
+#pragma once
+
+#include "client-export.h"
 
 #include <QObject>
 
 class BufferViewConfig;
 class ClientBufferViewConfig;
 
-class BufferViewOverlay : public QObject
+class CLIENT_EXPORT BufferViewOverlay : public QObject
 {
     Q_OBJECT
 
 public:
-    BufferViewOverlay(QObject *parent = 0);
+    BufferViewOverlay(QObject *parent = nullptr);
 
     inline const QSet<int> &bufferViewIds() { return _bufferViewIds; }
     bool allNetworks();
@@ -64,7 +65,7 @@ signals:
     void initDone();
 
 protected:
-    virtual void customEvent(QEvent *event);
+    void customEvent(QEvent *event) override;
 
 private slots:
     void viewInitialized();
@@ -74,14 +75,14 @@ private:
     void updateHelper();
     QSet<BufferId> filterBuffersByConfig(const QList<BufferId> &buffers, const BufferViewConfig *config);
 
-    bool _aboutToUpdate;
+    bool _aboutToUpdate{false};
 
     QSet<int> _bufferViewIds;
-    int _uninitializedViewCount;
+    int _uninitializedViewCount{0};
 
     QSet<NetworkId> _networkIds;
-    int _allowedBufferTypes;
-    int _minimumActivity;
+    int _allowedBufferTypes{0};
+    int _minimumActivity{0};
 
     QSet<BufferId> _buffers;
     QSet<BufferId> _removedBuffers;
@@ -89,6 +90,3 @@ private:
 
     static const int _updateEventId;
 };
-
-
-#endif //BUFFERVIEWOVERLAY_H