diff options
author | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2023-02-23 12:45:15 +0100 |
---|---|---|
committer | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2023-02-23 14:18:45 +0000 |
commit | 82194d7e9cd8dbc18ef2fae33d87c3d0ce144059 (patch) | |
tree | 9ca065a8c6734ecb5fe57618bcc8dca6a78c6874 /src/libs/3rdparty/libptyqt/ptyqt.cpp | |
parent | 61c09bcefbadac12d332e3bef52bef49c649f5bf (diff) |
Terminal: Add required 3rdparty libraries
Change-Id: Ic477e305f78632f5c454cd639dfc7e41fb643fe1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/libs/3rdparty/libptyqt/ptyqt.cpp')
-rw-r--r-- | src/libs/3rdparty/libptyqt/ptyqt.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/libs/3rdparty/libptyqt/ptyqt.cpp b/src/libs/3rdparty/libptyqt/ptyqt.cpp new file mode 100644 index 0000000000..3883395e22 --- /dev/null +++ b/src/libs/3rdparty/libptyqt/ptyqt.cpp @@ -0,0 +1,45 @@ +#include "ptyqt.h" +#include <utility> + +#ifdef Q_OS_WIN +#include "winptyprocess.h" +#include "conptyprocess.h" +#endif + +#ifdef Q_OS_UNIX +#include "unixptyprocess.h" +#endif + + +IPtyProcess *PtyQt::createPtyProcess(IPtyProcess::PtyType ptyType) +{ + switch (ptyType) + { +#ifdef Q_OS_WIN + case IPtyProcess::PtyType::WinPty: + return new WinPtyProcess(); + break; + case IPtyProcess::PtyType::ConPty: + return new ConPtyProcess(); + break; +#endif +#ifdef Q_OS_UNIX + case IPtyProcess::PtyType::UnixPty: + return new UnixPtyProcess(); + break; +#endif + case IPtyProcess::PtyType::AutoPty: + default: + break; + } + +#ifdef Q_OS_WIN + if (ConPtyProcess().isAvailable()) + return new ConPtyProcess(); + else + return new WinPtyProcess(); +#endif +#ifdef Q_OS_UNIX + return new UnixPtyProcess(); +#endif +} |