From 7cf4a74e8a1a548d74f58e7f7f16796fa11a6b61 Mon Sep 17 00:00:00 2001 From: Wolf Bergenheim Date: Thu, 18 Nov 2010 07:53:46 +0200 Subject: Updated usage help and added timings flag -i --- resourceqt-client/commandlineparser.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'resourceqt-client/commandlineparser.cpp') diff --git a/resourceqt-client/commandlineparser.cpp b/resourceqt-client/commandlineparser.cpp index 24658ea..cb477fd 100644 --- a/resourceqt-client/commandlineparser.cpp +++ b/resourceqt-client/commandlineparser.cpp @@ -28,7 +28,8 @@ QHash CommandLineParser::resourceValues; CommandLineParser::CommandLineParser(): allResources(), optResources(), autoRelease(false), alwaysReply(false), - verbose(false), allowUnkownResourceClass(false), output(stdout), prefix("") + verbose(false), allowUnkownResourceClass(false), output(stdout), prefix(""), + timings(false) { resourceValues["AudioPlayback"] = ResourcePolicy::AudioPlaybackType; resourceValues["VideoPlayback"] = ResourcePolicy::VideoPlaybackType; @@ -63,6 +64,8 @@ bool CommandLineParser::parseArguments() case 'm': case 's': case 'i': + timings = true; + break; case 't': break; case 'f': @@ -195,11 +198,14 @@ bool CommandLineParser::parseModeValues(const QString &modeListStr) void CommandLineParser::usage() { - output << "usage: resourceqt-client [-h] [-m mode-values]" << - "[-o optional-resources] [-s shared-resources -m shared-mask] " << + output << "usage: resourceqt-client [-h] [-f mode-values]" << + "[-o optional-resources] [-i] [-v] [-p prefix] " << "class all-resources" << endl; output << "\toptions:" << endl; output << "\t h\tprint this help message and exit" << endl; + output << "\t i\tshow timings of requests" << endl; + output << "\t v\tshow debug of libresourceqt" << endl; + output << "\t p\tPrefix all output with the given prefix" << endl; output << "\t f\tmode values. See 'modes' below for the " "\n\t\tsyntax of " << endl; output << "\t o\toptional resources. See 'resources' below for the " @@ -260,3 +266,7 @@ bool CommandLineParser::shouldBeVerbose() const return verbose; } +bool CommandLineParser::showTimings() const +{ + return timings; +} -- cgit v1.2.3