Revise string literal usage

This commit covers src/gui folder.
PR #16757.
This commit is contained in:
Chocobo1
2022-03-29 10:41:17 +08:00
committed by GitHub
parent 746fe7ba09
commit 75c93d72be
36 changed files with 275 additions and 280 deletions

View File

@@ -143,7 +143,7 @@ void Utils::Gui::openPath(const Path &path)
{
// Hack to access samba shares with QDesktopServices::openUrl
if (path.data().startsWith(u"//"))
QDesktopServices::openUrl(QUrl(QString::fromLatin1("file:") + path.toString()));
QDesktopServices::openUrl(QUrl(u"file:" + path.toString()));
else
QDesktopServices::openUrl(QUrl::fromLocalFile(path.data()));
}