From 4a845c9a4d543528ab0284835c84c3f4e0bf7b25 Mon Sep 17 00:00:00 2001 From: Enar Vaikene Date: Thu, 9 May 2019 15:37:04 +0300 Subject: [PATCH] Mac OS changes --- src/apps/PswGen/CLI/cli.cpp | 6 +++--- src/apps/PswGen/Storage/module.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/PswGen/CLI/cli.cpp b/src/apps/PswGen/CLI/cli.cpp index 56a49fb..2d2ca1c 100644 --- a/src/apps/PswGen/CLI/cli.cpp +++ b/src/apps/PswGen/CLI/cli.cpp @@ -32,7 +32,7 @@ #include -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS) # include # include #endif @@ -122,7 +122,7 @@ bool Module::event(QEvent * e) QString Module::readPassword() { bool noEcho = false; -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS) termios oldt; tcgetattr(STDIN_FILENO, &oldt); termios newt = oldt; @@ -145,7 +145,7 @@ QString Module::readPassword() cout << endl; } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS) tcsetattr(STDIN_FILENO, TCSANOW, &oldt); #elif defined Q_OS_WIN32 SetConsoleMode(hStdin, mode); diff --git a/src/apps/PswGen/Storage/module.cpp b/src/apps/PswGen/Storage/module.cpp index 3c18b9a..09efe2e 100644 --- a/src/apps/PswGen/Storage/module.cpp +++ b/src/apps/PswGen/Storage/module.cpp @@ -135,6 +135,7 @@ bool StorageImpl::init() void StorageImpl::done() { mData.clear(); + mDb.close(); EVAF_INFO("%s finalized", qPrintable(objectName())); } -- 2.47.0