fix thread-cross bugs for QSqlError