diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2014-06-16 11:58:29 (GMT) |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2014-09-01 15:49:07 (GMT) |
commit | 997d626173d9aba5b01b35e4d95ad162771ba789 (patch) | |
tree | 774c1b814c9f933d32a58a2c42183a438eca7d15 /tests | |
parent | 93c137ea29f011a267e22fa644a40aba6e3e2d22 (diff) | |
download | Qt-997d626173d9aba5b01b35e4d95ad162771ba789.zip Qt-997d626173d9aba5b01b35e4d95ad162771ba789.tar.gz Qt-997d626173d9aba5b01b35e4d95ad162771ba789.tar.bz2 |
Replace all ocurrences of NSApp with [NSApplication sharedApplication].
The former returns an id and the latter returns an NSApplication*. This
gives us the benefits of static typing and resolves a build error on
OS X 10.10.
Task-number: QTBUG-39644
Change-Id: I62939b168f391beb846f8a1c5ae789e45bceb858
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qfontdialog/tst_qfontdialog_mac_helpers.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qfontdialog/tst_qfontdialog_mac_helpers.mm b/tests/auto/qfontdialog/tst_qfontdialog_mac_helpers.mm index 978133a..52b38a2 100644 --- a/tests/auto/qfontdialog/tst_qfontdialog_mac_helpers.mm +++ b/tests/auto/qfontdialog/tst_qfontdialog_mac_helpers.mm @@ -45,7 +45,7 @@ void click_cocoa_button() { QMacCocoaAutoReleasePool pool; - NSArray *windows = [NSApp windows]; + NSArray *windows = [[NSApplication sharedApplication] windows]; for (NSWindow *window in windows) { // This is NOT how one should do RTTI, but since I don't want to leak the class too much... if ([[window delegate] respondsToSelector:@selector(qtFont)]) { @@ -54,7 +54,8 @@ void click_cocoa_button() if ([view isKindOfClass:[NSButton class]] && [[static_cast<NSButton *>(view) title] isEqualTo:@"OK"]) { [static_cast<NSButton *>(view) performClick:view]; - [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint + [[NSApplication sharedApplication] postEvent:[NSEvent + otherEventWithType:NSApplicationDefined location:NSZeroPoint modifierFlags:0 timestamp:0. windowNumber:0 context:0 subtype:SHRT_MAX data1:0 data2:0] atStart:NO]; |