summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestutil_macos.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestutil_macos.mm')
-rw-r--r--src/testlib/qtestutil_macos.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testlib/qtestutil_macos.mm b/src/testlib/qtestutil_macos.mm
index 880cd0f91f..e6638e5cb8 100644
--- a/src/testlib/qtestutil_macos.mm
+++ b/src/testlib/qtestutil_macos.mm
@@ -53,8 +53,11 @@ namespace QTestPrivate {
to start with a clean slate and prevents the "previous restore failed"
dialog from showing if there was a test crash.
*/
- void disableWindowRestore() {
- [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"ApplePersistenceIgnoreState"];
+ void disableWindowRestore()
+ {
+ [NSUserDefaults.standardUserDefaults registerDefaults:@{
+ @"ApplePersistenceIgnoreState" : @YES
+ }];
}
bool macCrashReporterWillShowDialog()