summaryrefslogtreecommitdiff
path: root/src/testlib/qtestutil_macos.mm
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-03-23 21:06:47 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-03-23 21:06:47 +0200
commit42e4ae042a4c86e58bcb8b6d2d59ba4a988285b4 (patch)
treea7f25b1d335a834a7c3ae104cee913ef3a4dd4fb /src/testlib/qtestutil_macos.mm
parent4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (diff)
parent168ff3419f256fdb35b586275d293fc0cd773fe1 (diff)
downloadqtbase-5.15.tar.gz
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl5.15
Change-Id: Iaff6b55275e50d19973e1020853d8622587069f9
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()