Skip to content
Permalink
Browse files
Updated CLI help to include short form flags. Fixed issue with duplic…
…ate allocation on -s flag. (#46548)

Co-authored-by: Tim Sutton <tim@kartoza.com.com>
  • Loading branch information
timlinux and Tim Sutton committed Dec 18, 2021
1 parent 4c3f56a commit 6a05593f828facb55349bb5c552eebd00f352299
Showing with 19 additions and 19 deletions.
  1. +19 −19 src/app/main.cpp
@@ -138,23 +138,23 @@ void usage( const QString &appName )
<< QStringLiteral( "QGIS is a user friendly Open Source Geographic Information System.\n" )
<< QStringLiteral( "Usage: " ) << appName << QStringLiteral( " [OPTION] [FILE]\n" )
<< QStringLiteral( " OPTION:\n" )
<< QStringLiteral( "\t[--version]\tdisplay version information and exit\n" )
<< QStringLiteral( "\t[--snapshot filename]\temit snapshot of loaded datasets to given file\n" )
<< QStringLiteral( "\t[--width width]\twidth of snapshot to emit\n" )
<< QStringLiteral( "\t[--height height]\theight of snapshot to emit\n" )
<< QStringLiteral( "\t[--lang language]\tuse language for interface text (changes existing override)\n" )
<< QStringLiteral( "\t[--project projectfile]\tload the given QGIS project\n" )
<< QStringLiteral( "\t[--extent xmin,ymin,xmax,ymax]\tset initial map extent\n" )
<< QStringLiteral( "\t[--nologo]\thide splash screen\n" )
<< QStringLiteral( "\t[--noversioncheck]\tdon't check for new version of QGIS at startup\n" )
<< QStringLiteral( "\t[--noplugins]\tdon't restore plugins on startup\n" )
<< QStringLiteral( "\t[--skipbadlayers]\tdon't prompt for missing layers\n" )
<< QStringLiteral( "\t[--nocustomization]\tdon't apply GUI customization\n" )
<< QStringLiteral( "\t[--customizationfile path]\tuse the given ini file as GUI customization\n" )
<< QStringLiteral( "\t[--globalsettingsfile path]\tuse the given ini file as Global Settings (defaults)\n" )
<< QStringLiteral( "\t[--authdbdirectory path] use the given directory for authentication database\n" )
<< QStringLiteral( "\t[--code path]\trun the given python file on load\n" )
<< QStringLiteral( "\t[--defaultui]\tstart by resetting user ui settings to default\n" )
<< QStringLiteral( "\t[-v, --version]\tdisplay version information and exit\n" )
<< QStringLiteral( "\t[-s, --snapshot filename]\temit snapshot of loaded datasets to given file\n" )
<< QStringLiteral( "\t[-w, --width width]\twidth of snapshot to emit\n" )
<< QStringLiteral( "\t[-h, --height height]\theight of snapshot to emit\n" )
<< QStringLiteral( "\t[-l, --lang language]\tuse language for interface text (changes existing override)\n" )
<< QStringLiteral( "\t[-p, --project projectfile]\tload the given QGIS project\n" )
<< QStringLiteral( "\t[-e, --extent xmin,ymin,xmax,ymax]\tset initial map extent\n" )
<< QStringLiteral( "\t[-n, --nologo]\thide splash screen\n" )
<< QStringLiteral( "\t[-V, --noversioncheck]\tdon't check for new version of QGIS at startup\n" )
<< QStringLiteral( "\t[-P, --noplugins]\tdon't restore plugins on startup\n" )
<< QStringLiteral( "\t[-B, --skipbadlayers]\tdon't prompt for missing layers\n" )
<< QStringLiteral( "\t[-C, --nocustomization]\tdon't apply GUI customization\n" )
<< QStringLiteral( "\t[-z, --customizationfile path]\tuse the given ini file as GUI customization\n" )
<< QStringLiteral( "\t[-g, --globalsettingsfile path]\tuse the given ini file as Global Settings (defaults)\n" )
<< QStringLiteral( "\t[-a, --authdbdirectory path] use the given directory for authentication database\n" )
<< QStringLiteral( "\t[-f, --code path]\trun the given python file on load\n" )
<< QStringLiteral( "\t[-d, --defaultui]\tstart by resetting user ui settings to default\n" )
<< QStringLiteral( "\t[--hide-browser]\thide the browser widget\n" )
<< QStringLiteral( "\t[--dxf-export filename.dxf]\temit dxf output of loaded datasets to given file\n" )
<< QStringLiteral( "\t[--dxf-extent xmin,ymin,xmax,ymax]\tset extent to export to dxf\n" )
@@ -165,7 +165,7 @@ void usage( const QString &appName )
<< QStringLiteral( "\t[--take-screenshots output_path]\ttake screen shots for the user documentation\n" )
<< QStringLiteral( "\t[--screenshots-categories categories]\tspecify the categories of screenshot to be used (see QgsAppScreenShots::Categories).\n" )
<< QStringLiteral( "\t[--profile name]\tload a named profile from the users profiles folder.\n" )
<< QStringLiteral( "\t[--profiles-path path]\tpath to store user profile folders. Will create profiles inside a {path}\\profiles folder \n" )
<< QStringLiteral( "\t[-s, --profiles-path path]\tpath to store user profile folders. Will create profiles inside a {path}\\profiles folder \n" )
<< QStringLiteral( "\t[--version-migration]\tforce the settings migration from older version if found\n" )
#ifdef HAVE_OPENCL
<< QStringLiteral( "\t[--openclprogramfolder]\t\tpath to the folder containing the sources for OpenCL programs.\n" )
@@ -678,7 +678,7 @@ int main( int argc, char *argv[] )
{
profileName = args[++i];
}
else if ( i + 1 < argc && ( arg == QLatin1String( "--profiles-path" ) || arg == QLatin1String( "-s" ) ) )
else if ( i + 1 < argc && ( arg == QLatin1String( "--profiles-path" ) || arg == QLatin1String( "-S" ) ) )
{
configLocalStorageLocation = QDir::toNativeSeparators( QFileInfo( args[++i] ).absoluteFilePath() );
}

0 comments on commit 6a05593

Please sign in to comment.