telepathy-qt: Fix build in Qt4

David Edmundson davidedmundson at kemper.freedesktop.org
Fri Feb 13 05:56:01 PST 2015


Module: telepathy-qt
Branch: master
Commit: 4d3a8aac680a81d427229eb85635a483909b4f7b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=4d3a8aac680a81d427229eb85635a483909b4f7b

Author: Tiago Salem Herrmann <tiago.herrmann at canonical.com>
Date:   Fri Feb 13 11:51:18 2015 -0200

Fix build in Qt4

---

 TelepathyQt/base-call.cpp       |    2 +-
 TelepathyQt/base-channel.cpp    |   14 +++++++-------
 TelepathyQt/base-connection.cpp |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/TelepathyQt/base-call.cpp b/TelepathyQt/base-call.cpp
index e20d278..d240a4d 100644
--- a/TelepathyQt/base-call.cpp
+++ b/TelepathyQt/base-call.cpp
@@ -304,7 +304,7 @@ void BaseCallMuteInterface::setMuteState(const Tp::LocalMuteState &state)
 {
     if (mPriv->state != state) {
         mPriv->state = state;
-        emit mPriv->adaptee->muteStateChanged(state);
+        QMetaObject::invokeMethod(mPriv->adaptee, "muteStateChanged", Q_ARG(Tp::LocalMuteState, state));
     }
 }
 
diff --git a/TelepathyQt/base-channel.cpp b/TelepathyQt/base-channel.cpp
index 11d7a23..db8c12f 100644
--- a/TelepathyQt/base-channel.cpp
+++ b/TelepathyQt/base-channel.cpp
@@ -2111,7 +2111,7 @@ void BaseChannelCallType::setCallState(const Tp::CallState &state, uint flags, c
     mPriv->callFlags = flags;
     mPriv->callStateReason = stateReason;
     mPriv->callStateDetails = callStateDetails;
-    emit mPriv->adaptee->callStateChanged(state, flags, stateReason, callStateDetails);
+    QMetaObject::invokeMethod(mPriv->adaptee, "callStateChanged", Q_ARG(Tp::CallState, state), Q_ARG(uint, flags), Q_ARG(Tp::CallStateReason, stateReason), Q_ARG(QVariantMap, callStateDetails));
 }
 
 void BaseChannelCallType::setAcceptCallback(const AcceptCallback &cb)
@@ -2143,7 +2143,7 @@ void BaseChannelCallType::setMembersFlags(const Tp::CallMemberMap &flagsChanged,
 {
     mPriv->callMembers = flagsChanged;
     mPriv->memberIdentifiers = identifiers;
-    emit mPriv->adaptee->callMembersChanged(flagsChanged, identifiers, removed, reason);
+    QMetaObject::invokeMethod(mPriv->adaptee, "callMembersChanged", Q_ARG(Tp::CallMemberMap, flagsChanged), Q_ARG(Tp::HandleIdentifierMap, identifiers), Q_ARG(Tp::UIntList, removed), Q_ARG(Tp::CallStateReason, reason));
 }
 
 BaseCallContentPtr BaseChannelCallType::addContent(const QString &name, const Tp::MediaStreamType &type, const Tp::MediaStreamDirection &direction)
@@ -2154,7 +2154,7 @@ BaseCallContentPtr BaseChannelCallType::addContent(const QString &name, const Tp
     QDBusObjectPath objpath;
     objpath.setPath(ptr->objectPath());
     mPriv->contents.append(objpath);
-    emit mPriv->adaptee->contentAdded(objpath);
+    QMetaObject::invokeMethod(mPriv->adaptee, "contentAdded", Q_ARG(QDBusObjectPath, objpath));
 
     return ptr;
 }
@@ -2166,7 +2166,7 @@ void BaseChannelCallType::addContent(BaseCallContentPtr content)
     QDBusObjectPath objpath;
     objpath.setPath(content->objectPath());
     mPriv->contents.append(objpath);
-    emit mPriv->adaptee->contentAdded(objpath);
+    QMetaObject::invokeMethod(mPriv->adaptee, "contentAdded", Q_ARG(QDBusObjectPath, objpath));
 }
 
 // Chan.I.Hold
@@ -2254,7 +2254,7 @@ void BaseChannelHoldInterface::setHoldState(const Tp::LocalHoldState &state, con
     if (mPriv->state != state) {
         mPriv->state = state;
         mPriv->reason = reason;
-        emit mPriv->adaptee->holdStateChanged(state, reason);
+        QMetaObject::invokeMethod(mPriv->adaptee, "holdStateChanged", Q_ARG(Tp::LocalHoldState, state), Q_ARG(Tp::LocalHoldStateReason, reason));
     }
 }
 
@@ -2552,7 +2552,7 @@ void BaseChannelConferenceInterface::mergeChannel(const QDBusObjectPath &channel
     if (channelHandle != 0) {
         mPriv->originalChannels[channelHandle] = channel;
     }
-    emit mPriv->adaptee->channelMerged(channel, channelHandle, properties);
+    QMetaObject::invokeMethod(mPriv->adaptee, "channelMerged", Q_ARG(QDBusObjectPath, channel), Q_ARG(uint, channelHandle), Q_ARG(QVariantMap, properties));
 }
 
 
@@ -2562,7 +2562,7 @@ void BaseChannelConferenceInterface::removeChannel(const QDBusObjectPath &channe
     if (mPriv->originalChannels.values().contains(channel)) {
         mPriv->originalChannels.remove(mPriv->originalChannels.key(channel));
     }
-    emit mPriv->adaptee->channelRemoved(channel, details);
+    QMetaObject::invokeMethod(mPriv->adaptee, "channelRemoved", Q_ARG(QDBusObjectPath, channel), Q_ARG(QVariantMap, details));
 }
 
 ChannelOriginatorMap BaseChannelConferenceInterface::originalChannels() const
diff --git a/TelepathyQt/base-connection.cpp b/TelepathyQt/base-connection.cpp
index 0c94296..d71f34e 100644
--- a/TelepathyQt/base-connection.cpp
+++ b/TelepathyQt/base-connection.cpp
@@ -604,7 +604,7 @@ void BaseConnection::setSelfHandle(uint selfHandle)
     bool changed = (selfHandle != mPriv->selfHandle);
     mPriv->selfHandle = selfHandle;
     if (changed)
-        emit mPriv->adaptee->selfHandleChanged(mPriv->selfHandle);
+        QMetaObject::invokeMethod(mPriv->adaptee, "selfHandleChanged", Q_ARG(uint, selfHandle));
 }
 
 uint BaseConnection::selfHandle() const



More information about the telepathy-commits mailing list