mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add extra checks so we never return empty QMimeData from mimeData().
This commit is contained in:
parent
91868969ca
commit
4b3bee6400
@ -227,8 +227,14 @@ QMimeData* EntryModel::mimeData(const QModelIndexList& indexes) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data->setData(mimeTypes().first(), encoded);
|
if (seenEntries.isEmpty()) {
|
||||||
return data;
|
delete data;
|
||||||
|
return Q_NULLPTR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data->setData(mimeTypes().first(), encoded);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryModel::entryAboutToAdd(Entry* entry)
|
void EntryModel::entryAboutToAdd(Entry* entry)
|
||||||
|
@ -313,8 +313,14 @@ QMimeData* GroupModel::mimeData(const QModelIndexList& indexes) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data->setData(mimeTypes().first(), encoded);
|
if (seenGroups.isEmpty()) {
|
||||||
return data;
|
delete data;
|
||||||
|
return Q_NULLPTR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
data->setData(mimeTypes().first(), encoded);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupModel::groupDataChanged(Group* group)
|
void GroupModel::groupDataChanged(Group* group)
|
||||||
|
Loading…
Reference in New Issue
Block a user