@@ -92,6 +92,7 @@ void usage( std::string const & appName )
92
92
<< " \t [--project projectfile]\t load the given QGIS project\n "
93
93
<< " \t [--extent xmin,ymin,xmax,ymax]\t set initial map extent\n "
94
94
<< " \t [--nologo]\t hide splash screen\n "
95
+ << " \t [--noplugins]\t don't restore plugins on startup\n "
95
96
<< " \t [--optionspath path]\t use the given QSettings path\n "
96
97
<< " \t [--help]\t\t this text\n\n "
97
98
<< " FILES:\n "
@@ -267,6 +268,7 @@ int main( int argc, char *argv[] )
267
268
int mySnapshotHeight = 600 ;
268
269
269
270
bool myHideSplash = false ;
271
+ bool myRestorePlugins = true ;
270
272
271
273
// This behaviour will set initial extent of map canvas, but only if
272
274
// there are no command line arguments. This gives a usable map
@@ -296,6 +298,7 @@ int main( int argc, char *argv[] )
296
298
/* These options set a flag. */
297
299
{" help" , no_argument, 0 , ' ?' },
298
300
{" nologo" , no_argument, 0 , ' n' },
301
+ {" noplugins" , no_argument, 0 , ' P' },
299
302
/* These options don't set a flag.
300
303
* We distinguish them by their indices. */
301
304
{" snapshot" , required_argument, 0 , ' s' },
@@ -354,6 +357,10 @@ int main( int argc, char *argv[] )
354
357
myProjectFileName = QDir::convertSeparators ( QFileInfo ( QFile::decodeName ( optarg ) ).absoluteFilePath () );
355
358
break ;
356
359
360
+ case ' P' :
361
+ myRestorePlugins = false ;
362
+ break ;
363
+
357
364
case ' e' :
358
365
myInitialExtent = optarg ;
359
366
break ;
@@ -402,6 +409,10 @@ int main( int argc, char *argv[] )
402
409
{
403
410
myHideSplash = true ;
404
411
}
412
+ else if ( arg == " --noplugins" || arg == " -P" )
413
+ {
414
+ myRestorePlugins = false ;
415
+ }
405
416
else if ( i + 1 < argc && ( arg == " --snapshot" || arg == " -s" ) )
406
417
{
407
418
mySnapshotFileName = QDir::convertSeparators ( QFileInfo ( QFile::decodeName ( argv[++i] ) ).absoluteFilePath () );
@@ -615,7 +626,7 @@ int main( int argc, char *argv[] )
615
626
}
616
627
#endif
617
628
618
- QgisApp *qgis = new QgisApp ( mypSplash ); // "QgisApp" used to find canonical instance
629
+ QgisApp *qgis = new QgisApp ( mypSplash, myRestorePlugins ); // "QgisApp" used to find canonical instance
619
630
qgis->setObjectName ( " QgisApp" );
620
631
621
632
// ///////////////////////////////////////////////////////////////////
0 commit comments