summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel/qsqldriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/kernel/qsqldriver.cpp')
-rw-r--r--src/sql/kernel/qsqldriver.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index ec1628291d..62ec4e7e1f 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -789,4 +789,27 @@ QSql::NumericalPrecisionPolicy QSqlDriver::numericalPrecisionPolicy() const
return d_func()->precisionPolicy;
}
+/*!
+ \since 5.0
+ \internal
+
+ Tries to cancel the running query, if the underlying driver has the
+ capability to cancel queries. Returns true on success, otherwise false.
+
+ This function can be called from a different thread.
+
+ If you use this function as a slot, you need to use a Qt::DirectConnection
+ from a different thread.
+
+ Reimplement this function to support canceling running queries in
+ your own QSqlDriver subclass. It must be implemented in a thread-safe
+ manner.
+
+ \sa QSqlDriver::hasFeature()
+*/
+bool QSqlDriver::cancelQuery()
+{
+ return false;
+}
+
QT_END_NAMESPACE