qdbus: Don't print a newline on void replies
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 19 Oct 2012 04:11:23 +0000 (21:11 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 19 Oct 2012 21:48:45 +0000 (23:48 +0200)
Only print something if there was actually something coming from the
peer.

Task-number: QTBUG-22482
Change-Id: I4536871484664ed3056cc20de7e49a176cf5a8b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
src/qdbus/qdbus/qdbus.cpp

index 4c1d615..0ce6563 100644 (file)
@@ -107,7 +107,7 @@ static void printArg(const QVariant &v)
         else
             printf("qdbus: I don't know how to display an argument of type '%s', run with --literal.\n",
                    qPrintable(arg.currentSignature()));
-    } else {
+    } else if (v.userType() != QVariant::Invalid) {
         printf("%s\n", qPrintable(v.toString()));
     }
 }