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