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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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()));
}