common: Remove the copy assignment operator from DccConfig
[quassel.git] / src / common / dccconfig.h
index c82830a..67fd9ef 100644 (file)
@@ -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  *
@@ -20,6 +20,8 @@
 
 #pragma once
 
+#include "common-export.h"
+
 #include <QHostAddress>
 
 #include "syncableobject.h"
@@ -30,7 +32,7 @@
  * @warning Equality and assignment operators are optimized for use in a settings page
  *          and do not cover all attributes!
  */
-class DccConfig : public SyncableObject
+class COMMON_EXPORT DccConfig : public SyncableObject
 {
     Q_OBJECT
     SYNCABLE_OBJECT
@@ -60,7 +62,8 @@ public:
     /**
      * Mode for detecting the outgoing IP
      */
-    enum class IpDetectionMode : quint8 {
+    enum class IpDetectionMode : quint8
+    {
         Automatic,  ///< Automatic detection (network socket or USERHOST)
         Manual,     ///< Manually specified IP
     };
@@ -69,9 +72,10 @@ public:
     /**
      * Mode for selecting the port range for DCC
      */
-    enum class PortSelectionMode : quint8 {
-        Automatic,   ///< Automatic port selection
-        Manual,      ///< Manually specified port range
+    enum class PortSelectionMode : quint8
+    {
+        Automatic,  ///< Automatic port selection
+        Manual,     ///< Manually specified port range
     };
     Q_ENUMS(PortSelectionMode)
 
@@ -82,17 +86,7 @@ public:
      *
      * @param[in] parent QObject parent
      */
-    DccConfig(QObject *parent = nullptr);
-
-    /**
-     * Assignment operator.
-     *
-     * @note Only assigns properties relevant for config management!
-     *
-     * @param[in] other Right-hand side instance
-     * @returns The updated instance
-     */
-    DccConfig &operator=(const DccConfig &other);
+    DccConfig(QObject* parent = nullptr);
 
     /**
      * Equality operator.
@@ -102,7 +96,7 @@ public:
      * @param[in] other Right-hand side instance
      * @returns Whether the two instances have equal properties
      */
-    bool operator==(const DccConfig &other);
+    bool operator==(const DccConfigother);
 
     /// @name Getters
     /// @{
@@ -122,7 +116,7 @@ public slots:
     /// @name Setters
     /// @{
     void setDccEnabled(bool enabled);
-    void setOutgoingIp(const QHostAddress &outgoingIp);
+    void setOutgoingIp(const QHostAddressoutgoingIp);
     void setIpDetectionMode(DccConfig::IpDetectionMode ipDetectionMode);
     void setPortSelectionMode(DccConfig::PortSelectionMode portSelectionMode);
     void setMinPort(quint16 port);
@@ -135,14 +129,14 @@ public slots:
 
 private:
     // The given values are used as default for both initialization and settings
-    bool _dccEnabled                     {false};
-    QHostAddress _outgoingIp             {QHostAddress::LocalHost};
-    IpDetectionMode _ipDetectionMode     {IpDetectionMode::Automatic};
-    PortSelectionMode _portSelectionMode {PortSelectionMode::Automatic};
-    quint16 _minPort                     {1024};
-    quint16 _maxPort                     {32767};
-    int _chunkSize                       {16};
-    int _sendTimeout                     {180};
-    bool _usePassiveDcc                  {false};
-    bool _useFastSend                    {false};
+    bool _dccEnabled{false};
+    QHostAddress _outgoingIp{QHostAddress::LocalHost};
+    IpDetectionMode _ipDetectionMode{IpDetectionMode::Automatic};
+    PortSelectionMode _portSelectionMode{PortSelectionMode::Automatic};
+    quint16 _minPort{1024};
+    quint16 _maxPort{32767};
+    int _chunkSize{16};
+    int _sendTimeout{180};
+    bool _usePassiveDcc{false};
+    bool _useFastSend{false};
 };