Commit b38b1251 authored by David Redondo's avatar David Redondo 🏎
Browse files

WaylandTasksModel: Extract uuids from mimedata

We are using uuids now. See above in this class where we return the uuid for the  mime data.
CCBUG:436823
parent 470d3e9f
......@@ -749,7 +749,7 @@ void WaylandTasksModel::requestPublishDelegateGeometry(const QModelIndex &index,
window->setMinimizedGeometry(surface, rect);
}
quint32 WaylandTasksModel::winIdFromMimeData(const QMimeData *mimeData, bool *ok)
QUuid WaylandTasksModel::winIdFromMimeData(const QMimeData *mimeData, bool *ok)
{
Q_ASSERT(mimeData);
......@@ -761,15 +761,16 @@ quint32 WaylandTasksModel::winIdFromMimeData(const QMimeData *mimeData, bool *ok
return 0;
}
quint32 id = mimeData->data(Private::mimeType()).toUInt(ok);
QUuid id(mimeData->data(Private::mimeType()));
*ok = !id.isNull();
return id;
}
QList<quint32> WaylandTasksModel::winIdsFromMimeData(const QMimeData *mimeData, bool *ok)
QList<QUuid> WaylandTasksModel::winIdsFromMimeData(const QMimeData *mimeData, bool *ok)
{
Q_ASSERT(mimeData);
QList<quint32> ids;
QList<QUuid> ids;
if (ok) {
*ok = false;
......@@ -778,7 +779,7 @@ QList<quint32> WaylandTasksModel::winIdsFromMimeData(const QMimeData *mimeData,
if (!mimeData->hasFormat(Private::groupMimeType())) {
// Try to extract single window id.
bool singularOk;
WId id = winIdFromMimeData(mimeData, &singularOk);
QUuid id = winIdFromMimeData(mimeData, &singularOk);
if (ok) {
*ok = singularOk;
......
......@@ -221,7 +221,7 @@ public:
* @param mimeData Some mime data.
* @param @ok Set to true or false on success or failure.
*/
static quint32 winIdFromMimeData(const QMimeData *mimeData, bool *ok = nullptr);
static QUuid winIdFromMimeData(const QMimeData *mimeData, bool *ok = nullptr);
/**
* Tries to extract process-internal Wayland window ids from supplied mime data.
......@@ -229,7 +229,7 @@ public:
* @param mimeData Some mime data.
* @param @ok Set to true or false on success or failure.
*/
static QList<quint32> winIdsFromMimeData(const QMimeData *mimeData, bool *ok = nullptr);
static QList<QUuid> winIdsFromMimeData(const QMimeData *mimeData, bool *ok = nullptr);
private:
class Private;
......
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