From 009c3131f5117e5826901f4db519fceb448ed536 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Sat, 31 Jan 2015 12:44:25 -0500 Subject: [PATCH] add two new properties, changed the name of one QAmqpQueue and QAmqpExchange both now have an isDeclared property, and QAmqpChannel::isOpened was renamed to isOpen to more closely follow Qt style/api guidelines --- src/qamqpchannel.cpp | 2 +- src/qamqpchannel.h | 4 ++-- src/qamqpexchange.cpp | 6 ++++++ src/qamqpexchange.h | 2 ++ src/qamqpqueue.cpp | 6 ++++++ src/qamqpqueue.h | 1 + 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/qamqpchannel.cpp b/src/qamqpchannel.cpp index 9316200..5a1160a 100644 --- a/src/qamqpchannel.cpp +++ b/src/qamqpchannel.cpp @@ -280,7 +280,7 @@ void QAmqpChannel::setName(const QString &name) d->name = name; } -bool QAmqpChannel::isOpened() const +bool QAmqpChannel::isOpen() const { Q_D(const QAmqpChannel); return d->opened; diff --git a/src/qamqpchannel.h b/src/qamqpchannel.h index b99bbf2..ef14f09 100644 --- a/src/qamqpchannel.h +++ b/src/qamqpchannel.h @@ -10,13 +10,13 @@ class QAMQP_EXPORT QAmqpChannel : public QObject { Q_OBJECT Q_PROPERTY(int number READ channelNumber CONSTANT) - Q_PROPERTY(bool opened READ isOpened CONSTANT) + Q_PROPERTY(bool open READ isOpen CONSTANT) Q_PROPERTY(QString name READ name WRITE setName) public: virtual ~QAmqpChannel(); int channelNumber() const; - bool isOpened() const; + bool isOpen() const; QString name() const; void setName(const QString &name); diff --git a/src/qamqpexchange.cpp b/src/qamqpexchange.cpp index ff38b55..a18c71a 100644 --- a/src/qamqpexchange.cpp +++ b/src/qamqpexchange.cpp @@ -224,6 +224,12 @@ QString QAmqpExchange::type() const return d->type; } +bool QAmqpExchange::isDeclared() const +{ + Q_D(const QAmqpExchange); + return d->declared; +} + void QAmqpExchange::declare(ExchangeType type, ExchangeOptions options, const QAmqpTable &args) { declare(QAmqpExchangePrivate::typeToString(type), options, args); diff --git a/src/qamqpexchange.h b/src/qamqpexchange.h index 122155b..2335654 100644 --- a/src/qamqpexchange.h +++ b/src/qamqpexchange.h @@ -52,6 +52,8 @@ public: Q_DECLARE_FLAGS(ExchangeOptions, ExchangeOption) ExchangeOptions options() const; + bool isDeclared() const; + // AMQP Exchange void declare(ExchangeType type = Direct, ExchangeOptions options = NoOptions, diff --git a/src/qamqpqueue.cpp b/src/qamqpqueue.cpp index c5ea577..29b41fb 100644 --- a/src/qamqpqueue.cpp +++ b/src/qamqpqueue.cpp @@ -479,6 +479,12 @@ bool QAmqpQueue::isConsuming() const return d->consuming; } +bool QAmqpQueue::isDeclared() const +{ + Q_D(const QAmqpQueue); + return d->declared; +} + void QAmqpQueue::get(bool noAck) { Q_D(QAmqpQueue); diff --git a/src/qamqpqueue.h b/src/qamqpqueue.h index 8a33b06..aa873f7 100644 --- a/src/qamqpqueue.h +++ b/src/qamqpqueue.h @@ -52,6 +52,7 @@ public: ~QAmqpQueue(); bool isConsuming() const; + bool isDeclared() const; void setConsumerTag(const QString &consumerTag); QString consumerTag() const;