diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-23 12:42:32 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-23 12:44:08 (GMT) |
commit | f65ed7b51a573dd8429feecc19c7abe8a0a36114 (patch) | |
tree | 5ce70bc3ca67573b4a3b07c13e1a8a8be520f4bd /src/gui/kernel/qcocoawindowdelegate_mac_p.h | |
parent | 3464a05a94c4e638d91b2151d6aad70f78ea3087 (diff) | |
download | Qt-f65ed7b51a573dd8429feecc19c7abe8a0a36114.zip Qt-f65ed7b51a573dd8429feecc19c7abe8a0a36114.tar.gz Qt-f65ed7b51a573dd8429feecc19c7abe8a0a36114.tar.bz2 |
Remove some warnings in the Cocoa build.
After discussing with some of the Objective-C
people I have finally got a fair number of the
warnings to disappear in both 10.5 and 10.6. I
also took the opportunity to remove a bunch of
other warnings.
Reviewed by: Morten Sørvig
Diffstat (limited to 'src/gui/kernel/qcocoawindowdelegate_mac_p.h')
-rw-r--r-- | src/gui/kernel/qcocoawindowdelegate_mac_p.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac_p.h b/src/gui/kernel/qcocoawindowdelegate_mac_p.h index b171b47..1e1d668 100644 --- a/src/gui/kernel/qcocoawindowdelegate_mac_p.h +++ b/src/gui/kernel/qcocoawindowdelegate_mac_p.h @@ -63,15 +63,8 @@ QT_FORWARD_DECLARE_CLASS(QWidget) QT_FORWARD_DECLARE_CLASS(QSize) QT_FORWARD_DECLARE_CLASS(QWidgetData) -@interface QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) : NSObject { - QHash<NSWindow *, QWidget *> *m_windowHash; - QHash<NSDrawer *, QWidget *> *m_drawerHash; -} -+ (QT_MANGLE_NAMESPACE(QCocoaWindowDelegate)*)sharedDelegate; -- (void)becomeDelegteForWindow:(NSWindow *)window widget:(QWidget *)widget; -- (void)resignDelegateForWindow:(NSWindow *)window; -- (void)becomeDelegateForDrawer:(NSDrawer *)drawer widget:(QWidget *)widget; -- (void)resignDelegateForDrawer:(NSDrawer *)drawer; +#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5 +@protocol NSWindowDelegate <NSObject> - (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize; - (void)windowDidMiniaturize:(NSNotification*)notification; - (void)windowDidResize:(NSNotification *)notification; @@ -83,6 +76,25 @@ QT_FORWARD_DECLARE_CLASS(QWidgetData) - (void)windowDidResignMain:(NSNotification*)notification; - (void)windowDidBecomeKey:(NSNotification*)notification; - (void)windowDidResignKey:(NSNotification*)notification; +@end + +@protocol NSDrawerDelegate <NSObject> +- (NSSize)drawerWillResizeContents:(NSDrawer *)sender toSize:(NSSize)contentSize; +@end + +#endif + + + +@interface QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) : NSObject<NSWindowDelegate, NSDrawerDelegate> { + QHash<NSWindow *, QWidget *> *m_windowHash; + QHash<NSDrawer *, QWidget *> *m_drawerHash; +} ++ (QT_MANGLE_NAMESPACE(QCocoaWindowDelegate)*)sharedDelegate; +- (void)becomeDelegteForWindow:(NSWindow *)window widget:(QWidget *)widget; +- (void)resignDelegateForWindow:(NSWindow *)window; +- (void)becomeDelegateForDrawer:(NSDrawer *)drawer widget:(QWidget *)widget; +- (void)resignDelegateForDrawer:(NSDrawer *)drawer; - (void)dumpMaximizedStateforWidget:(QWidget*)qwidget window:(NSWindow *)window; - (void)syncSizeForWidget:(QWidget *)qwidget toSize:(const QSize &)newSize @@ -90,6 +102,5 @@ QT_FORWARD_DECLARE_CLASS(QWidgetData) - (NSSize)closestAcceptableSizeForWidget:(QWidget *)qwidget window:(NSWindow *)window withNewSize:(NSSize)proposedSize; - (QWidget *)qt_qwidgetForWindow:(NSWindow *)window; -- (void)checkForMove:(const NSRect &)newRect forWidget:(QWidget *)qwidget; @end #endif |