File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ QSqlDatabase QgsAuthManager::authDbConnection() const
84
84
authdb = QSqlDatabase::database ( connectionname );
85
85
}
86
86
if ( !authdb.isOpen () )
87
- ( void )authdb.open ();
87
+ {
88
+ if ( !authdb.open () )
89
+ {
90
+ const char * err = QT_TR_NOOP ( " Opening of authentication db FAILED" );
91
+ QgsDebugMsg ( err );
92
+ emit messageOut ( tr ( err ), authManTag (), CRITICAL );
93
+ }
94
+ }
88
95
89
96
return authdb;
90
97
}
@@ -3232,7 +3239,13 @@ bool QgsAuthManager::authDbQuery( QSqlQuery *query ) const
3232
3239
return false ;
3233
3240
3234
3241
query->setForwardOnly ( true );
3235
- ( void )query->exec ();
3242
+ if ( !query->exec () )
3243
+ {
3244
+ const char * err = QT_TR_NOOP ( " Auth db query exec() FAILED" );
3245
+ QgsDebugMsg ( err );
3246
+ emit messageOut ( tr ( err ), authManTag (), WARNING );
3247
+ return false ;
3248
+ }
3236
3249
3237
3250
if ( query->lastError ().isValid () )
3238
3251
{
You can’t perform that action at this time.
0 commit comments