以下成员源于类 QSqlError 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(obsolete)
|
QSqlError (const QString & driverText , const QString & databaseText , ErrorType type , int number ) |
(obsolete)
int
|
number () const |
(obsolete)
void
|
setDatabaseText (const QString & databaseText ) |
(obsolete)
void
|
setDriverText (const QString & driverText ) |
(obsolete)
void
|
setNumber (int number ) |
(obsolete)
void
|
setType (ErrorType type ) |
Constructs an error containing the driver error text driverText , the database-specific error text databaseText , the type type and the optional error number number .
Returns the database-specific error number, or -1 if it cannot be determined.
Returns 0 if the error code is not an integer.
警告: Some databases use alphanumeric error codes, which makes number() unreliable if such a database is used.
使用 nativeErrorCode () 代替
另请参阅 setNumber () 和 nativeErrorCode ().
Sets the database error text to the value of databaseText .
使用 QSqlError (const QString & driverText , const QString & databaseText , ErrorType type, int number) instead
另请参阅 databaseText (), setDriverText (),和 text ().
Sets the driver error text to the value of driverText .
使用 QSqlError (const QString & driverText , const QString & databaseText , ErrorType type, int number) instead
另请参阅 driverText (), setDatabaseText (),和 text ().
Sets the database-specific error number to number .
使用 QSqlError (const QString & driverText , const QString & databaseText , ErrorType type, int number) instead
另请参阅 number ().
Sets the error type to the value of type .
使用 QSqlError (const QString & driverText , const QString & databaseText , ErrorType type, int number) instead
另请参阅 type ().