Got rid of warnings in wayland plugin source.
authorSamuel Rødal <samuel.rodal@nokia.com>
Thu, 1 Mar 2012 12:56:07 +0000 (13:56 +0100)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 2 Mar 2012 12:25:20 +0000 (13:25 +0100)
Change-Id: Id3b39213da79daff2ea952eb0ba90272f98a7da7
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp
src/plugins/platforms/wayland/qwaylanddatasource.cpp
src/plugins/platforms/wayland/qwaylanddisplay.cpp
src/plugins/platforms/wayland/qwaylanddnd.cpp
src/plugins/platforms/wayland/qwaylandshellsurface.cpp
src/plugins/platforms/wayland/qwaylandshellsurface.h

index d39628a..3b82ee5 100644 (file)
@@ -113,6 +113,7 @@ void QWaylandDataDeviceManager::enter(void *data,
 void QWaylandDataDeviceManager::leave(void *data,
               struct wl_data_device *wl_data_device)
 {
+    Q_UNUSED(wl_data_device);
     QWaylandDataDeviceManager *data_device_manager = static_cast<QWaylandDataDeviceManager *>(data);
 //    QWindowSystemInterface::handleDrag(data_device_manager->m_drag_current_event_window->window(),0,QPoint(0,0),Qt::IgnoreAction);
     data_device_manager->m_drag_can_drop = false;
@@ -148,12 +149,15 @@ void QWaylandDataDeviceManager::motion(void *data,
 void QWaylandDataDeviceManager::drop(void *data,
              struct wl_data_device *wl_data_device)
 {
+    Q_UNUSED(wl_data_device);
     QWaylandDataDeviceManager *data_device_manager = static_cast<QWaylandDataDeviceManager *>(data);
     QWindow *window = data_device_manager->m_drag_current_event_window->window();
     QMimeData *mime = data_device_manager->m_drag_data_offer;
     QPoint point = data_device_manager->m_drag_position;
     Qt::DropActions allActions =  Qt::CopyAction | Qt::MoveAction | Qt::LinkAction;
 
+    Q_UNUSED(window);
+    Q_UNUSED(mime);
 //    QWindowSystemInterface::handleDrop(window,mime,point,allActions);
 }
 
@@ -162,6 +166,7 @@ void QWaylandDataDeviceManager::selection(void *data,
                                             struct wl_data_device *wl_data_device,
                                             struct wl_data_offer *id)
 {
+    Q_UNUSED(wl_data_device);
     QWaylandDataDeviceManager *handler = static_cast<QWaylandDataDeviceManager *>(data);
     QWaylandDataOffer *mime = handler->m_selection_data_offer;
     delete mime;
@@ -283,6 +288,7 @@ void QWaylandDataDeviceManager::cancelDrag()
 
 void QWaylandDataDeviceManager::createAndSetSelectionSource(QMimeData *mimeData, QClipboard::Mode mode)
 {
+    Q_UNUSED(mode);
     QWaylandDataSource *transfer_source = m_selection_data_source;
     delete transfer_source;
 
index 6398f18..94058f4 100644 (file)
@@ -62,6 +62,7 @@ void QWaylandDataSource::data_source_send(void *data,
              const char *mime_type,
              int32_t fd)
 {
+    Q_UNUSED(wl_data_source);
     QWaylandDataSource *self = static_cast<QWaylandDataSource *>(data);
     QString mimeType = QString::fromLatin1(mime_type);
     QByteArray content = QWaylandMimeHelper::getByteArray(self->m_mime_data, mimeType);
index 168f97e..73b46c4 100644 (file)
@@ -228,6 +228,9 @@ void QWaylandDisplay::outputHandleGeometry(void *data,
                                            int subpixel,
                                            const char *make, const char *model)
 {
+    Q_UNUSED(subpixel);
+    Q_UNUSED(make);
+    Q_UNUSED(model);
     QWaylandDisplay *waylandDisplay = static_cast<QWaylandDisplay *>(data);
     QRect outputRect = QRect(x, y, physicalWidth, physicalHeight);
     waylandDisplay->createNewScreen(output,outputRect);
index 4276759..325c1fd 100644 (file)
@@ -67,15 +67,18 @@ Qt::DropAction QWaylandDrag::drag(QDrag *m_drag)
 
 void QWaylandDrag::move(const QMouseEvent *me)
 {
+    Q_UNUSED(me);
     qFatal("This function should not be called");
 }
 
 bool QWaylandDrag::canDrop() const
 {
+    return false;
 }
 
 void QWaylandDrag::drop(const QMouseEvent *me)
 {
+    Q_UNUSED(me);
 }
 
 void QWaylandDrag::cancel()
@@ -85,5 +88,5 @@ void QWaylandDrag::cancel()
 
 Qt::DropAction QWaylandDrag::executedDropAction() const
 {
-    Qt::CopyAction;
+    return Qt::CopyAction;
 }
index 2bd9cef..79788a3 100644 (file)
@@ -64,6 +64,14 @@ void QWaylandShellSurface::configure(void *data,
     shell_surface->m_window->configure(time,edges,0,0,width,height);
 }
 
+void QWaylandShellSurface::popup_done(void *data,
+                                      struct wl_shell_surface *wl_shell_surface)
+{
+    Q_UNUSED(data);
+    Q_UNUSED(wl_shell_surface);
+}
+
 const wl_shell_surface_listener QWaylandShellSurface::m_shell_surface_listener = {
-    QWaylandShellSurface::configure
+    QWaylandShellSurface::configure,
+    QWaylandShellSurface::popup_done
 };
index 79fe164..4c77b70 100644 (file)
@@ -52,6 +52,7 @@ public:
     QWaylandShellSurface(struct wl_shell_surface *shell_surface, QWaylandWindow *window);
 
     struct wl_shell_surface *handle() const { return m_shell_surface; }
+
 private:
     struct wl_shell_surface *m_shell_surface;
     QWaylandWindow *m_window;
@@ -62,6 +63,8 @@ private:
               uint32_t edges,
               int32_t width,
               int32_t height);
+    static void popup_done(void *data,
+                struct wl_shell_surface *wl_shell_surface);
     static const struct wl_shell_surface_listener m_shell_surface_listener;
 };