From f298e559c5dc745550932343036435aba129cf50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Thu, 24 Jan 2013 13:53:58 +0200 Subject: Use QDir::homePath() for tilde expansion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VxWorks does not have concept of users and therefore has no function getpwnam. Use QDir::homePath() which returns actually QDir::rootPath() if there is no HOME env variable set. Change-Id: I0786ace2c05a14380dd725384972a19ccc07d916 (cherry picked from qtbase/2d8a4c2d3f86e3ae40b4a388de57021b98b9778d) Reviewed-by: Samuel Rødal --- src/gui/dialogs/qfiledialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 29776b3ee8..aeb84f4932 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -887,7 +887,9 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded } else { QString userName = tokens.first(); userName.remove(0, 1); -#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) +#if defined(Q_OS_VXWORKS) + const QString homePath = QDir::homePath(); +#elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) passwd pw; passwd *tmpPw; char buf[200]; -- cgit v1.2.3