Commit 76c30832 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

FileName: Support "~ -> homePath" substitution

Change-Id: Ie1ca69582cfd8893b0616e51d2d5c1b13e987b69
Reviewed-by: default avatarDaniel Teske <>
Reviewed-by: default avatarEike Ziller <>
parent 273dfa32
......@@ -480,7 +480,10 @@ FileName FileName::fromString(const QString &filename)
/// \a fileName is only passed through QDir::cleanPath
FileName FileName::fromUserInput(const QString &filename)
return FileName(QDir::cleanPath(filename));
QString clean = QDir::cleanPath(filename);
if (clean.startsWith(QLatin1String("~/")))
clean = QDir::homePath() + clean.midRef(1);
return FileName(clean);
FileName::FileName(const QString &string)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment