Use g_filename_to_uri

This commit is contained in:
Ilya Fedin 2020-11-08 00:29:58 +04:00 committed by John Preston
parent e0de4dbc5e
commit acaf8e4931
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ void UnsafeLaunch(const QString &filepath) {
const auto absolutePath = QFileInfo(filepath).absoluteFilePath();
if (!g_app_info_launch_default_for_uri(
("file://" + absolutePath).toUtf8(),
g_filename_to_uri(absolutePath.toUtf8(), nullptr, nullptr),
nullptr,
nullptr)) {
QDesktopServices::openUrl(QUrl::fromLocalFile(filepath));