diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@digia.com> | 2013-01-24 13:53:58 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-28 14:11:23 +0100 |
commit | f298e559c5dc745550932343036435aba129cf50 (patch) | |
tree | 3502d8c885b1d48103757c68df873a658e532396 /src/gui/dialogs | |
parent | 71b185ebb992fb8d6eeac36f08afdb297a0d290f (diff) |
Use QDir::homePath() for tilde expansion
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 <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qfiledialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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]; |