QDBusConnectionPrivate: Use enum for mode argument of sendWithReply
Change type of mode argument to QDBus::CallMode instead of int. Also change the argument name in the implementation to much the declaration. Change-Id: Ice19bfff72f3bf1f4a5748f2caa16999e87a131f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
babdeb7a10
commit
3fa3e56e64
@ -177,7 +177,7 @@ public:
|
|||||||
QObject *obj, const char *member);
|
QObject *obj, const char *member);
|
||||||
|
|
||||||
bool send(const QDBusMessage &message);
|
bool send(const QDBusMessage &message);
|
||||||
QDBusMessage sendWithReply(const QDBusMessage &message, int mode, int timeout = -1);
|
QDBusMessage sendWithReply(const QDBusMessage &message, QDBus::CallMode mode, int timeout = -1);
|
||||||
QDBusMessage sendWithReplyLocal(const QDBusMessage &message);
|
QDBusMessage sendWithReplyLocal(const QDBusMessage &message);
|
||||||
QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
|
QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
|
||||||
const char *returnMethod, const char *errorMethod,int timeout = -1);
|
const char *returnMethod, const char *errorMethod,int timeout = -1);
|
||||||
|
@ -2027,9 +2027,8 @@ private:
|
|||||||
QElapsedTimer m_callTimer;
|
QElapsedTimer m_callTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
|
QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
|
||||||
int sendMode, int timeout)
|
QDBus::CallMode mode, int timeout)
|
||||||
{
|
{
|
||||||
QDBusBlockingCallWatcher watcher(message);
|
QDBusBlockingCallWatcher watcher(message);
|
||||||
|
|
||||||
@ -2038,7 +2037,7 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
|
|||||||
|
|
||||||
if (pcall->replyMessage.type() == QDBusMessage::InvalidMessage) {
|
if (pcall->replyMessage.type() == QDBusMessage::InvalidMessage) {
|
||||||
// need to wait for the reply
|
// need to wait for the reply
|
||||||
if (sendMode == QDBus::BlockWithGui) {
|
if (mode == QDBus::BlockWithGui) {
|
||||||
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
loop.connect(pcall->watcherHelper, &QDBusPendingCallWatcherHelper::reply, &loop, &QEventLoop::quit);
|
loop.connect(pcall->watcherHelper, &QDBusPendingCallWatcherHelper::reply, &loop, &QEventLoop::quit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user