X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fmain%2FGUI%2Fexithandler.cpp;h=80c364c782c9a9e34acebee5da9c6cd1ba0adce6;hb=de270ece1b764b19968e14420f538321f1c06b15;hp=99d376f54f6a036d0035365359a03561bc539451;hpb=4d81227da330c21c7aa0badc88bd5ad4467067fb;p=evaf
diff --git a/src/main/GUI/exithandler.cpp b/src/main/GUI/exithandler.cpp
index 99d376f..80c364c 100644
--- a/src/main/GUI/exithandler.cpp
+++ b/src/main/GUI/exithandler.cpp
@@ -24,7 +24,7 @@
#include
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
# include
#endif
@@ -36,7 +36,7 @@ namespace eVaf {
namespace GUI {
namespace Internal {
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
/**
* Signal handler on Linux
@@ -107,12 +107,11 @@ static BOOL WINAPI signalHandler(DWORD sig)
} // namespace eVaf::GUI
} // namespace eVaf
-using namespace eVaf::GUI::Internal;
-bool installExitHandler()
+bool eVaf::GUI::Internal::installExitHandler()
{
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = signalHandler;