X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;f=src%2Fapps%2FPswGen%2FCLI%2Fcli.cpp;h=2d2ca1cd55a9b0067acf0073610e65adac82f193;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=56a49fbaed94fa684806b3f92220d0bf94e0cb90;hpb=36bd93cf4263b118366b3db2d26e8efb1ac1b690;p=evaf
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);