X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;ds=inline;f=src%2Fapps%2FPswGen%2FCLI%2Fcli.cpp;h=2d2ca1cd55a9b0067acf0073610e65adac82f193;hb=4a845c9a4d543528ab0284835c84c3f4e0bf7b25;hp=51ea2b6690351cafa0dc2f654156a856fd2a03b8;hpb=2abf509a06bab00baa0746d4911ca8b60f58e08a;p=evaf
diff --git a/src/apps/PswGen/CLI/cli.cpp b/src/apps/PswGen/CLI/cli.cpp
index 51ea2b6..2d2ca1c 100644
--- a/src/apps/PswGen/CLI/cli.cpp
+++ b/src/apps/PswGen/CLI/cli.cpp
@@ -18,7 +18,6 @@
*/
#include "cli.h"
-#include "version.h"
#include
#include
@@ -33,7 +32,7 @@
#include
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
# include
# include
#endif
@@ -42,7 +41,6 @@
#endif
VER_EXPORT_VERSION_INFO()
-Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, eVaf::PswGen::CLI::Module)
//-------------------------------------------------------------------
@@ -124,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;
@@ -147,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);