serializers: Fix quint16 deserialization, remove code duplication
[quassel.git] / src / common / windowssignalwatcher.cpp
index 5c9a481..c68bc8e 100644 (file)
 
 #include <QDebug>
 
-#include "logmessage.h"
-
 // This handler is called by Windows in a different thread when a console event happens
 // FIXME: When the console window is closed, the application is supposedly terminated as soon as
 //        this handler returns. We may want to block and wait for the main thread so set some
 //        condition variable once shutdown is complete...
 static BOOL WINAPI consoleCtrlHandler(DWORD ctrlType)
 {
-  switch (ctrlType) {
-  case CTRL_C_EVENT:     // Ctrl+C
-  case CTRL_CLOSE_EVENT: // Closing the console window
-      WindowsSignalWatcher::signalHandler(SIGTERM);
-      return TRUE;
-  default:
-      return FALSE;
-  }
+    switch (ctrlType) {
+    case CTRL_C_EVENT:      // Ctrl+C
+    case CTRL_CLOSE_EVENT:  // Closing the console window
+        WindowsSignalWatcher::signalHandler(SIGTERM);
+        return TRUE;
+    default:
+        return FALSE;
+    }
 }
 
-WindowsSignalWatcher::WindowsSignalWatcher(QObject *parent)
+WindowsSignalWatcher::WindowsSignalWatcher(QObjectparent)
     : AbstractSignalWatcher{parent}
     , Singleton<WindowsSignalWatcher>{this}
 {
@@ -66,7 +64,7 @@ WindowsSignalWatcher::WindowsSignalWatcher(QObject *parent)
 
 void WindowsSignalWatcher::signalHandler(int signal)
 {
-    quInfo() << "Caught signal" << signal;
+    qInfo() << "Caught signal" << signal;
 
     switch (signal) {
     case SIGINT: