Skip to content

Commit 4e0ff33

Browse files
jgrochajef-n
authored andcommittedJun 17, 2019
Add missing entry to usage; replace QStringList by QString
1 parent d653219 commit 4e0ff33

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed
 

‎src/app/main.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,15 @@ typedef SInt32 SRefCon;
113113
*/
114114
void version( )
115115
{
116-
QStringList msg;
117-
118-
msg
119-
<< QStringLiteral( "QGIS " ) << VERSION << QStringLiteral( " '" ) << RELEASE_NAME << QStringLiteral( "' (" )
120-
<< QGSVERSION << QStringLiteral( ")\n" );
116+
const QString msg = QStringLiteral( "QGIS %1 '%2' (%3)\n" ).arg( VERSION ).arg( RELEASE_NAME ).arg( QGSVERSION );
121117

122118
#ifdef Q_OS_WIN
123119
MessageBox( nullptr,
124-
msg.join( QString() ).toLocal8Bit().constData(),
120+
msg,
125121
"QGIS version",
126122
MB_OK );
127123
#else
128-
std::cerr << msg.join( QString() ).toLocal8Bit().constData();
124+
std::cerr << msg.toStdString();
129125
#endif
130126

131127
} // version()
@@ -141,6 +137,7 @@ void usage( const QString &appName )
141137
<< QStringLiteral( "QGIS is a user friendly Open Source Geographic Information System.\n" )
142138
<< QStringLiteral( "Usage: " ) << appName << QStringLiteral( " [OPTION] [FILE]\n" )
143139
<< QStringLiteral( " OPTION:\n" )
140+
<< QStringLiteral( "\t[--version]\tdisplay version information and exit\n" )
144141
<< QStringLiteral( "\t[--snapshot filename]\temit snapshot of loaded datasets to given file\n" )
145142
<< QStringLiteral( "\t[--width width]\twidth of snapshot to emit\n" )
146143
<< QStringLiteral( "\t[--height height]\theight of snapshot to emit\n" )

0 commit comments

Comments
 (0)
Please sign in to comment.