Cocoa: silence warnings about unused variables
authorBradley T. Hughes <bradley.hughes@nokia.com>
Wed, 21 Mar 2012 09:29:24 +0000 (10:29 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 26 Mar 2012 12:02:07 +0000 (14:02 +0200)
Silence warnings about unused function parameters and local variables
while building the Cocoa platform plugin.

Change-Id: I6aedc4cb21c5fb48d2d6e501561473d3f7112aed
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
src/plugins/platforms/cocoa/qcocoaclipboard.mm
src/plugins/platforms/cocoa/qcocoacursor.mm
src/plugins/platforms/cocoa/qnsview.mm
src/plugins/platforms/cocoa/qnsviewaccessibility.mm

index 02c8d92..3d286c8 100644 (file)
@@ -98,7 +98,7 @@ public:
     virtual QFixed emSquareSize() const;
 
     virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
-    virtual int glyphMargin(QFontEngineGlyphCache::Type type) { return 0; }
+    virtual int glyphMargin(QFontEngineGlyphCache::Type type) { Q_UNUSED(type); return 0; }
 
     static int antialiasingThreshold;
     static QFontEngineGlyphCache::Type defaultGlyphFormat;
index e405c81..947d910 100644 (file)
@@ -172,8 +172,8 @@ static void cleanupCocoaApplicationDelegate()
 // QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm
 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
 {
-/*
     Q_UNUSED(sender);
+/*
     // The reflection delegate gets precedence
     if (reflectionDelegate
         && [reflectionDelegate respondsToSelector:@selector(applicationShouldTerminate:)]) {
index 87c0854..f76174e 100644 (file)
@@ -81,6 +81,7 @@ bool QCocoaClipboard::supportsMode(QClipboard::Mode mode) const
 
 bool QCocoaClipboard::ownsMode(QClipboard::Mode mode) const
 {
+    Q_UNUSED(mode);
     return false;
 }
 
index 56f0dcf..bd8d32b 100644 (file)
@@ -59,6 +59,8 @@ QCocoaCursor::QCocoaCursor()
 
 void QCocoaCursor::changeCursor(QCursor *cursor, QWindow *window)
 {
+    Q_UNUSED(window);
+
     // Check for a suitable built-in NSCursor first:
     switch (cursor->shape()) {
     case Qt::ArrowCursor:
index 2b384a2..e76c027 100644 (file)
@@ -238,6 +238,7 @@ static QTouchDevice *touchDevice = 0;
 
 - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
 {
+    Q_UNUSED(theEvent);
     return YES;
 }
 
index d20246d..205a52c 100644 (file)
@@ -87,7 +87,6 @@
 - (id)accessibilityHitTest:(NSPoint)point {
     if (!m_accessibleRoot)
         return [super accessibilityHitTest:point];
-    NSPoint windowPoint = [[self window] convertScreenToBase:point];
 
     QAccessibleInterface *childInterface = m_accessibleRoot->childAt(point.x, qt_mac_flipYCoordinate(point.y));
     // No child found, meaning we hit the NSView