summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-12-09 22:54:04 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-12-24 02:04:12 +0000
commitb12db22fcf3ebd3dc5a7143a61745d408ab833aa (patch)
tree50f56c19024abd0cd1ca3a0a0d407059ef2ebef3 /src/corelib/io/qprocess.cpp
parentf95d64d075f8986919db216f7ca44930c37f4ec6 (diff)
Replace a few hardcoded paths with defaults from paths.h
This removes at least one special-case we had to have, in Android's lack of /etc/mnttab. Bionic's _PATH_MOUNTED is already /proc/mounts. Change-Id: I9407dcf22de6407c83b5fffd14fedc638586d0f9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 7ed319f5f1..64a59bc2c3 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -99,6 +99,10 @@ QT_END_NAMESPACE
#include <private/qcore_unix_p.h>
#endif
+#if QT_HAS_INCLUDE(<paths.h>)
+#include <paths.h>
+#endif
+
QT_BEGIN_NAMESPACE
/*!
@@ -2638,6 +2642,8 @@ QString QProcess::nullDevice()
{
#ifdef Q_OS_WIN
return QStringLiteral("\\\\.\\NUL");
+#elif defined(_PATH_DEVNULL)
+ return QStringLiteral(_PATH_DEVNULL);
#else
return QStringLiteral("/dev/null");
#endif