From 84f4b8149974fbc9f7c43c3a83f3ac76d7dfab15 Mon Sep 17 00:00:00 2001 From: Torben Dannhauer Date: Tue, 24 Jan 2012 20:55:37 +0100 Subject: [PATCH] Interface definition to provide notifications with a source information. To differentiate between signals of different sources types, this submission adds an enum and extra signal to provide it. Change-Id: Iad711739c41894e9c74d83072c50ae17edc695f2 Reviewed-by: Torben Dannhauer Reviewed-by: Yunqiao Yin --- src/sql/kernel/qsqldriver.cpp | 10 ++++++++++ src/sql/kernel/qsqldriver.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 7526438..130eec0 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -238,6 +238,16 @@ bool QSqlDriver::isOpenError() const */ /*! + \enum QSqlDriver::NotificationSource + + This enum contains a list of SQL notification sources. + + \value Unknown The notification source is unknown + \value Self The notification source is the own connection + \value Other The notification source is another connection +*/ + +/*! \fn bool QSqlDriver::hasFeature(DriverFeature feature) const Returns true if the driver supports feature \a feature; otherwise diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h index 936e29d..cd50482 100644 --- a/src/sql/kernel/qsqldriver.h +++ b/src/sql/kernel/qsqldriver.h @@ -78,6 +78,8 @@ public: enum IdentifierType { FieldName, TableName }; + enum NotificationSource { Unknown, Self, Other }; + explicit QSqlDriver(QObject *parent=0); ~QSqlDriver(); virtual bool isOpen() const; @@ -120,6 +122,7 @@ public: Q_SIGNALS: void notification(const QString &name); + void notification(const QString &name, NotificationSource source); protected: virtual void setOpen(bool o); -- 2.7.4