Warning, /graphics/krita/3rdparty/ext_qt/0128-macOS-Do-not-append-defaultSuffix-in-save-dialog.patch is written in an unsupported language. File is not indexed.
0001 From ae88845f35e0243c4c0b973fb859cd4b6441dff0 Mon Sep 17 00:00:00 2001 0002 From: Alvin Wong <alvinhochun@gmail.com> 0003 Date: Sat, 7 May 2022 18:39:19 +0800 0004 Subject: [PATCH] macOS: Do not append defaultSuffix in save dialog 0005 0006 Doing this when sandboxing is active will break the sandboxing. 0007 NSSavePanel should append the file extension in most cases anyway. 0008 0009 See https://invent.kde.org/graphics/krita/-/merge_requests/1429#note_440796 0010 --- 0011 src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 7 ------- 0012 1 file changed, 7 deletions(-) 0013 0014 diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm 0015 index d1695ea860..9e68e63e95 100644 0016 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm 0017 +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm 0018 @@ -407,13 +407,6 @@ static QString strippedText(QString s) 0019 } else { 0020 QList<QUrl> result; 0021 QString filename = QString::fromNSString([[mSavePanel URL] path]).normalized(QString::NormalizationForm_C); 0022 - const QString defaultSuffix = mOptions->defaultSuffix(); 0023 - const QFileInfo fileInfo(filename); 0024 - // If neither the user or the NSSavePanel have provided a suffix, use 0025 - // the default suffix (if it exists). 0026 - if (fileInfo.suffix().isEmpty() && !defaultSuffix.isEmpty()) { 0027 - filename.append('.').append(defaultSuffix); 0028 - } 0029 result << QUrl::fromLocalFile(filename.remove(QLatin1String("___qt_very_unlikely_prefix_"))); 0030 return result; 0031 } 0032 -- 0033 2.24.1.windows.2 0034