[plugins/photo] Remove requests from queue when cancel packet is received
This commit is contained in:
parent
2ca09a5ec1
commit
43cac10b6a
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ PhotoPlugin::~PhotoPlugin()
|
||||||
bool PhotoPlugin::receivePacket(const NetworkPacket& np)
|
bool PhotoPlugin::receivePacket(const NetworkPacket& np)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (np.get<bool>(QStringLiteral("cancel"))) {
|
||||||
|
requestedFiles.takeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
if (requestedFiles.isEmpty() || !np.hasPayload()) {
|
if (requestedFiles.isEmpty() || !np.hasPayload()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue