|
|
@ -420,16 +420,15 @@ ScreenCastPortal::start() |
|
|
|
|
|
|
|
|
|
|
|
QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(msg); |
|
|
|
QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(msg); |
|
|
|
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall, this); |
|
|
|
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall, this); |
|
|
|
connect( |
|
|
|
connect(watcher, &QDBusPendingCallWatcher::finished, this, [](QDBusPendingCallWatcher *self) { |
|
|
|
watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *self) { |
|
|
|
self->deleteLater(); |
|
|
|
self->deleteLater(); |
|
|
|
QDBusPendingReply<QDBusObjectPath> reply = *self; |
|
|
|
QDBusPendingReply<QDBusObjectPath> reply = *self; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!reply.isValid()) { |
|
|
|
if (!reply.isValid()) { |
|
|
|
nhlog::ui()->error("org.freedesktop.portal.ScreenCast (Start): {}", |
|
|
|
nhlog::ui()->error("org.freedesktop.portal.ScreenCast (Start): {}", |
|
|
|
reply.error().message().toStdString()); |
|
|
|
reply.error().message().toStdString()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
struct PipeWireStream |
|
|
|
struct PipeWireStream |
|
|
@ -502,7 +501,7 @@ ScreenCastPortal::openPipeWireRemote() |
|
|
|
reply.error().message().toStdString()); |
|
|
|
reply.error().message().toStdString()); |
|
|
|
close(); |
|
|
|
close(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
stream.fd = std::move(reply.value()); |
|
|
|
stream.fd = reply.value(); |
|
|
|
nhlog::ui()->error("org.freedesktop.portal.ScreenCast: fd = {}", |
|
|
|
nhlog::ui()->error("org.freedesktop.portal.ScreenCast: fd = {}", |
|
|
|
stream.fd.fileDescriptor()); |
|
|
|
stream.fd.fileDescriptor()); |
|
|
|
state = State::Started; |
|
|
|
state = State::Started; |
|
|
|