macOS: Silence warning about supporting secure state restoration
We don't support or implement state restorations via the AppKit state restoration APIs, but if we did, we would/should support secure state restoration. This is the default for apps linked against the macOS 14 SDK, but as we target versions below that as well we need to return YES here explicitly to silence a runtime warning. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-117745 Change-Id: I0145504a79e53499852832d23dc7d4d6838dfa1b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>bb10
parent
2b8e1a706e
commit
fc1549c014
|
|
@ -329,6 +329,23 @@ QT_USE_NAMESPACE
|
|||
else
|
||||
QWindowSystemInterface::handleFileOpenEvent(qurlString);
|
||||
}
|
||||
|
||||
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)application
|
||||
{
|
||||
if (@available(macOS 12, *)) {
|
||||
if ([reflectionDelegate respondsToSelector:_cmd])
|
||||
return [reflectionDelegate applicationSupportsSecureRestorableState:application];
|
||||
}
|
||||
|
||||
// We don't support or implement state restorations via the AppKit
|
||||
// state restoration APIs, but if we did, we would/should support
|
||||
// secure state restoration. This is the default for apps linked
|
||||
// against the macOS 14 SDK, but as we target versions below that
|
||||
// as well we need to return YES here explicitly to silence a runtime
|
||||
// warning.
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation QCocoaApplicationDelegate (Menus)
|
||||
|
|
|
|||
Loading…
Reference in New Issue