Fix a bunch of Mac/clang specific warnings
Change-Id: I0ecc67d58fb7e727a88a5f546eeca01ff7554502 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>bb10
parent
46bef9f29f
commit
a59906e0f3
|
|
@ -779,7 +779,7 @@ public:
|
|||
};
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED enum DeviceType {
|
||||
enum QT_DEPRECATED DeviceType {
|
||||
TouchScreen,
|
||||
TouchPad
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
//Must match QStandardPaths::StandardLocation
|
||||
QT_DEPRECATED enum StandardLocation {
|
||||
enum QT_DEPRECATED StandardLocation {
|
||||
DesktopLocation,
|
||||
DocumentsLocation,
|
||||
FontsLocation,
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@
|
|||
- (void)notificationHandler;//:(NSNotification *)notification;
|
||||
- (void)remove;
|
||||
- (void)setEngine:(QCoreWlanEngine *)coreEngine;
|
||||
- (QCoreWlanEngine *)engine;
|
||||
- (void)dealloc;
|
||||
|
||||
@property (assign) QCoreWlanEngine* engine;
|
||||
|
|
@ -86,7 +87,6 @@
|
|||
@end
|
||||
|
||||
@implementation QT_MANGLE_NAMESPACE(QNSListener)
|
||||
@synthesize engine;
|
||||
|
||||
- (id) init
|
||||
{
|
||||
|
|
@ -113,6 +113,11 @@
|
|||
[locker unlock];
|
||||
}
|
||||
|
||||
-(QCoreWlanEngine *)engine
|
||||
{
|
||||
return engine;
|
||||
}
|
||||
|
||||
-(void)remove
|
||||
{
|
||||
[locker lock];
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions)
|
|||
Qt::DropActions actions = Qt::IgnoreAction;
|
||||
|
||||
for (int i=0; dnd_enums[i].mac_code; i++) {
|
||||
if ((dnd_enums[i].mac_code == NSDragOperationEvery))
|
||||
if (dnd_enums[i].mac_code == NSDragOperationEvery)
|
||||
continue;
|
||||
|
||||
if (nsActions & dnd_enums[i].mac_code)
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ void QCocoaInputContext::connectSignals()
|
|||
|
||||
void QCocoaInputContext::focusObjectChanged(QObject *focusObject)
|
||||
{
|
||||
Q_UNUSED(focusObject);
|
||||
mWindow = QGuiApplication::focusWindow();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ QMacPasteboardMime::~QMacPasteboardMime()
|
|||
*/
|
||||
int QMacPasteboardMime::count(QMimeData *mimeData)
|
||||
{
|
||||
Q_UNUSED(mimeData);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ static QTouchDevice *touchDevice = 0;
|
|||
int windowHeight = [window frame].size.height;
|
||||
NSPoint windowPoint = [theEvent locationInWindow];
|
||||
NSPoint nsViewPoint = [self convertPoint: windowPoint fromView: nil];
|
||||
QPoint qtWindowPoint = QPoint(windowPoint.x, windowHeight - windowPoint.y);
|
||||
QPoint qtWindowPoint = QPoint(nsViewPoint.x, windowHeight - nsViewPoint.y);
|
||||
NSPoint screenPoint = [window convertBaseToScreen : windowPoint];
|
||||
QPoint qtScreenPoint = QPoint(screenPoint.x, qt_mac_flipYCoordinate(screenPoint.y));
|
||||
|
||||
|
|
@ -1079,6 +1079,7 @@ static QTouchDevice *touchDevice = 0;
|
|||
|
||||
- (void)draggedImage:(NSImage*) img endedAt:(NSPoint) point operation:(NSDragOperation) operation
|
||||
{
|
||||
Q_UNUSED(img);
|
||||
QCocoaDrag* nativeDrag = static_cast<QCocoaDrag *>(QGuiApplicationPrivate::platformIntegration()->drag());
|
||||
nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation));
|
||||
|
||||
|
|
@ -1087,7 +1088,7 @@ static QTouchDevice *touchDevice = 0;
|
|||
m_buttons &= QFlag(~int(Qt::LeftButton));
|
||||
|
||||
NSPoint windowPoint = [self convertPoint: point fromView: nil];
|
||||
QPoint qtWindowPoint(point.x, point.y);
|
||||
QPoint qtWindowPoint(windowPoint.x, windowPoint.y);
|
||||
|
||||
NSWindow *window = [self window];
|
||||
NSPoint screenPoint = [window convertBaseToScreen :point];
|
||||
|
|
|
|||
|
|
@ -154,7 +154,6 @@ QMacCGContext::QMacCGContext(QPainter *p)
|
|||
if (devType == QInternal::Widget) {
|
||||
QRegion clip = p->paintEngine()->systemClip();
|
||||
QTransform native = p->deviceTransform();
|
||||
QTransform logical = p->combinedTransform();
|
||||
|
||||
if (p->hasClipping()) {
|
||||
QRegion r = p->clipRegion();
|
||||
|
|
|
|||
|
|
@ -2117,7 +2117,7 @@ QMacStyle::~QMacStyle()
|
|||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
|
||||
[d->nsscroller release];
|
||||
[reinterpret_cast<NSScroller*>(d->nsscroller) release];
|
||||
|
||||
NotificationReceiver *receiver = static_cast<NotificationReceiver *>(d->receiver);
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:receiver];
|
||||
|
|
@ -2148,12 +2148,12 @@ QPixmap QMacStylePrivate::generateBackgroundPattern() const
|
|||
*/
|
||||
void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QBrush &brush)
|
||||
{
|
||||
#if 0
|
||||
QPoint dummy;
|
||||
const QPaintDevice *target = painter->device();
|
||||
const QPaintDevice *redirected = QPainter::redirected(target, &dummy);
|
||||
//const bool usePainter = redirected && redirected != target;
|
||||
|
||||
#if 0
|
||||
if (!usePainter && qt_mac_backgroundPattern
|
||||
&& qt_mac_backgroundPattern->cacheKey() == brush.texture().cacheKey()) {
|
||||
|
||||
|
|
@ -2233,7 +2233,7 @@ void QMacStyle::polish(QWidget* w)
|
|||
HIThemeMenuDrawInfo mtinfo;
|
||||
mtinfo.version = qt_mac_hitheme_version;
|
||||
mtinfo.menuType = kThemeMenuTypePopUp;
|
||||
HIRect rect = CGRectMake(0, 0, px.width(), px.height());
|
||||
// HIRect rect = CGRectMake(0, 0, px.width(), px.height());
|
||||
// ###
|
||||
//HIThemeDrawMenuBackground(&rect, &mtinfo, QCFType<CGContextRef>(qt_mac_cg_context(&px)),
|
||||
// kHIThemeOrientationNormal);
|
||||
|
|
@ -3889,7 +3889,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
if (const QStyleOptionTabV3 *tabOptV3 = qstyleoption_cast<const QStyleOptionTabV3 *>(opt)) {
|
||||
if (tabOptV3->documentMode) {
|
||||
p->save();
|
||||
QRect tabRect = tabOptV3->rect;
|
||||
// QRect tabRect = tabOptV3->rect;
|
||||
drawTabShape(p, tabOptV3);
|
||||
p->restore();
|
||||
return;
|
||||
|
|
@ -6652,7 +6652,6 @@ QMacCGContext::QMacCGContext(QPainter *p)
|
|||
if (devType == QInternal::Widget) {
|
||||
QRegion clip = p->paintEngine()->systemClip();
|
||||
QTransform native = p->deviceTransform();
|
||||
QTransform logical = p->combinedTransform();
|
||||
|
||||
if (p->hasClipping()) {
|
||||
QRegion r = p->clipRegion();
|
||||
|
|
|
|||
Loading…
Reference in New Issue