From a3b5cdb3d1272a805bebbb48646e50306c2112eb Mon Sep 17 00:00:00 2001 From: Jamey Hicks Date: Mon, 19 Mar 2012 12:23:26 -0400 Subject: Revert accidental change to QJsonDbWatcher::error() signal. Change-Id: I351e6537c07424db1dabc028dd0b7080da8cc904 Reviewed-by: Liang Qi Reviewed-by: Kevin Simons --- src/client/qjsondbwatcher.h | 2 +- tests/auto/qjsondbwatcher/testqjsondbwatcher.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client/qjsondbwatcher.h b/src/client/qjsondbwatcher.h index c2101ed..d647fdf 100644 --- a/src/client/qjsondbwatcher.h +++ b/src/client/qjsondbwatcher.h @@ -115,7 +115,7 @@ public: Q_SIGNALS: void notificationsAvailable(int count); void statusChanged(QtJsonDb::QJsonDbWatcher::Status newStatus); - void error(int code, const QString &message); + void error(QtJsonDb::QJsonDbWatcher::ErrorCode code, const QString &message); // signals for properties void lastStateNumberChanged(int stateNumber); diff --git a/tests/auto/qjsondbwatcher/testqjsondbwatcher.cpp b/tests/auto/qjsondbwatcher/testqjsondbwatcher.cpp index 80be7eb..a48afa7 100644 --- a/tests/auto/qjsondbwatcher/testqjsondbwatcher.cpp +++ b/tests/auto/qjsondbwatcher/testqjsondbwatcher.cpp @@ -95,7 +95,7 @@ public slots: // from a watcher void onWatcherNotificationsAvailable(int); void onWatcherStatusChanged(QtJsonDb::QJsonDbWatcher::Status); - void onWatcherError(int,QString); + void onWatcherError(QtJsonDb::QJsonDbWatcher::ErrorCode,QString); private: void removeDbFiles(); @@ -183,7 +183,7 @@ void TestQJsonDbWatcher::onWatcherStatusChanged(QtJsonDb::QJsonDbWatcher::Status } // this should go into a new version of clientwrapper.h -void TestQJsonDbWatcher::onWatcherError(int code, QString message) +void TestQJsonDbWatcher::onWatcherError(QtJsonDb::QJsonDbWatcher::ErrorCode code, QString message) { qCritical() << "onWatcherError" << code << message; mEventLoop.quit(); @@ -256,7 +256,7 @@ void TestQJsonDbWatcher::createAndRemove() this, SLOT(onWatcherNotificationsAvailable(int))); connect(&watcher, SIGNAL(statusChanged(QtJsonDb::QJsonDbWatcher::Status)), this, SLOT(onWatcherStatusChanged(QtJsonDb::QJsonDbWatcher::Status))); - connect(&watcher, SIGNAL(error(int,QString)), this, SLOT(onWatcherError(int,QString))); + connect(&watcher, SIGNAL(error(QtJsonDb::QJsonDbWatcher::ErrorCode,QString)), this, SLOT(onWatcherError(QtJsonDb::QJsonDbWatcher::ErrorCode,QString))); mConnection->addWatcher(&watcher); QJsonObject item; @@ -354,7 +354,7 @@ void TestQJsonDbWatcher::history() this, SLOT(onWatcherNotificationsAvailable(int))); connect(&watcher, SIGNAL(statusChanged(QtJsonDb::QJsonDbWatcher::Status)), this, SLOT(onWatcherStatusChanged(QtJsonDb::QJsonDbWatcher::Status))); - connect(&watcher, SIGNAL(error(int,QString)), this, SLOT(onWatcherError(int,QString))); + connect(&watcher, SIGNAL(error(QtJsonDb::QJsonDbWatcher::ErrorCode,QString)), this, SLOT(onWatcherError(QtJsonDb::QJsonDbWatcher::ErrorCode,QString))); // set the starting state watcher.setInitialStateNumber(firstStateNumber-1); @@ -383,7 +383,7 @@ void TestQJsonDbWatcher::currentState() this, SLOT(onWatcherNotificationsAvailable(int))); connect(&watcher, SIGNAL(statusChanged(QtJsonDb::QJsonDbWatcher::Status)), this, SLOT(onWatcherStatusChanged(QtJsonDb::QJsonDbWatcher::Status))); - connect(&watcher, SIGNAL(error(int,QString)), this, SLOT(onWatcherError(int,QString))); + connect(&watcher, SIGNAL(error(QtJsonDb::QJsonDbWatcher::ErrorCode,QString)), this, SLOT(onWatcherError(QtJsonDb::QJsonDbWatcher::ErrorCode,QString))); // set the starting state to -1 to get the current state watcher.setInitialStateNumber(static_cast(-1)); -- cgit v1.2.3