From ba2428504b6b20b2f1bd62383d1e88ff6ace10a7 Mon Sep 17 00:00:00 2001 From: Wolf Bergenheim Date: Thu, 9 Sep 2010 16:41:28 +0300 Subject: astyle --- resourceqt-client/commandlineparser.cpp | 39 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'resourceqt-client/commandlineparser.cpp') diff --git a/resourceqt-client/commandlineparser.cpp b/resourceqt-client/commandlineparser.cpp index 979399e..732d361 100644 --- a/resourceqt-client/commandlineparser.cpp +++ b/resourceqt-client/commandlineparser.cpp @@ -4,8 +4,8 @@ QHash CommandLineParser::resourceValues; CommandLineParser::CommandLineParser(): - allResources(), optResources(), autoRelease(false), alwaysReply(false), - verbose(false), allowUnkownResourceClass(false), output(stdout) + allResources(), optResources(), autoRelease(false), alwaysReply(false), + verbose(false), allowUnkownResourceClass(false), output(stdout) { resourceValues["AudioPlayback"] = ResourcePolicy::AudioPlaybackType; resourceValues["VideoPlayback"] = ResourcePolicy::VideoPlaybackType; @@ -94,17 +94,16 @@ bool CommandLineParser::parseArguments() bool CommandLineParser::parseClassString(const QString &str) { if (!allowUnkownResourceClass && - (str != "call") && - (str != "camera") && - (str != "ringtone") && - (str != "alarm") && - (str != "navigator") && - (str != "game") && - (str != "player") && - (str != "event") && - (str != "background") && - (str != "videoeditor") ) - { + (str != "call") && + (str != "camera") && + (str != "ringtone") && + (str != "alarm") && + (str != "navigator") && + (str != "game") && + (str != "player") && + (str != "event") && + (str != "background") && + (str != "videoeditor")) { output << "invalid class " << str; return false; } @@ -114,7 +113,7 @@ bool CommandLineParser::parseClassString(const QString &str) } bool CommandLineParser::parseResourceList(const QString &resourceListStr, - QSet &resources) + QSet &resources) { if (resourceListStr.isEmpty() || resourceListStr.isNull()) { return false; @@ -128,7 +127,7 @@ bool CommandLineParser::parseResourceList(const QString &resourceListStr, } } } - + return true; } @@ -137,7 +136,7 @@ bool CommandLineParser::parseModeValues(const QString &modeListStr) if (modeListStr.isEmpty() || modeListStr.isNull()) { return false; } - + QStringList modeList = modeListStr.split(",", QString::SkipEmptyParts); foreach(QString mode, modeList) { @@ -157,14 +156,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] " << - "class all-resources" << endl; + "[-o optional-resources] [-s shared-resources -m shared-mask] " << + "class all-resources" << endl; output << "\toptions:" << endl; output << "\t h\tprint this help message and exit" << endl; output << "\t f\tmode values. See 'modes' below for the " - "\n\t\tsyntax of " << endl; + "\n\t\tsyntax of " << endl; output << "\t o\toptional resources. See 'resources' below for the " - "syntax of\n\t\t" << endl; + "syntax of\n\t\t" << endl; output << "\tclass:" << endl; output << "\t\tcall\t - for native or 3rd party telephony" << endl; output << "\t\tcamera\t - for photo applications" << endl; -- cgit v1.2.3