diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@digia.com> | 2013-01-04 14:40:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-23 10:38:54 +0100 |
commit | 2d8a4c2d3f86e3ae40b4a388de57021b98b9778d (patch) | |
tree | b574c34b363ab934e2ed4882010cbb84c419569d /src/widgets | |
parent | ae229b91929955e7418da938bace6d0cc6a2cde5 (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: I15fe15862c4491b56cfa13bbdb218ef00dfd1f15
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 88652271af..40920ad9ad 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -940,7 +940,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]; |