qtplugininfo: Print the plugin name the metadata is from
authorThiago Macieira <thiago.macieira@intel.com>
Mon, 16 Feb 2015 21:25:24 +0000 (13:25 -0800)
committerThiago Macieira <thiago.macieira@intel.com>
Thu, 26 Mar 2015 17:23:34 +0000 (17:23 +0000)
If there are more than one files passed on the command-line. Like grep.

Change-Id: I1a800c709d3543699131ffff13c37f584d830ff6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
src/qtplugininfo/qtplugininfo.cpp

index e3019c7..3cab60e 100644 (file)
@@ -74,6 +74,8 @@ int main(int argc, char** argv)
             return 1;
         }
         const QJsonDocument doc(loader.metaData());
+        if (parser.positionalArguments().size() != 1)
+            std::cout << pluginNativeName.constData() << ": ";
         std::cout << doc.toJson().constData();
     }