add roForce to Queue, replace forceRemove
This commit is contained in:
parent
566de2e4d4
commit
8e2b66677d
|
|
@ -302,11 +302,6 @@ void Queue::declare(int options)
|
||||||
d->declare();
|
d->declare();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Queue::forceRemove()
|
|
||||||
{
|
|
||||||
remove(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Queue::remove(int options)
|
void Queue::remove(int options)
|
||||||
{
|
{
|
||||||
Q_D(Queue);
|
Q_D(Queue);
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ public:
|
||||||
Q_DECLARE_FLAGS(ConsumeOptions, ConsumeOption)
|
Q_DECLARE_FLAGS(ConsumeOptions, ConsumeOption)
|
||||||
|
|
||||||
enum RemoveOption {
|
enum RemoveOption {
|
||||||
|
roForce = 0x0,
|
||||||
roIfUnused = 0x1,
|
roIfUnused = 0x1,
|
||||||
roIfEmpty = 0x02,
|
roIfEmpty = 0x02,
|
||||||
roNoWait = 0x04
|
roNoWait = 0x04
|
||||||
|
|
@ -68,7 +69,6 @@ public:
|
||||||
void unbind(Exchange *exchange, const QString &key);
|
void unbind(Exchange *exchange, const QString &key);
|
||||||
void purge();
|
void purge();
|
||||||
void remove(int options = roIfUnused|roIfEmpty|roNoWait);
|
void remove(int options = roIfUnused|roIfEmpty|roNoWait);
|
||||||
void forceRemove();
|
|
||||||
|
|
||||||
// AMQP Basic
|
// AMQP Basic
|
||||||
void consume(int options = NoOptions);
|
void consume(int options = NoOptions);
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ void tst_QAMQPQueue::removeIfEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up queue
|
// clean up queue
|
||||||
queue->forceRemove();
|
queue->remove(Queue::roForce);
|
||||||
QVERIFY(waitForSignal(queue, SIGNAL(removed())));
|
QVERIFY(waitForSignal(queue, SIGNAL(removed())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -244,7 +244,7 @@ void tst_QAMQPQueue::purge()
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up queue
|
// clean up queue
|
||||||
queue->forceRemove();
|
queue->remove(Queue::roForce);
|
||||||
QVERIFY(waitForSignal(queue, SIGNAL(removed())));
|
QVERIFY(waitForSignal(queue, SIGNAL(removed())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue