From b7768ca29f22a84a99996ae15068a33db2cf3df7 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Thu, 28 Feb 2019 14:18:47 +0100 Subject: [PATCH] Add context object --- cli/kdeconnect-cli.cpp | 2 +- plugins/sftp/mounter.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/kdeconnect-cli.cpp b/cli/kdeconnect-cli.cpp index 4978f330c..27274757f 100644 --- a/cli/kdeconnect-cli.cpp +++ b/cli/kdeconnect-cli.cpp @@ -182,7 +182,7 @@ int main(int argc, char** argv) QTextStream(stderr) << i18n("waiting for device...") << endl; blockOnReply(iface.acquireDiscoveryMode(id)); - QObject::connect(&iface, &DaemonDbusInterface::deviceAdded, [&](const QString& deviceAddedId) { + QObject::connect(&iface, &DaemonDbusInterface::deviceAdded, &iface, [&](const QString& deviceAddedId) { if (device == deviceAddedId) { wait.quit(); } diff --git a/plugins/sftp/mounter.cpp b/plugins/sftp/mounter.cpp index 5480f4caf..2779f2640 100644 --- a/plugins/sftp/mounter.cpp +++ b/plugins/sftp/mounter.cpp @@ -168,10 +168,10 @@ void Mounter::onStarted() //m_proc->setStandardErrorFile("/tmp/kdeconnect-sftp.err"); auto proc = m_proc; - connect(m_proc, &KProcess::readyReadStandardError, [proc]() { + connect(m_proc, &KProcess::readyReadStandardError, this, [proc]() { qCDebug(KDECONNECT_PLUGIN_SFTP) << "stderr: " << proc->readAll(); }); - connect(m_proc, &KProcess::readyReadStandardOutput, [proc]() { + connect(m_proc, &KProcess::readyReadStandardOutput, this, [proc]() { qCDebug(KDECONNECT_PLUGIN_SFTP) << "stdout:" << proc->readAll(); }); }