Problem with QDir::homePath()
General and Desktop
8
Posts
4
Posters
7.8k
Views
1
Watching
-
-
The homePath is extracted from the HOME environment variable. If that is empty, the filesystem root is used:
qfilesystemengine_unix.cpp:
@
QString QFileSystemEngine::homePath()
{
QString home = QFile::decodeName(qgetenv("HOME"));
if (home.isNull())
home = rootPath();
return QDir::cleanPath(home);
}
@So it seems your HOME env variable got lost during application startup. You should check that with
@
qDebug() << qgetenv("HOME");
@