47 #ifndef QT_NO_DEBUG_STREAM 105 : driverError(driverText), databaseError(databaseText), errorType(type), errorNumber(number)
The QSqlError class provides SQL database error information.
The QDebug class provides an output stream for debugging information.
QString text() const
This is a convenience function that returns databaseText() and driverText() concatenated into a singl...
ErrorType type() const
Returns the error type, or -1 if the type cannot be determined.
#define QT_END_NAMESPACE
This macro expands to.
QString driverText() const
Returns the text of the error as reported by the driver.
QSqlError(const QString &driverText=QString(), const QString &databaseText=QString(), ErrorType type=NoError, int number=-1)
Constructs an error containing the driver error text driverText, the database-specific error text dat...
QDebug & nospace()
Clears the stream's internal flag that records whether the last character was a space and returns a r...
QSqlError & operator=(const QSqlError &other)
Assigns the other error's values to this error.
The QString class provides a Unicode character string.
~QSqlError()
Destroys the object and frees any allocated resources.
ErrorType
This enum type describes the context in which the error occurred, e.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
void setType(ErrorType type)
Sets the error type to the value of type.
void setDriverText(const QString &driverText)
Sets the driver error text to the value of driverText.
QString databaseText() const
Returns the text of the error as reported by the database.
void setNumber(int number)
Sets the database-specific error number to number.
bool isValid() const
Returns true if an error is set, otherwise false.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
QDebug & space()
Writes a space character to the debug stream and returns a reference to the stream.
void setDatabaseText(const QString &databaseText)
Sets the database error text to the value of databaseText.
QDataStream & operator<<(QDataStream &out, const QUrl &url)
Writes url url to the stream out and returns a reference to the stream.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
int number() const
Returns the database-specific error number, or -1 if it cannot be determined.