summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@digia.com>2013-01-04 14:40:01 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-23 10:38:54 +0100
commit2d8a4c2d3f86e3ae40b4a388de57021b98b9778d (patch)
treeb574c34b363ab934e2ed4882010cbb84c419569d /src/widgets
parentae229b91929955e7418da938bace6d0cc6a2cde5 (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.cpp4
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];