forked from qt-creator/qt-creator
Utils: Return FilePath from PathChooser::homePath()
Change-Id: Ib67435cb828e6bb55f76bfd6eb13165f46922c00 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user