Add context object

This commit is contained in:
Nicolas Fella 2019-02-28 14:18:47 +01:00
parent c9533ff64e
commit b7768ca29f
2 changed files with 3 additions and 3 deletions

View file

@ -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();
}

View file

@ -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();
});
}