get rid of annoying warning messages on OSX

metadata
Wenzel Jakob 2013-12-03 22:32:18 +01:00
parent 065974cd83
commit f6c379fb87
1 changed files with 5 additions and 0 deletions

View File

@ -60,12 +60,17 @@ void __mts_init_cocoa() {
} }
void __mts_set_appdefaults() { void __mts_set_appdefaults() {
if ([NSApp respondsToSelector:@selector(invalidateRestorableState)])
[NSApp invalidateRestorableState];
#if 0
/* Disable annoying OSX synchronization feature. It's not supported by Qt in any case.. */ /* Disable annoying OSX synchronization feature. It's not supported by Qt in any case.. */
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
if (![prefs boolForKey: @"ApplePersistenceIgnoreState"]) { if (![prefs boolForKey: @"ApplePersistenceIgnoreState"]) {
[prefs setBool: YES forKey: @"ApplePersistenceIgnoreState"]; [prefs setBool: YES forKey: @"ApplePersistenceIgnoreState"];
[prefs synchronize]; [prefs synchronize];
} }
#endif
} }
MTS_NAMESPACE_END MTS_NAMESPACE_END