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>
This commit is contained in:
parent
ae229b9192
commit
2d8a4c2d3f
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user