QSystemTrayIcon: fix narrowing warning
authorMarc Mutz <marc.mutz@kdab.com>
Thu, 9 Aug 2012 13:43:56 +0000 (15:43 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 23 Aug 2012 16:05:31 +0000 (18:05 +0200)
GCC complained:

  warning: narrowing conversion of
  ‘((QSystemTrayIconSys*)this)->QSystemTrayIconSys::<anonymous>.QWidget::winId()’
  from ‘WId {aka long long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]

Change-Id: I63908c884b51db203ee0ed659a152af77c295292
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
src/widgets/util/qsystemtrayicon_x11.cpp

index 2939112..07d504e 100644 (file)
@@ -182,7 +182,7 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn) :
 
     // Request to be a tray window according to GNOME, NET WM Specification
     static Atom netwm_tray_atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", False);
-    long l[5] = { CurrentTime, SYSTEM_TRAY_REQUEST_DOCK, winId(), 0, 0 };
+    long l[5] = { CurrentTime, SYSTEM_TRAY_REQUEST_DOCK, static_cast<long>(winId()), 0, 0 };
     XEvent ev;
     memset(&ev, 0, sizeof(ev));
     ev.xclient.type = ClientMessage;