215 bool showUsage =
false;
220 bool nextIsErrorReportFile =
false;
221 bool nextIsExtractImageOnly =
false;
222 bool nextIsFileCmdScript =
false;
226 isDropRegression =
false;
228 errorReportFile =
"";
229 fileCmdScriptFile =
"";
230 isErrorReportRegressionTest =
false;
232 isExportOnly =
false;
233 isExtractImageOnly =
false;
234 extractImageOnlyExtension =
"";
237 for (
int i = 1; i < argc; i++) {
239 bool isLoadStartupFile =
false;
241 if (nextIsErrorReportFile) {
244 QObject::tr (
"is not a valid file name"));
245 errorReportFile = argv [i];
246 nextIsErrorReportFile =
false;
247 }
else if (nextIsExtractImageOnly) {
250 QObject::tr (
"is not a valid image file extension"));
251 extractImageOnlyExtension = argv [i];
252 nextIsExtractImageOnly =
false;
253 }
else if (nextIsFileCmdScript) {
256 QObject::tr (
"is not a valid file name"));
257 fileCmdScriptFile = argv [i];
258 nextIsFileCmdScript =
false;
259 }
else if (strcmp (argv [i],
DASH_DEBUG.toLatin1().data()) == 0) {
262 isDropRegression =
true;
264 nextIsErrorReportFile =
true;
268 isExtractImageOnly =
true;
269 nextIsExtractImageOnly =
true;
271 nextIsFileCmdScript =
true;
272 }
else if (strcmp (argv [i],
DASH_GNUPLOT.toLatin1().data()) == 0) {
274 }
else if (strcmp (argv [i],
DASH_HELP.toLatin1().data()) == 0) {
276 }
else if (strcmp (argv [i],
DASH_REGRESSION.toLatin1().data()) == 0) {
277 isErrorReportRegressionTest =
true;
278 }
else if (strcmp (argv [i],
DASH_RESET.toLatin1().data()) == 0) {
280 }
else if (strcmp (argv [i],
DASH_STYLE.toLatin1().data()) == 0) {
283 }
else if (strcmp (argv [i],
DASH_STYLES.toLatin1().data()) == 0) {
285 }
else if (strcmp (argv [i],
DASH_UPGRADE.toLatin1().data()) == 0) {
287 }
else if (strncmp (argv [i],
DASH.toLatin1().data(), 1) == 0) {
292 QString fileName = argv [i];
293 QFileInfo fInfo (fileName);
294 if (fInfo.isRelative() && !fileName.startsWith (
"http")) {
295 fileName = fInfo.absoluteFilePath();
298 isLoadStartupFile =
true;
299 loadStartupFiles << fileName;
303 if (!isLoadStartupFile) {
304 commandLineWithoutLoadStartupFiles << argv [i];
321 if (showUsage || nextIsErrorReportFile || nextIsExtractImageOnly || nextIsFileCmdScript) {
const QString DASH_DROP_REGRESSION("-"+CMD_DROP_REGRESSION)
const QString DASH_DEBUG("-"+CMD_DEBUG)
const QString DASH_STYLES("-"+CMD_STYLES)
const QString DASH_UPGRADE("-"+CMD_UPGRADE)
Provides list of file extensions for import.
const QString DASH_FILE_CMD_SCRIPT("-"+CMD_FILE_CMD_SCRIPT)
void sanityCheckValue(bool requiredCondition, const QString &arg, const QString &msgUnadorned)
const QString DASH_RESET("-"+CMD_RESET)
const QString DASH_ERROR_REPORT("-"+CMD_ERROR_REPORT)
const QString DASH_GNUPLOT("-"+CMD_GNUPLOT)
const QString DASH_EXPORT_ONLY("-"+CMD_EXPORT_ONLY)
const QString DASH_EXTRACT_IMAGE_ONLY("-"+CMD_EXTRACT_IMAGE_ONLY)
bool offers(const QString &fileExtension) const
Return true if specified file extension is supported.
void sanityCheckLoadStartupFiles(bool isRepeatingFlag, const QString &dashForRepeatingFlag, const QString &errorReportFile, const QString &fileCmdScriptFile, const QStringList &loadStartupFiles)
const QString DASH_REGRESSION("-"+CMD_REGRESSION)
const QString DASH_HELP("-"+CMD_HELP)
bool checkFileExists(const QString &file)
const QString DASH_STYLE("-"+CMD_STYLE)