problem with QDir::homePath()
[GNU/Linux, Qt 4.8]
in my environment, but
returns “/” instead of “/home/wl”.
How comes? For debugging, I’ve also used getenv() at the very same place in the code, and it correctly returns “/home/wl”.Werner
The homePath is extracted from the HOME environment variable. If that is empty, the filesystem root is used:
So it seems your HOME env variable got lost during application startup. You should check that with
- qDebug() << qgetenv("HOME");