Fix warning about change of sign
authorThiago Macieira <thiago.macieira@intel.com>
Tue, 14 Aug 2012 11:21:34 +0000 (13:21 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 14 Aug 2012 18:20:51 +0000 (20:20 +0200)
method_relative_ is unsigned, so we can't store a -1 in it.

qobject.cpp(434): warning #68: integer conversion resulted in a change of sign
        callFunction_(0), method_offset_(0), method_relative_(-1)
                                                              ^

Change-Id: If8bf3835590ef2c26b9ca5010d638aa84675ff62
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/kernel/qobject.cpp

index 9f8b766..cf573ac 100644 (file)
@@ -431,7 +431,7 @@ QMetaCallEvent::QMetaCallEvent(QObject::QSlotObjectBase *slotO, const QObject *s
                                int nargs, int *types, void **args, QSemaphore *semaphore)
     : QEvent(MetaCall), slotObj_(slotO), sender_(sender), signalId_(signalId),
       nargs_(nargs), types_(types), args_(args), semaphore_(semaphore),
-      callFunction_(0), method_offset_(0), method_relative_(-1)
+      callFunction_(0), method_offset_(0), method_relative_(ushort(-1))
 {
     if (slotObj_)
         slotObj_->ref.ref();