From: Enar Vaikene Date: Thu, 9 May 2019 12:37:04 +0000 (+0300) Subject: Mac OS changes X-Git-Url: https://vaikene.ee/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a845c9a4d543528ab0284835c84c3f4e0bf7b25;p=evaf Mac OS changes --- 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())); }