XDG Portal: quick optimization to avoid dup/close of a file descriptor
Just gift it to QDBusUnixFileDescriptor. Change-Id: Ifa822ecdaaa241968ed7fffd158799041653cf78 Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This commit is contained in:
parent
1bd3c17c46
commit
f5cbd61f92
@ -206,8 +206,8 @@ static inline QDBusMessage xdgDesktopPortalOpenFile(const QUrl &url)
|
||||
QLatin1String("org.freedesktop.portal.OpenURI"),
|
||||
QLatin1String("OpenFile"));
|
||||
|
||||
QDBusUnixFileDescriptor descriptor(fd);
|
||||
qt_safe_close(fd);
|
||||
QDBusUnixFileDescriptor descriptor;
|
||||
descriptor.giveFileDescriptor(fd);
|
||||
|
||||
// FIXME parent_window_id and handle writable option
|
||||
message << QString() << QVariant::fromValue(descriptor) << QVariantMap();
|
||||
|
Loading…
Reference in New Issue
Block a user