summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnant Kamath <kamathanant@gmail.com>2013-08-02 15:33:12 (GMT)
committerDavid Edmundson <davidedmundson@kde.org>2014-06-14 11:57:07 (GMT)
commitaf98a9b3c6a31c97caab532c547d1168cdac94bd (patch)
tree387c78cf3f81c442f4df0f8ce2166549035229ed
parent88e1c41725559cd625af02e35863e596fb60d1e0 (diff)
downloadtelepathy-qt4-af98a9b3c6a31c97caab532c547d1168cdac94bd.tar.gz
telepathy-qt4-af98a9b3c6a31c97caab532c547d1168cdac94bd.tar.xz
Fix Qt4 compilation
-rw-r--r--TelepathyQt/base-channel.cpp12
-rw-r--r--TelepathyQt/base-connection.cpp8
2 files changed, 10 insertions, 10 deletions
diff --git a/TelepathyQt/base-channel.cpp b/TelepathyQt/base-channel.cpp
index 1a32016..d9d6010 100644
--- a/TelepathyQt/base-channel.cpp
+++ b/TelepathyQt/base-channel.cpp
@@ -526,7 +526,7 @@ void BaseChannelTextType::acknowledgePendingMessages(const Tp::UIntList &IDs, DB
void BaseChannelTextType::sent(uint timestamp, uint type, QString text)
{
- emit mPriv->adaptee->sent(timestamp, type, text);
+ QMetaObject::invokeMethod(mPriv->adaptee,"sent",Q_ARG(uint, timestamp), Q_ARG(uint, type), Q_ARG(QString, text)); //Can simply use emit in Qt5
}
@@ -664,17 +664,17 @@ Tp::MessagePartListList BaseChannelMessagesInterface::pendingMessages()
void BaseChannelMessagesInterface::messageSent(const Tp::MessagePartList &content, uint flags, const QString &messageToken)
{
- emit mPriv->adaptee->messageSent(content, flags, messageToken);
+ QMetaObject::invokeMethod(mPriv->adaptee, "messageSent", Q_ARG(Tp::MessagePartList, content), Q_ARG(uint, flags), Q_ARG(QString, messageToken)); //Can simply use emit in Qt5
}
void BaseChannelMessagesInterface::pendingMessagesRemoved(const Tp::UIntList &messageIDs)
{
- emit mPriv->adaptee->pendingMessagesRemoved(messageIDs);
+ QMetaObject::invokeMethod(mPriv->adaptee, "pendingMessagesRemoved", Q_ARG(Tp::UIntList, messageIDs)); //Can simply use emit in Qt5
}
void BaseChannelMessagesInterface::messageReceived(const Tp::MessagePartList &message)
{
- emit mPriv->adaptee->messageReceived(message);
+ QMetaObject::invokeMethod(mPriv->adaptee, "messageReceived", Q_ARG(Tp::MessagePartList, message)); //Can simply use emit in Qt5
}
void BaseChannelMessagesInterface::setSendMessageCallback(const SendMessageCallback &cb)
@@ -1215,7 +1215,7 @@ void BaseChannelGroupInterface::addMembers(const Tp::UIntList& handles, const QS
added.append(handle);
}
if (!added.isEmpty())
- emit mPriv->adaptee->membersChanged(QString(), added, Tp::UIntList(), Tp::UIntList(), Tp::UIntList(), 0, ChannelGroupChangeReasonNone);
+ QMetaObject::invokeMethod(mPriv->adaptee,"membersChanged",Q_ARG(QString, QString()), Q_ARG(Tp::UIntList, added), Q_ARG(Tp::UIntList, Tp::UIntList()), Q_ARG(Tp::UIntList, Tp::UIntList()), Q_ARG(Tp::UIntList, Tp::UIntList()), Q_ARG(uint, 0), Q_ARG(uint, ChannelGroupChangeReasonNone)); //Can simply use emit in Qt5
}
void BaseChannelGroupInterface::removeMembers(const Tp::UIntList& handles)
@@ -1230,7 +1230,7 @@ void BaseChannelGroupInterface::removeMembers(const Tp::UIntList& handles)
removed.append(handle);
}
if (!removed.isEmpty())
- emit mPriv->adaptee->membersChanged(QString(), Tp::UIntList(), removed, Tp::UIntList(), Tp::UIntList(), 0, ChannelGroupChangeReasonNone);
+ QMetaObject::invokeMethod(mPriv->adaptee,"membersChanged",Q_ARG(QString, QString()), Q_ARG(Tp::UIntList, Tp::UIntList()), Q_ARG(Tp::UIntList, removed), Q_ARG(Tp::UIntList, Tp::UIntList()), Q_ARG(Tp::UIntList, Tp::UIntList()), Q_ARG(uint, 0), Q_ARG(uint,ChannelGroupChangeReasonNone)); //Can simply use emit in Qt5 //Can simply use emit in Qt5
}
}
diff --git a/TelepathyQt/base-connection.cpp b/TelepathyQt/base-connection.cpp
index e665173..870e23f 100644
--- a/TelepathyQt/base-connection.cpp
+++ b/TelepathyQt/base-connection.cpp
@@ -273,7 +273,7 @@ void BaseConnection::setStatus(uint newStatus, uint reason)
bool changed = (newStatus != mPriv->status);
mPriv->status = newStatus;
if (changed)
- emit mPriv->adaptee->statusChanged(newStatus, reason);
+ QMetaObject::invokeMethod(mPriv->adaptee, "statusChanged", Q_ARG(uint, newStatus), Q_ARG(uint, reason)); //Can simply use emit in Qt5
}
void BaseConnection::setCreateChannelCallback(const CreateChannelCallback &cb)
@@ -699,7 +699,7 @@ Tp::ChannelDetailsList BaseConnectionRequestsInterface::Adaptee::channels() cons
void BaseConnectionRequestsInterface::newChannels(const Tp::ChannelDetailsList &channels)
{
- mPriv->adaptee->newChannels(channels);
+ QMetaObject::invokeMethod(mPriv->adaptee,"newChannels", Q_ARG(Tp::ChannelDetailsList,channels)); //Can replace by a direct call in Qt5
}
void BaseConnectionRequestsInterface::ensureChannel(const QVariantMap &request, bool &yours,
@@ -953,7 +953,7 @@ void BaseConnectionSimplePresenceInterface::setPresences(const Tp::SimpleContact
foreach(uint handle, presences.keys()) {
mPriv->presences[handle] = presences[handle];
}
- emit mPriv->adaptee->presencesChanged(presences);
+ QMetaObject::invokeMethod(mPriv->adaptee, "presencesChanged", Q_ARG(Tp::SimpleContactPresences, presences)); //Can simply use emit in Qt5
}
void BaseConnectionSimplePresenceInterface::setSetPresenceCallback(const SetPresenceCallback &cb)
@@ -1162,7 +1162,7 @@ void BaseConnectionContactListInterface::setRequestSubscriptionCallback(const Re
void BaseConnectionContactListInterface::contactsChangedWithID(const Tp::ContactSubscriptionMap &changes, const Tp::HandleIdentifierMap &identifiers, const Tp::HandleIdentifierMap &removals)
{
- emit mPriv->adaptee->contactsChangedWithID(changes, identifiers, removals);
+ QMetaObject::invokeMethod(mPriv->adaptee,"contactsChangedWithID", Q_ARG(Tp::ContactSubscriptionMap, changes), Q_ARG(Tp::HandleIdentifierMap, identifiers), Q_ARG(Tp::HandleIdentifierMap,removals)); //Can simply use emit in Qt5
}
uint BaseConnectionContactListInterface::Adaptee::contactListState() const