summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-18 18:38:59 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-18 18:38:59 +0100
commitdb48154e47a9f611b7d3dceb195b14a8953e7abb (patch)
tree9e0a57762c659aa7a8a037daa7d2ef10c73dccc5 /common/resourceaccess.cpp
parent67e83aadde8db2bb1293cee61e8c6306a4ffcca0 (diff)
downloadsink-db48154e47a9f611b7d3dceb195b14a8953e7abb.tar.gz
sink-db48154e47a9f611b7d3dceb195b14a8953e7abb.zip
Reuse the queuedInvoke method for less boilerplate
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 483d83f..c78993b 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -534,7 +534,9 @@ bool ResourceAccess::processMessageBuffer()
534 534
535 d->completeCommands << buffer->id(); 535 d->completeCommands << buffer->id();
536 //The callbacks can result in this object getting destroyed directly, so we need to ensure we finish our work first 536 //The callbacks can result in this object getting destroyed directly, so we need to ensure we finish our work first
537 QMetaObject::invokeMethod(this, "callCallbacks", Qt::QueuedConnection); 537 queuedInvoke([=]() {
538 d->callCallbacks();
539 });
538 break; 540 break;
539 } 541 }
540 case Commands::NotificationCommand: { 542 case Commands::NotificationCommand: {
@@ -575,11 +577,6 @@ bool ResourceAccess::processMessageBuffer()
575 return d->partialMessageBuffer.size() >= headerSize; 577 return d->partialMessageBuffer.size() >= headerSize;
576} 578}
577 579
578void ResourceAccess::callCallbacks()
579{
580 d->callCallbacks();
581}
582
583void ResourceAccess::log(const QString &message) 580void ResourceAccess::log(const QString &message)
584{ 581{
585 Log(d->resourceInstanceIdentifier) << this << message; 582 Log(d->resourceInstanceIdentifier) << this << message;