Merge pull request #1425 from shenlebantongying/fix/mac-open-in-systemviewer

fix: "Open Image in System Viewer" doesn't work on macOS
This commit is contained in:
xiaoyifang 2024-03-20 13:19:03 +08:00 committed by GitHub
commit 728fa4850c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1799,11 +1799,11 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
if ( !handler->isEmpty() ) { if ( !handler->isEmpty() ) {
connect( handler, &ResourceToSaveHandler::done, this, [ fileName ]() { connect( handler, &ResourceToSaveHandler::done, this, [ fileName ]() {
QDesktopServices::openUrl( fileName ); QDesktopServices::openUrl( QUrl::fromLocalFile( fileName ) );
} ); } );
} }
else { else {
QDesktopServices::openUrl( fileName ); QDesktopServices::openUrl( QUrl::fromLocalFile( fileName ) );
} }
} }
} }