Utils: Return FilePath from PathChooser::homePath()

Change-Id: Ib67435cb828e6bb55f76bfd6eb13165f46922c00
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-08-16 09:43:03 +02:00
parent 906348ed50
commit 0416e15612
7 changed files with 12 additions and 13 deletions

View File

@@ -641,14 +641,14 @@ QString PathChooser::label()
return tr("Path:");
}
QString PathChooser::homePath()
FilePath PathChooser::homePath()
{
// Return 'users/<name>/Documents' on Windows, since Windows explorer
// does not let people actually display the contents of their home
// directory. Alternatively, create a QtCreator-specific directory?
if (HostOsInfo::isWindowsHost())
return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
return QDir::homePath();
return FilePath::fromString(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
return FilePath::fromString(QDir::homePath());
}
/*!