macOS: Pass required parameters to NSOpenSavePanelDelegate callbacks
Change-Id: I0e0322734a077e4ee948128f3ba6c074514ccbb9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
b8a17ee135
commit
6906b0647a
@ -214,7 +214,7 @@ static QString strippedText(QString s)
|
||||
NSString *filepath = info.filePath().toNSString();
|
||||
NSURL *url = [NSURL fileURLWithPath:filepath isDirectory:info.isDir()];
|
||||
bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|
||||
|| [self panel:nil shouldEnableURL:url];
|
||||
|| [self panel:mOpenPanel shouldEnableURL:url];
|
||||
|
||||
[self updateProperties];
|
||||
[mSavePanel setNameFieldStringValue:selectable ? info.fileName().toNSString() : @""];
|
||||
@ -233,7 +233,7 @@ static QString strippedText(QString s)
|
||||
NSString *filepath = info.filePath().toNSString();
|
||||
NSURL *url = [NSURL fileURLWithPath:filepath isDirectory:info.isDir()];
|
||||
bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|
||||
|| [self panel:nil shouldEnableURL:url];
|
||||
|| [self panel:mSavePanel shouldEnableURL:url];
|
||||
|
||||
[mSavePanel setDirectoryURL: [NSURL fileURLWithPath:mCurrentDir]];
|
||||
[mSavePanel setNameFieldStringValue:selectable ? info.fileName().toNSString() : @""];
|
||||
@ -263,7 +263,7 @@ static QString strippedText(QString s)
|
||||
NSString *filepath = info.filePath().toNSString();
|
||||
NSURL *url = [NSURL fileURLWithPath:filepath isDirectory:info.isDir()];
|
||||
bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|
||||
|| [self panel:nil shouldEnableURL:url];
|
||||
|| [self panel:mSavePanel shouldEnableURL:url];
|
||||
|
||||
[self updateProperties];
|
||||
[mSavePanel setDirectoryURL: [NSURL fileURLWithPath:mCurrentDir]];
|
||||
|
Loading…
Reference in New Issue
Block a user