X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fwindowssignalwatcher.cpp;h=b22b955d66e0e7bcb1b6bdbd68f383a8951ad568;hp=5c9a48151507777fa1a59ee92f92ea62d6690e7d;hb=579e559a6322209df7cd51c34801fecff5fe734b;hpb=c015fbf8afaf64fbb5a8e2122e2a1ecf0325b1a1 diff --git a/src/common/windowssignalwatcher.cpp b/src/common/windowssignalwatcher.cpp index 5c9a4815..b22b955d 100644 --- a/src/common/windowssignalwatcher.cpp +++ b/src/common/windowssignalwatcher.cpp @@ -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 * @@ -25,25 +25,23 @@ #include -#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(QObject* parent) : AbstractSignalWatcher{parent} , Singleton{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: