modernize: Use '= default' instead of empty ctor/dtor bodies
[quassel.git] / src / core / coreuserinputhandler.h
index b13fd39..a45fcae 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2016 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  *
@@ -21,6 +21,8 @@
 #ifndef COREUSERINPUTHANDLER_H
 #define COREUSERINPUTHANDLER_H
 
+#include <utility>
+
 #include "corebasichandler.h"
 #include "corenetwork.h"
 
@@ -32,7 +34,7 @@ class CoreUserInputHandler : public CoreBasicHandler
     Q_OBJECT
 
 public:
-    CoreUserInputHandler(CoreNetwork *parent = 0);
+    CoreUserInputHandler(CoreNetwork *parent = nullptr);
     inline CoreNetwork *coreNetwork() const { return qobject_cast<CoreNetwork *>(parent()); }
 
     void handleUserInput(const BufferInfo &bufferInfo, const QString &text);
@@ -49,7 +51,7 @@ public slots:
      * @param[in] skipFormatting  If true, skip timestamp formatting codes (e.g. if already done)
      */
     void handleAway(const BufferInfo &bufferInfo, const QString &text,
-                    const bool skipFormatting = true);
+                    const bool skipFormatting = false);
     void handleBan(const BufferInfo &bufferInfo, const QString &text);
     void handleUnban(const BufferInfo &bufferInfo, const QString &text);
     void handleCtcp(const BufferInfo &bufferInfo, const QString &text);
@@ -107,22 +109,22 @@ public slots:
     void issueAway(const QString &msg, bool autoCheck = true, const bool skipFormatting = false);
 
 protected:
-    void timerEvent(QTimerEvent *event);
+    void timerEvent(QTimerEvent *event) override;
 
 private:
     void doMode(const BufferInfo& bufferInfo, const QChar &addOrRemove, const QChar &mode, const QString &nickList);
     void banOrUnban(const BufferInfo &bufferInfo, const QString &text, bool ban);
-    void putPrivmsg(const QString &target, const QString &message, std::function<QByteArray(const QString &, const QString &)> encodeFunc, Cipher *cipher = 0);
+    void putPrivmsg(const QString &target, const QString &message, std::function<QByteArray(const QString &, const QString &)> encodeFunc, Cipher *cipher = nullptr);
 
 #ifdef HAVE_QCA2
-    QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = 0) const;
+    QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = nullptr) const;
 #endif
 
     struct Command {
         BufferInfo bufferInfo;
         QString command;
-        Command(const BufferInfo &info, const QString &command) : bufferInfo(info), command(command) {}
-        Command() {}
+        Command(BufferInfo info, QString command) : bufferInfo(std::move(info)), command(std::move(command)) {}
+        Command() = default;
     };
 
     QHash<int, Command> _delayedCommands;