[ RESOLVED ] New in 4.7.4: QDir::homePath() gives out empty string
-
Hmmm It seems the problem is resolved if I don't use the "Clear System Environment". I unchecked it, then re-built and it worked fine.
could it be the "SHELL" definitions? I can't think of anything other than that that's remotely related to this. I guess something caused Qt to have "QT_NO_FSFILEENGINE" defined and thus to return an empty string:
@// from Qt source: QDir.cpp
QString QDirPrivate()
{
#ifdef QT_NO_FSFILEENGINE
return QString();
#else
return cleanPath(QFSFileEngine::homePath());
#endif
}@ -
[quote author="ronM71" date="1315349947"]So, the "Clear system Environment" in Qt-Creator, causes those environment parameters to be "invisible" at runtime, for my system? If I deployed that same app on another machine, it would have been able to figure out the HOME string, right?[/quote]
Yes, so it is.
Instead of "Clear system Environment" you could just override it and reset or adjust the settings of some of the variables. Or just set the HOME variable to its original value (usually /Users/username on the Mac, with username being the short name, not the full name).