qtbase: Use Qt's standard paths if ExpandEnvironmentStrings fails
Don't try to expand environment variables if the value doesn't contain
any. And if ExpandEnvironmentStrings fails (which should never happen)
then use Qt's standard paths. Use Qt's logging to log warnings.
(cherry picked from commit 9a7e890f2dfad0794ca1e4c731c7cc74239d3d78)
- GnuPG-bug-id: T7700