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 <torben@dannhauer.info>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
This commit is contained in:
Torben Dannhauer 2012-01-24 20:55:37 +01:00 committed by Qt by Nokia
parent e03b77d1a6
commit 84f4b81499
2 changed files with 13 additions and 0 deletions

View File

@ -237,6 +237,16 @@ bool QSqlDriver::isOpenError() const
\value TableName A SQL table name
*/
/*!
\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

View File

@ -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);