Remove debug messages 39/11939/3
authorRomain Forlot <romain.forlot@iot.bzh>
Tue, 31 Oct 2017 13:00:23 +0000 (14:00 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 14 Nov 2017 13:32:34 +0000 (13:32 +0000)
Change-Id: I465e3ed3e4cb6dadd808437133bddb56ed50c72e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
app/main.cpp
app/qlibwindowmanager.cpp

index ca527e6..7722a0a 100644 (file)
@@ -68,9 +68,11 @@ int main(int argc, char *argv[])
         if(qwm->init(port,secret) != 0){
             exit(EXIT_FAILURE);
         }
+        // Request a surface as described in layers.json windowmanager’s file
         if (qwm->requestSurface(json_object_new_string(myname.c_str())) != 0) {
             exit(EXIT_FAILURE);
         }
+        // Create an event callback against an event type. Here a lambda is called when SyncDraw event occurs
         qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, [qwm, myname](json_object *object) {
             fprintf(stderr, "Surface got syncDraw!\n");
             qwm->endDraw(json_object_new_string(myname.c_str()));
@@ -78,6 +80,7 @@ int main(int argc, char *argv[])
 
         // HomeScreen
         hs->init(port, token.c_str());
+        // Set the event handler for Event_TapShortcut which will activate the surface for windowmanager
         hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [qwm, myname](json_object *object){
             qDebug("object %s", json_object_to_json_string(object));
             json_object *appnameJ = nullptr;
index 370f9f7..7ad69f7 100644 (file)
@@ -32,14 +32,9 @@ int QLibWindowmanager::requestSurface(json_object *label) {
 }
 
 int QLibWindowmanager::activateSurface(json_object *label) {
-    qDebug() << "activateSurface applabel: " << applabel.c_str();
     json_object *obj = json_object_new_object();
-    qDebug() << "DrawingName: " << wm->kKeyDrawingName;
     json_object_object_add(obj, wm->kKeyDrawingName, label);
-    qDebug() << "DrawingArea: " << wm->kKeyDrawingArea;
     json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full"));
-    qDebug() << "obj pointer: " << obj;
-    qDebug() << "activateSurface end obj: " << json_object_get_string(obj);
 
     return this->wm->activateSurface(obj);
 }
@@ -52,7 +47,6 @@ int QLibWindowmanager::deactivateSurface(json_object *label) {
 
 int QLibWindowmanager::endDraw(json_object *label) {
     json_object *obj = json_object_new_object();
-    qDebug() << "endDraw label: " << json_object_get_string(label);
     json_object_object_add(obj, wm->kKeyDrawingName, label);
     return this->wm->endDraw(obj);
     }
@@ -67,7 +61,6 @@ void QLibWindowmanager::slotActivateSurface(){
     if(!isActive){
         qDebug("Let's show HVAC");
         isActive = true;
-        qDebug() << "slotActivateSurface applabel: " << applabel.c_str();
         this->activateSurface(json_object_new_string(applabel.c_str()));
     }
 }