Commit 20f29edd authored by Jan Grulich's avatar Jan Grulich
Browse files

Screencast: fix window stream restoration

PlasmaWindowModel doesn't reimplement QAbstractItemModel::itemData()
and when we call it in order to save information about the window we
are going to restore, we will miss UUID of the window, which is the
most important information we require to be able to restore stream.
parent fd0bee06
Pipeline #197011 passed with stage
in 2 minutes and 28 seconds
......@@ -233,11 +233,15 @@ uint ScreenCastPortal::Start(const QDBusObjectPath &handle,
const QModelIndex index = model.index(i, 0);
if (model.data(index, KWayland::Client::PlasmaWindowModel::Uuid) == windowUuid) {
selectedWindows << model.itemData(index);
// For some reason itemData() doesn't return a map with all the data
// we need and for example UUID is missing, which is the most important
// information we need for stream restoration.
QMap<int, QVariant> data = model.itemData(index);
data.insert(KWayland::Client::PlasmaWindowModel::Uuid, windowUuid);
selectedWindows << data;
}
}
}
QByteArray payloadSerialised;
valid = selectedWindows.count() == restoreWindows.count();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment