File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,8 @@ QString QgsGrass::shortPath( const QString &path )
293293
294294bool QgsGrass::init ( void )
295295{
296+ // Do not show warning dialog in this function, it may cause problems in non interactive tests etc.
297+
296298 // Warning!!!
297299 // G_set_error_routine() once called from plugin
298300 // is not valid in provider -> call it always
@@ -347,7 +349,8 @@ bool QgsGrass::init( void )
347349 }
348350 G_CATCH ( QgsGrass::Exception &e )
349351 {
350- warning ( tr ( " Problem in GRASS initialization, GRASS provider and plugin will not work" ) + " : " + e.what () );
352+ error_message = tr ( " Problem in GRASS initialization, GRASS provider and plugin will not work" ) + " : " + e.what ();
353+ QgsDebugMsg ( error_message );
351354 nonInitializable = true ;
352355 unlock ();
353356 return false ;
@@ -549,9 +552,9 @@ bool QgsGrass::init( void )
549552 putEnv ( " GRASS_PAGER" , pager );
550553 }
551554 }
555+ initialized = 1 ;
552556 }
553557
554- initialized = 1 ;
555558 unlock ();
556559 return valid;
557560}
You can’t perform that action at this time.
0 commit comments