File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -746,11 +746,12 @@ int main( int argc, char *argv[] )
746
746
// ///////////////////////////////////////////////////////////////////
747
747
if ( sProjectFileName .isEmpty () )
748
748
{
749
- // check for a .qgs
749
+ // check for a .qgs/z
750
750
for ( int i = 0 ; i < args.size (); i++ )
751
751
{
752
752
QString arg = QDir::toNativeSeparators ( QFileInfo ( args[i] ).absoluteFilePath () );
753
- if ( arg.endsWith ( QLatin1String ( " .qgs" ), Qt::CaseInsensitive ) )
753
+ if ( arg.endsWith ( QLatin1String ( " .qgs" ), Qt::CaseInsensitive ) ||
754
+ arg.endsWith ( QLatin1String ( " .qgz" ), Qt::CaseInsensitive ) )
754
755
{
755
756
sProjectFileName = arg;
756
757
break ;
@@ -1288,8 +1289,9 @@ int main( int argc, char *argv[] )
1288
1289
{
1289
1290
QgsDebugMsg ( QString ( " Trying to load file : %1" ).arg ( layerName ) );
1290
1291
// don't load anything with a .qgs extension - these are project files
1291
- if ( !layerName.endsWith ( QLatin1String ( " .qgs" ), Qt::CaseInsensitive )
1292
- && !QgsZipUtils::isZipFile ( layerName ) )
1292
+ if ( !layerName.endsWith ( QLatin1String ( " .qgs" ), Qt::CaseInsensitive ) &&
1293
+ !layerName.endsWith ( QLatin1String ( " .qgz" ), Qt::CaseInsensitive ) &&
1294
+ !QgsZipUtils::isZipFile ( layerName ) )
1293
1295
{
1294
1296
qgis->openLayer ( layerName );
1295
1297
}
You can’t perform that action at this time.
0 commit comments