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 )
293
293
294
294
bool QgsGrass::init ( void )
295
295
{
296
+ // Do not show warning dialog in this function, it may cause problems in non interactive tests etc.
297
+
296
298
// Warning!!!
297
299
// G_set_error_routine() once called from plugin
298
300
// is not valid in provider -> call it always
@@ -347,7 +349,8 @@ bool QgsGrass::init( void )
347
349
}
348
350
G_CATCH ( QgsGrass::Exception &e )
349
351
{
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 );
351
354
nonInitializable = true ;
352
355
unlock ();
353
356
return false ;
@@ -549,9 +552,9 @@ bool QgsGrass::init( void )
549
552
putEnv ( " GRASS_PAGER" , pager );
550
553
}
551
554
}
555
+ initialized = 1 ;
552
556
}
553
557
554
- initialized = 1 ;
555
558
unlock ();
556
559
return valid;
557
560
}
You can’t perform that action at this time.
0 commit comments