diff options
author | Matt Newell <newellm@blur.com> | 2012-03-22 13:27:26 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-02 22:26:10 +0200 |
commit | ccf25f1d2875645067066ffb1038d23c4c1c39c1 (patch) | |
tree | e7f5032d1bde79cca2065371694fc05ed6445fdf /src/sql/drivers/psql | |
parent | 6aded68111885d4df3d17a1d5f12e538c632af60 (diff) |
QSqlDriver functions made virtual
Certain QSqlDriver functions were marked to be made virtual in Qt5.
subscribeToNotification, unsubscribeFromNotification,
subscribedToNotifications, isIdentifierEscaped, and stripDelimiters.
This patch makes them virtual and removes the no longer needed
Implementation counterpart functions. It also updates the relevant
drivers. This patch has no regressions on the tests in
tests/auto/sql/kernel/, tested with sqlite and postgres.
Change-Id: Ia2e1c18dfb803531523a456eb4e710031048e594
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src/sql/drivers/psql')
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 6 | ||||
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.h | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index ec31d54f0f..edeb5d1542 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -1283,7 +1283,7 @@ QPSQLDriver::Protocol QPSQLDriver::protocol() const return d->pro; } -bool QPSQLDriver::subscribeToNotificationImplementation(const QString &name) +bool QPSQLDriver::subscribeToNotification(const QString &name) { if (!isOpen()) { qWarning("QPSQLDriver::subscribeToNotificationImplementation: database not open."); @@ -1317,7 +1317,7 @@ bool QPSQLDriver::subscribeToNotificationImplementation(const QString &name) return true; } -bool QPSQLDriver::unsubscribeFromNotificationImplementation(const QString &name) +bool QPSQLDriver::unsubscribeFromNotification(const QString &name) { if (!isOpen()) { qWarning("QPSQLDriver::unsubscribeFromNotificationImplementation: database not open."); @@ -1350,7 +1350,7 @@ bool QPSQLDriver::unsubscribeFromNotificationImplementation(const QString &name) return true; } -QStringList QPSQLDriver::subscribedToNotificationsImplementation() const +QStringList QPSQLDriver::subscribedToNotifications() const { return d->seid; } diff --git a/src/sql/drivers/psql/qsql_psql.h b/src/sql/drivers/psql/qsql_psql.h index 94871b4c99..204a8a9105 100644 --- a/src/sql/drivers/psql/qsql_psql.h +++ b/src/sql/drivers/psql/qsql_psql.h @@ -134,16 +134,15 @@ public: QString escapeIdentifier(const QString &identifier, IdentifierType type) const; QString formatValue(const QSqlField &field, bool trimStrings) const; + bool subscribeToNotification(const QString &name); + bool unsubscribeFromNotification(const QString &name); + QStringList subscribedToNotifications() const; + protected: bool beginTransaction(); bool commitTransaction(); bool rollbackTransaction(); -protected Q_SLOTS: - bool subscribeToNotificationImplementation(const QString &name); - bool unsubscribeFromNotificationImplementation(const QString &name); - QStringList subscribedToNotificationsImplementation() const; - private Q_SLOTS: void _q_handleNotification(int); |