mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
show command line help as message box on windows
(cherry picked from commit bd23bf1a2368fa68fe692d451f61bfe3095619bd)
This commit is contained in:
parent
59583e97de
commit
f61c993e13
@ -106,9 +106,12 @@ typedef SInt32 SRefCon;
|
||||
|
||||
/** Print usage text
|
||||
*/
|
||||
void usage( std::string const & appName )
|
||||
void usage( QString appName )
|
||||
{
|
||||
std::cerr << "QGIS - " << VERSION << " '" << RELEASE_NAME << "' ("
|
||||
QStringList msg;
|
||||
|
||||
msg
|
||||
<< "QGIS - " << VERSION << " '" << RELEASE_NAME << "' ("
|
||||
<< QGSVERSION << ")\n"
|
||||
<< "QGIS is a user friendly Open Source Geographic Information System.\n"
|
||||
<< "Usage: " << appName << " [OPTION] [FILE]\n"
|
||||
@ -134,7 +137,7 @@ void usage( std::string const & appName )
|
||||
<< "\t[--dxf-symbology-mode none|symbollayer|feature]\tsymbology mode for dxf output\n"
|
||||
<< "\t[--dxf-scale-denom scale]\tscale for dxf output\n"
|
||||
<< "\t[--dxf-encoding encoding]\tencoding to use for dxf output\n"
|
||||
<< "\t[--dxf-preset visiblity-preset]\tlayer map theme to use for dxf output\n"
|
||||
<< "\t[--dxf-preset maptheme]\tmap theme to use for dxf output\n"
|
||||
<< "\t[--help]\t\tthis text\n"
|
||||
<< "\t[--]\t\ttreat all following arguments as FILEs\n\n"
|
||||
<< " FILE:\n"
|
||||
@ -146,6 +149,14 @@ void usage( std::string const & appName )
|
||||
<< " and others supported by OGR and PostgreSQL layers using\n"
|
||||
<< " the PostGIS extension\n" ; // OK
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
MessageBox( nullptr,
|
||||
msg.join( QString() ).toLocal8Bit().constData(),
|
||||
"QGIS command line options",
|
||||
MB_OK );
|
||||
#else
|
||||
std::cerr << msg.join( QString() ).toLocal8Bit().constData();
|
||||
#endif
|
||||
|
||||
} // usage()
|
||||
|
||||
@ -571,7 +582,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
if ( arg == "--help" || arg == "-?" )
|
||||
{
|
||||
usage( args[0].toStdString() );
|
||||
usage( args[0] );
|
||||
return 2;
|
||||
}
|
||||
else if ( arg == "--nologo" || arg == "-n" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user