summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-04-06 13:16:24 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-04-06 13:51:28 -0300
commitb33642d78d4629b5b44776d12f2069d1afed42b3 (patch)
tree4ebc48e66e1a9360e25fc4e947b410118cbf5eda
parent63ce37b2c1a712892486d208b93a8ca3f44bc1ab (diff)
Revert "MethodInvocationContext: Add setFinishedWithError overload receiving a DBusError."
This reverts commit 383213037d594cbbc3aa92681c75a0e40e6760ed. DBusError is part of telepathy-qt-service library and cannot be a dependency for the main telepathy-qt library. We may re-add it once we merge both libraries.
-rw-r--r--TelepathyQt/base-connection-manager.cpp4
-rw-r--r--TelepathyQt/base-protocol.cpp8
-rw-r--r--TelepathyQt/method-invocation-context.h9
3 files changed, 7 insertions, 14 deletions
diff --git a/TelepathyQt/base-connection-manager.cpp b/TelepathyQt/base-connection-manager.cpp
index 7b09136f..ac293381 100644
--- a/TelepathyQt/base-connection-manager.cpp
+++ b/TelepathyQt/base-connection-manager.cpp
@@ -150,12 +150,12 @@ void BaseConnectionManager::Adaptee::requestConnection(const QString &protocolNa
BaseConnectionPtr connection;
connection = protocol->createConnection(parameters, &error);
if (!connection) {
- context->setFinishedWithError(error);
+ context->setFinishedWithError(error.name(), error.message());
return;
}
if (!connection->registerObject(&error)) {
- context->setFinishedWithError(error);
+ context->setFinishedWithError(error.name(), error.message());
return;
}
diff --git a/TelepathyQt/base-protocol.cpp b/TelepathyQt/base-protocol.cpp
index 3e28a0a7..0d386267 100644
--- a/TelepathyQt/base-protocol.cpp
+++ b/TelepathyQt/base-protocol.cpp
@@ -141,7 +141,7 @@ void BaseProtocol::Adaptee::identifyAccount(const QVariantMap &parameters,
QString accountId;
accountId = mProtocol->identifyAccount(parameters, &error);
if (accountId.isEmpty()) {
- context->setFinishedWithError(error);
+ context->setFinishedWithError(error.name(), error.message());
return;
}
context->setFinished(accountId);
@@ -154,7 +154,7 @@ void BaseProtocol::Adaptee::normalizeContact(const QString &contactId,
QString normalizedContactId;
normalizedContactId = mProtocol->normalizeContact(contactId, &error);
if (normalizedContactId.isEmpty()) {
- context->setFinishedWithError(error);
+ context->setFinishedWithError(error.name(), error.message());
return;
}
context->setFinished(normalizedContactId);
@@ -734,7 +734,7 @@ void BaseProtocolAddressingInterface::Adaptee::normalizeVCardAddress(const QStri
QString normalizedAddress;
normalizedAddress = mInterface->normalizeVCardAddress(vCardField, vCardAddress, &error);
if (normalizedAddress.isEmpty()) {
- context->setFinishedWithError(error);
+ context->setFinishedWithError(error.name(), error.message());
return;
}
context->setFinished(normalizedAddress);
@@ -747,7 +747,7 @@ void BaseProtocolAddressingInterface::Adaptee::normalizeContactURI(const QString
QString normalizedUri;
normalizedUri = mInterface->normalizeContactUri(uri, &error);
if (normalizedUri.isEmpty()) {
- context->setFinishedWithError(error);
+ context->setFinishedWithError(error.name(), error.message());
return;
}
context->setFinished(normalizedUri);
diff --git a/TelepathyQt/method-invocation-context.h b/TelepathyQt/method-invocation-context.h
index 60355d45..79f6476e 100644
--- a/TelepathyQt/method-invocation-context.h
+++ b/TelepathyQt/method-invocation-context.h
@@ -27,8 +27,6 @@
#error IN_TP_QT_HEADER
#endif
-#include <TelepathyQt/DBusError>
-
#include <QtDBus>
#include <QtCore>
@@ -158,11 +156,6 @@ public:
onFinished();
}
- void setFinishedWithError(const DBusError &error)
- {
- setFinishedWithError(error.name(), error.message());
- }
-
template<int Index> inline
typename Select<Index>::Type argumentAt() const
{
@@ -187,7 +180,7 @@ private:
QDBusConnection mBus;
QDBusMessage mMessage;
bool mFinished;
- QVariantList mReply;
+ QList<QVariant> mReply;
QString mErrorName;
QString mErrorMessage;
};