split binded to bound/unbound, replaced invokeMetaMethod with Q_EMIT
This commit is contained in:
parent
93287a4836
commit
10ca783442
|
|
@ -399,7 +399,7 @@ bool QueuePrivate::_q_method(const Frame::Method &frame)
|
|||
getOk(frame);
|
||||
break;
|
||||
case bmGetEmpty:
|
||||
QMetaObject::invokeMethod(q, "empty");
|
||||
Q_EMIT q->empty();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -424,7 +424,7 @@ void QueuePrivate::declareOk(const Frame::Method &frame)
|
|||
stream >> messageCount >> consumerCount;
|
||||
qDebug("Message count %d\nConsumer count: %d", messageCount, consumerCount);
|
||||
|
||||
QMetaObject::invokeMethod(q, "declared");
|
||||
Q_EMIT q->declared();
|
||||
}
|
||||
|
||||
void QueuePrivate::deleteOk(const Frame::Method &frame)
|
||||
|
|
@ -438,25 +438,26 @@ void QueuePrivate::deleteOk(const Frame::Method &frame)
|
|||
qint32 messageCount = 0;
|
||||
stream >> messageCount;
|
||||
qDebug("Message count %d", messageCount);
|
||||
QMetaObject::invokeMethod(q, "removed");
|
||||
|
||||
Q_EMIT q->removed();
|
||||
}
|
||||
|
||||
void QueuePrivate::bindOk(const Frame::Method &frame)
|
||||
{
|
||||
Q_UNUSED(frame)
|
||||
Q_Q(Queue);
|
||||
|
||||
qDebug() << "bound to queue: " << name;
|
||||
QMetaObject::invokeMethod(q, "binded", Q_ARG(bool, true));
|
||||
Q_Q(Queue);
|
||||
qDebug() << Q_FUNC_INFO << "bound to queue: " << name;
|
||||
Q_EMIT q->bound();
|
||||
}
|
||||
|
||||
void QueuePrivate::unbindOk(const Frame::Method &frame)
|
||||
{
|
||||
Q_UNUSED(frame)
|
||||
Q_Q(Queue);
|
||||
|
||||
qDebug() << "unbound queue: " << name;
|
||||
QMetaObject::invokeMethod(q, "binded", Q_ARG(bool, false));
|
||||
Q_Q(Queue);
|
||||
qDebug() << Q_FUNC_INFO << "unbound queue: " << name;
|
||||
Q_EMIT q->unbound();
|
||||
}
|
||||
|
||||
void QueuePrivate::getOk(const Frame::Method &frame)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ public:
|
|||
void declare(const QString &name = QString(),
|
||||
QueueOptions options = QueueOptions(Durable | AutoDelete));
|
||||
void remove(bool ifUnused = true, bool ifEmpty = true, bool noWait = true);
|
||||
|
||||
void purge();
|
||||
|
||||
void bind(const QString &exchangeName, const QString &key);
|
||||
|
|
@ -70,7 +69,8 @@ public:
|
|||
|
||||
Q_SIGNALS:
|
||||
void declared();
|
||||
void binded(bool);
|
||||
void bound();
|
||||
void unbound();
|
||||
void removed();
|
||||
void messageReceived(Queue *pQueue);
|
||||
void empty();
|
||||
|
|
|
|||
Loading…
Reference in New Issue