modernize: Pass arguments by value and move in constructors
[quassel.git] / src / common / highlightrulemanager.h
index d98c867..5a2d4a8 100644 (file)
@@ -20,6 +20,8 @@
 
 #pragma once
 
+#include "common-export.h"
+
 #include <utility>
 
 #include <QString>
 #include "nickhighlightmatcher.h"
 #include "syncableobject.h"
 
-class HighlightRuleManager : public SyncableObject
+class COMMON_EXPORT HighlightRuleManager : public SyncableObject
 {
-    SYNCABLE_OBJECT
     Q_OBJECT
+    SYNCABLE_OBJECT
 
     Q_PROPERTY(int highlightNick READ highlightNick WRITE setHighlightNick)
     Q_PROPERTY(bool nicksCaseSensitive READ nicksCaseSensitive WRITE setNicksCaseSensitive)
@@ -53,7 +55,7 @@ public:
     /**
      * Individual highlight rule
      */
-    class HighlightRule
+    class COMMON_EXPORT HighlightRule
     {
     public:
         /**
@@ -75,8 +77,8 @@ public:
          */
         HighlightRule(int id, QString contents, bool isRegEx, bool isCaseSensitive, bool isEnabled,
                       bool isInverse, QString sender, QString chanName)
-            : _id(id), _contents(contents), _isRegEx(isRegEx), _isCaseSensitive(isCaseSensitive),
-              _isEnabled(isEnabled), _isInverse(isInverse), _sender(sender), _chanName(chanName)
+            : _id(id), _contents(std::move(contents)), _isRegEx(isRegEx), _isCaseSensitive(isCaseSensitive),
+              _isEnabled(isEnabled), _isInverse(isInverse), _sender(std::move(sender)), _chanName(std::move(chanName))
         {
             _cacheInvalid = true;
             // Cache expression matches on construction