summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs/qprintdialog_mac.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-01-02 13:58:36 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-01-02 19:01:30 +0100
commit351d3e50f993014ca6b17817c87d12153ca2f617 (patch)
treea05545600c86fca1ecc90d846c709e3db6df4ebf /src/printsupport/dialogs/qprintdialog_mac.mm
parent7a37114af92fcaa6f8ed2eb17a4632b4880c8bbe (diff)
macOS: Stop using the deprecated [NSWorkspace openFile:] API
We can use openURL instead, which also opens local files in the associated application. Pick-to: 6.5 Change-Id: Ieddc6fb68d6b9e64195ed261953b9fffb6b0b73e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/printsupport/dialogs/qprintdialog_mac.mm')
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_mac.mm b/src/printsupport/dialogs/qprintdialog_mac.mm
index 6671afae52..b1b56dbf54 100644
--- a/src/printsupport/dialogs/qprintdialog_mac.mm
+++ b/src/printsupport/dialogs/qprintdialog_mac.mm
@@ -118,7 +118,7 @@ QT_USE_NAMESPACE
// happen synchronously after the dialog is accepted, so we can defer
// the opening of the file to the next runloop pass.
dispatch_async(dispatch_get_main_queue(), ^{
- [NSWorkspace.sharedWorkspace openFile:fileName.toNSString()];
+ [NSWorkspace.sharedWorkspace openURL:[NSURL fileURLWithPath:fileName.toNSString()]];
});
} else if (dest == kPMDestinationProcessPDF) {
qWarning("Printing workflows are not supported");