From b1cd8e48c3380c3324956d646017cca11ac3ab3a Mon Sep 17 00:00:00 2001 From: Ernesto De Stefano Date: Wed, 3 Feb 2016 22:59:42 +0100 Subject: [PATCH 1/7] Update qamqpqueue.cpp --- src/qamqpqueue.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qamqpqueue.cpp b/src/qamqpqueue.cpp index 5a398c7..4473fe7 100644 --- a/src/qamqpqueue.cpp +++ b/src/qamqpqueue.cpp @@ -18,7 +18,8 @@ QAmqpQueuePrivate::QAmqpQueuePrivate(QAmqpQueue *q) declared(false), recievingMessage(false), consuming(false), - consumeRequested(false) + consumeRequested(false), + arguments(QAmqpTable()) { } @@ -264,7 +265,7 @@ void QAmqpQueuePrivate::declare() out << qint16(0); //reserved 1 QAmqpFrame::writeAmqpField(out, QAmqpMetaType::ShortString, name); out << qint8(options); - QAmqpFrame::writeAmqpField(out, QAmqpMetaType::Hash, QAmqpTable()); + QAmqpFrame::writeAmqpField(out, QAmqpMetaType::Hash, arguments); frame.setArguments(arguments); sendFrame(frame); @@ -328,10 +329,11 @@ int QAmqpQueue::options() const return d->options; } -void QAmqpQueue::declare(int options) +void QAmqpQueue::declare(int options, const QAmqpTable arguments) { Q_D(QAmqpQueue); d->options = options; + d->arguments = arguments; if (!d->opened) { d->delayedDeclare = true; From 39d4b5e0867f9c4b0a846362fbccb77694521be0 Mon Sep 17 00:00:00 2001 From: Ernesto De Stefano Date: Thu, 4 Feb 2016 10:59:09 +0100 Subject: [PATCH 2/7] Update qamqpqueue.h --- src/qamqpqueue.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qamqpqueue.h b/src/qamqpqueue.h index ebd0d85..64507d4 100644 --- a/src/qamqpqueue.h +++ b/src/qamqpqueue.h @@ -23,6 +23,7 @@ #include "qamqpchannel.h" #include "qamqpmessage.h" #include "qamqpglobal.h" +#include "qamqptable.h" class QAmqpClient; class QAmqpClientPrivate; @@ -88,7 +89,7 @@ Q_SIGNALS: public Q_SLOTS: // AMQP Queue - void declare(int options = Durable|AutoDelete); + void declare(int options = Durable|AutoDelete, const QAmqpTable arguments = QAmqpTable()); void bind(const QString &exchangeName, const QString &key); void bind(QAmqpExchange *exchange, const QString &key); void unbind(const QString &exchangeName, const QString &key); From 8a86c1350a6a882b2d559d03d8f47a3737edd7e2 Mon Sep 17 00:00:00 2001 From: Ernesto De Stefano Date: Thu, 4 Feb 2016 11:05:28 +0100 Subject: [PATCH 3/7] Update qamqpqueue_p.h --- src/qamqpqueue_p.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qamqpqueue_p.h b/src/qamqpqueue_p.h index 23ba928..7795be3 100644 --- a/src/qamqpqueue_p.h +++ b/src/qamqpqueue_p.h @@ -55,6 +55,8 @@ public: bool consumeRequested; Q_DECLARE_PUBLIC(QAmqpQueue) + private: + QAmqpTable arguments; }; From cbc2db02e6049eb7647fbd5d140675f466e062b6 Mon Sep 17 00:00:00 2001 From: Ernesto De Stefano Date: Thu, 4 Feb 2016 14:17:13 +0100 Subject: [PATCH 4/7] Update qamqpqueue_p.h --- src/qamqpqueue_p.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qamqpqueue_p.h b/src/qamqpqueue_p.h index 7795be3..23ba928 100644 --- a/src/qamqpqueue_p.h +++ b/src/qamqpqueue_p.h @@ -55,8 +55,6 @@ public: bool consumeRequested; Q_DECLARE_PUBLIC(QAmqpQueue) - private: - QAmqpTable arguments; }; From cbfa5d47710538d88b643b8e11d10ecd34a44c5f Mon Sep 17 00:00:00 2001 From: Ernesto De Stefano Date: Thu, 4 Feb 2016 14:17:42 +0100 Subject: [PATCH 5/7] Update qamqpqueue.cpp --- src/qamqpqueue.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qamqpqueue.cpp b/src/qamqpqueue.cpp index 4473fe7..7f7699d 100644 --- a/src/qamqpqueue.cpp +++ b/src/qamqpqueue.cpp @@ -18,8 +18,7 @@ QAmqpQueuePrivate::QAmqpQueuePrivate(QAmqpQueue *q) declared(false), recievingMessage(false), consuming(false), - consumeRequested(false), - arguments(QAmqpTable()) + consumeRequested(false) { } From 9d567c4aff2558307116d02b3b09ce6289662aad Mon Sep 17 00:00:00 2001 From: Ernesto De Stefano Date: Thu, 4 Feb 2016 14:21:45 +0100 Subject: [PATCH 6/7] Update qamqpqueue.h --- src/qamqpqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qamqpqueue.h b/src/qamqpqueue.h index 64507d4..0b5895e 100644 --- a/src/qamqpqueue.h +++ b/src/qamqpqueue.h @@ -89,7 +89,7 @@ Q_SIGNALS: public Q_SLOTS: // AMQP Queue - void declare(int options = Durable|AutoDelete, const QAmqpTable arguments = QAmqpTable()); + void declare(int options = Durable|AutoDelete, const QAmqpTable& arguments); void bind(const QString &exchangeName, const QString &key); void bind(QAmqpExchange *exchange, const QString &key); void unbind(const QString &exchangeName, const QString &key); From 20c9d69875c10687f4c57635fb6bd6adaf00ca14 Mon Sep 17 00:00:00 2001 From: laboratorio Date: Thu, 4 Feb 2016 16:31:10 +0100 Subject: [PATCH 7/7] QAmqpTable arguments derives from channel private. --- src/qamqpchannel_p.h | 2 ++ src/qamqpexchange_p.h | 1 - src/qamqpqueue.cpp | 2 +- src/qamqpqueue.h | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qamqpchannel_p.h b/src/qamqpchannel_p.h index 8bb9679..e902e86 100644 --- a/src/qamqpchannel_p.h +++ b/src/qamqpchannel_p.h @@ -3,6 +3,7 @@ #include #include "qamqpframe_p.h" +#include "qamqptable.h" #define METHOD_ID_ENUM(name, id) name = id, name ## Ok @@ -77,6 +78,7 @@ public: Q_DECLARE_PUBLIC(QAmqpChannel) QAmqpChannel * const q_ptr; + QAmqpTable arguments; }; #endif // QAMQPCHANNEL_P_H diff --git a/src/qamqpexchange_p.h b/src/qamqpexchange_p.h index cb6ccbb..9e0e929 100644 --- a/src/qamqpexchange_p.h +++ b/src/qamqpexchange_p.h @@ -34,7 +34,6 @@ public: QString type; QAmqpExchange::ExchangeOptions options; - QAmqpTable arguments; bool delayedDeclare; bool declared; qlonglong nextDeliveryTag; diff --git a/src/qamqpqueue.cpp b/src/qamqpqueue.cpp index 7f7699d..da19e5c 100644 --- a/src/qamqpqueue.cpp +++ b/src/qamqpqueue.cpp @@ -328,7 +328,7 @@ int QAmqpQueue::options() const return d->options; } -void QAmqpQueue::declare(int options, const QAmqpTable arguments) +void QAmqpQueue::declare(int options, const QAmqpTable &arguments) { Q_D(QAmqpQueue); d->options = options; diff --git a/src/qamqpqueue.h b/src/qamqpqueue.h index 0b5895e..45d2bf7 100644 --- a/src/qamqpqueue.h +++ b/src/qamqpqueue.h @@ -89,7 +89,7 @@ Q_SIGNALS: public Q_SLOTS: // AMQP Queue - void declare(int options = Durable|AutoDelete, const QAmqpTable& arguments); + void declare(int options = Durable|AutoDelete, const QAmqpTable &arguments = QAmqpTable()); void bind(const QString &exchangeName, const QString &key); void bind(QAmqpExchange *exchange, const QString &key); void unbind(const QString &exchangeName, const QString &key);