mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Use g_filename_to_uri
This commit is contained in:
@@ -82,7 +82,7 @@ void UnsafeLaunch(const QString &filepath) {
|
|||||||
const auto absolutePath = QFileInfo(filepath).absoluteFilePath();
|
const auto absolutePath = QFileInfo(filepath).absoluteFilePath();
|
||||||
|
|
||||||
if (!g_app_info_launch_default_for_uri(
|
if (!g_app_info_launch_default_for_uri(
|
||||||
("file://" + absolutePath).toUtf8(),
|
g_filename_to_uri(absolutePath.toUtf8(), nullptr, nullptr),
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr)) {
|
nullptr)) {
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(filepath));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(filepath));
|
||||||
|
Reference in New Issue
Block a user