summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2010-11-20 16:27:26 +0100
committerJiang Jiang <jiang.jiang@nokia.com>2010-11-22 13:24:19 +0100
commitf4b2f4fa4a8b6ffecb2fcdb46b91f12d3820c5ac (patch)
tree48d774052872d865033db1dcdb65c9777c1b9142
parent538e7b8ddf45936bb274ed3230b591b3459edfa7 (diff)
downloadqt4-tools-f4b2f4fa4a8b6ffecb2fcdb46b91f12d3820c5ac.tar.gz
Fix some warnings on Mac
Reviewed-by: Fabien Freling
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm2
-rw-r--r--src/gui/image/qnativeimage.cpp2
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm1
-rw-r--r--src/gui/styles/qstyle.cpp2
-rw-r--r--src/gui/styles/qstyleoption.cpp4
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm1
6 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 82cfa24937..f2e4d53215 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -439,7 +439,7 @@ void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial,
priv:this];
[colorPanel setDelegate:static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate)];
}
- [delegate setResultSet:false];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) setResultSet:NO];
setCocoaPanelColor(initial);
[static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) showColorPanel];
}
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 0f7872e92c..c15474085f 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -256,6 +256,8 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /*
case QImage::Format_ARGB4444_Premultiplied:
cgflags = kCGImageAlphaPremultipliedFirst;
break;
+ default:
+ break;
}
#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index 9b07d64f70..383f05ef45 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -78,6 +78,7 @@
#import <private/qcocoaapplicationdelegate_mac_p.h>
#import <private/qcocoamenuloader_mac_p.h>
+#import <private/qcocoaapplication_mac_p.h>
#include <private/qapplication_p.h>
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 3ebfab2a2e..be8f794da6 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2456,6 +2456,8 @@ QDebug operator<<(QDebug debug, QStyle::State state)
qSort(states);
debug << states.join(QLatin1String(" | "));
debug << ')';
+#else
+ Q_UNUSED(state);
#endif
return debug;
}
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index 4780edfbc0..05ca793327 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5483,6 +5483,8 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
case QStyleOption::SO_GraphicsItem:
debug << "SO_GraphicsItem"; break;
}
+#else
+ Q_UNUSED(optionType);
#endif
return debug;
}
@@ -5496,6 +5498,8 @@ QDebug operator<<(QDebug debug, const QStyleOption &option)
debug << ',' << option.state;
debug << ',' << option.rect;
debug << ')';
+#else
+ Q_UNUSED(option);
#endif
return debug;
}
diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm
index b670186790..a22148e855 100644
--- a/src/gui/widgets/qcocoamenu_mac.mm
+++ b/src/gui/widgets/qcocoamenu_mac.mm
@@ -44,6 +44,7 @@
#ifdef QT_MAC_USE_COCOA
#import <private/qcocoamenu_mac_p.h>
#import <private/qcocoamenuloader_mac_p.h>
+#import <private/qcocoaapplication_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qapplication_p.h>
#include <private/qaction_p.h>