summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/psql/qsql_psql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/drivers/psql/qsql_psql.cpp')
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 8985184e139..e3533581baf 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1370,8 +1370,13 @@ void QPSQLDriver::_q_handleNotification(int)
PGnotify *notify = 0;
while((notify = PQnotifies(d->connection)) != 0) {
QString name(QLatin1String(notify->relname));
- if (d->seid.contains(name))
+ if (d->seid.contains(name)) {
emit notification(name);
+ if (notify->be_pid == PQbackendPID(d->connection))
+ emit notification(name, QSqlDriver::SelfSource);
+ else
+ emit notification(name, QSqlDriver::OtherSource);
+ }
else
qWarning("QPSQLDriver: received notification for '%s' which isn't subscribed to.",
qPrintable(name));