modernize: Replace most remaining old-style connects by PMF ones
[quassel.git] / src / common / logger.h
index 8c1f2f0..9d80305 100644 (file)
@@ -20,6 +20,8 @@
 
 #pragma once
 
+#include "common-export.h"
+
 #include <vector>
 
 #include <QDateTime>
@@ -31,7 +33,7 @@
 /**
  * The Logger class encapsulates the various configured logging backends.
  */
-class Logger : public QObject
+class COMMON_EXPORT Logger : public QObject
 {
     Q_OBJECT
 
@@ -61,9 +63,9 @@ public:
      * and won't store further ones.
      *
      * @param keepMessages Whether messages should be kept
-     * @returns true, if initialization was successful
+     * @throws ExitException, if command line options are invalid
      */
-    bool setup(bool keepMessages);
+    void setup(bool keepMessages);
 
     /**
      * Accesses the stores log messages, e.g. for consumption by DebugLogWidget.
@@ -72,11 +74,7 @@ public:
      */
     std::vector<Logger::LogEntry> messages() const;
 
-#if QT_VERSION < 0x050000
-    static void messageHandler(QtMsgType type, const char *message);
-#else
     static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
-#endif
 
     /**
      * Takes the given message with the given log level, formats it and emits the @a messageLogged() signal.