diff options
author | Timothy Pearson <[email protected]> | 2014-09-03 18:37:06 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-09-03 18:37:06 -0500 |
commit | 7b43eed24a592feae9b6ba8fa338fb9737bf089f (patch) | |
tree | 64290972b342da11439be46b3658983151f4bec0 /src/sql/qsqldatabase.cpp | |
parent | 4de369738339e5755968b1bcbae0baa515917386 (diff) | |
download | qt3-7b43eed24a592feae9b6ba8fa338fb9737bf089f.tar.gz qt3-7b43eed24a592feae9b6ba8fa338fb9737bf089f.zip |
Add ability to set reconnect flag on MySQL connections
Add database server ping method to SQL classes
Diffstat (limited to 'src/sql/qsqldatabase.cpp')
-rw-r--r-- | src/sql/qsqldatabase.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sql/qsqldatabase.cpp b/src/sql/qsqldatabase.cpp index 8a4f885..9a16d1c 100644 --- a/src/sql/qsqldatabase.cpp +++ b/src/sql/qsqldatabase.cpp @@ -144,6 +144,7 @@ public: return FALSE; } void close() {} + bool ping() { return TRUE; } QSqlQuery createQuery() const { return QSqlQuery( new QNullResult(this) ); } }; @@ -796,6 +797,15 @@ void QSqlDatabase::close() } /*! + Sends a ping to the database server. +*/ + +bool QSqlDatabase::ping() +{ + return d->driver->ping(); +} + +/*! Returns TRUE if the database connection is currently open; otherwise returns FALSE. */ |