Disable some debug prints in clipboard
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 11 May 2012 12:00:56 +0000 (15:00 +0300)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>
Tue, 15 May 2012 05:12:47 +0000 (07:12 +0200)
It is not desirable to have these printed in each and every app that
uses the clipboard, especially now that the selection handling is
relatively stable.

Change-Id: Idf6bab915fd9a4096ca77743d597b106267b99be
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/compositor/wayland_wrapper/wldatadevice.cpp
src/compositor/wayland_wrapper/wldatadevicemanager.cpp
src/compositor/wayland_wrapper/wldataoffer.cpp
src/compositor/wayland_wrapper/wldatasource.cpp

index be9ca8c..810f36a 100644 (file)
@@ -91,8 +91,8 @@ DataDevice::DataDevice(DataDeviceManager *data_device_manager, struct wl_client
     , m_sent_selection_time(0)
 {
 
-    static int i = 0;
-    qDebug() << "data device" << ++i;
+    //static int i = 0;
+    //qDebug() << "data device" << ++i;
     m_data_device_resource =
             wl_client_add_object(client,&wl_data_device_interface,&data_device_interface,id, this);
 }
@@ -112,7 +112,7 @@ void DataDevice::sendSelectionFocus()
             DataOffer *data_offer = source->dataOffer();
             wl_resource *client_resource =
                     data_offer->addDataDeviceResource(m_data_device_resource);
-            qDebug() << "sending data_offer for source" << source;
+            //qDebug() << "sending data_offer for source" << source;
             wl_data_device_send_selection(m_data_device_resource,client_resource);
             m_sent_selection_time = source->time();
         }
index 78e79b0..50c8a99 100644 (file)
@@ -250,7 +250,7 @@ bool DataDeviceManager::offerFromCompositorToClient(wl_resource *clientDataDevic
         return false;
 
     wl_client *client = clientDataDeviceResource->client;
-    qDebug("compositor offers %d types to %p", m_retainedData.formats().count(), client);
+    //qDebug("compositor offers %d types to %p", m_retainedData.formats().count(), client);
 
     struct wl_resource *selectionOffer =
              wl_client_new_object(client, &wl_data_offer_interface, &compositor_offer_interface, this);
@@ -279,8 +279,9 @@ void DataDeviceManager::comp_accept(wl_client *, wl_resource *, uint32_t, const
 
 void DataDeviceManager::comp_receive(wl_client *client, wl_resource *resource, const char *mime_type, int32_t fd)
 {
+    Q_UNUSED(client);
     DataDeviceManager *self = static_cast<DataDeviceManager *>(resource->data);
-    qDebug("client %p wants data for type %s from compositor", client, mime_type);
+    //qDebug("client %p wants data for type %s from compositor", client, mime_type);
     QByteArray content = QWaylandMimeHelper::getByteArray(&self->m_retainedData, QString::fromLatin1(mime_type));
     if (!content.isEmpty()) {
         QFile f;
index 5b1f969..4940fca 100644 (file)
@@ -105,7 +105,6 @@ void DataOffer::receive(wl_client *client, wl_resource *resource, const char *mi
 void DataOffer::destroy(wl_client *client, wl_resource *resource)
 {
     Q_UNUSED(client);
-    qDebug() << "dataOFFER DESTROY!";
     DataOffer *data_offer = static_cast<DataOffer *>(resource->data);
 
     if (data_offer->resourceListIsEmpty()) {
index 8b908d2..eab3c1e 100644 (file)
@@ -60,7 +60,6 @@ DataSource::DataSource(struct wl_client *client, uint32_t id, uint32_t time)
 
 DataSource::~DataSource()
 {
-    qDebug() << "destroying source";
     if (m_manager)
         m_manager->sourceDestroyed(this);
     wl_resource_destroy(m_data_source_resource);
@@ -94,7 +93,7 @@ void DataSource::offer(struct wl_client *client,
               const char *type)
 {
     Q_UNUSED(client);
-    qDebug() << "received offer" << type;
+    //qDebug() << "received offer" << type;
     static_cast<DataSource *>(resource->data)->m_offers.append(type);
 }