aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/libptyqt/ptyqt.cpp
diff options
context:
space:
mode:
authorMarcus Tillmanns <marcus.tillmanns@qt.io>2023-07-25 09:16:48 +0200
committerMarcus Tillmanns <marcus.tillmanns@qt.io>2023-07-26 14:06:38 +0000
commit79e839b29ffefa509ee71f78e4b7b057e3a74429 (patch)
tree3d25a0351016a9303ee780e79d5741f0b2cf2384 /src/libs/3rdparty/libptyqt/ptyqt.cpp
parent75d9dc2d313acca3ddf72809d2d2bec89b836844 (diff)
Terminal: Add mouse support
Change-Id: Ibeb8e13b5f8f75f16ec86f64536235587c844ffc Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/libs/3rdparty/libptyqt/ptyqt.cpp')
-rw-r--r--src/libs/3rdparty/libptyqt/ptyqt.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libs/3rdparty/libptyqt/ptyqt.cpp b/src/libs/3rdparty/libptyqt/ptyqt.cpp
index b3e7aa1b16..06fe449819 100644
--- a/src/libs/3rdparty/libptyqt/ptyqt.cpp
+++ b/src/libs/3rdparty/libptyqt/ptyqt.cpp
@@ -10,6 +10,15 @@
#include "unixptyprocess.h"
#endif
+bool PtyQt::isUsingConPTY()
+{
+#ifdef Q_OS_WIN
+ if (ConPtyProcess::isAvailable() && qgetenv("QTC_USE_WINPTY").isEmpty())
+ return true;
+#endif
+
+ return false;
+}
IPtyProcess *PtyQt::createPtyProcess(IPtyProcess::PtyType ptyType)
{
@@ -34,7 +43,7 @@ IPtyProcess *PtyQt::createPtyProcess(IPtyProcess::PtyType ptyType)
}
#ifdef Q_OS_WIN
- if (ConPtyProcess().isAvailable() && qgetenv("QTC_USE_WINPTY").isEmpty())
+ if (isUsingConPTY())
return new ConPtyProcess();
else
return new WinPtyProcess();
@@ -43,3 +52,5 @@ IPtyProcess *PtyQt::createPtyProcess(IPtyProcess::PtyType ptyType)
return new UnixPtyProcess();
#endif
}
+
+