standardize MessageProperties throughout codebase

This commit is contained in:
Matt Broadstone 2014-06-10 09:16:04 -04:00
parent 4422924219
commit 4ff7683536
5 changed files with 5 additions and 7 deletions

View File

@ -419,6 +419,7 @@ namespace Frame
} // namespace Frame
typedef QHash<Frame::Content::Property, QVariant> MessageProperties;
typedef Frame::Content::Property MessageProperty;
} // namespace QAMQP

View File

@ -55,7 +55,7 @@ QByteArray Message::payload() const
return d->payload;
}
QHash<Message::MessageProperty, QVariant> Message::properties() const
MessageProperties Message::properties() const
{
return d->properties;
}

View File

@ -20,15 +20,12 @@ public:
Message &operator=(const Message &other);
~Message();
typedef Frame::Content::Property MessageProperty;
Q_DECLARE_FLAGS(MessageProperties, MessageProperty)
qlonglong deliveryTag() const;
bool redelivered() const;
QString exchangeName() const;
QString routingKey() const;
QByteArray payload() const;
QHash<MessageProperty, QVariant> properties() const;
MessageProperties properties() const;
Frame::TableField headers() const;
private:

View File

@ -20,7 +20,7 @@ public:
QString routingKey;
QByteArray payload;
QHash<Message::MessageProperty, QVariant> properties;
MessageProperties properties;
Frame::TableField headers;
int leftSize;

View File

@ -93,7 +93,7 @@ void QueuePrivate::_q_content(const Frame::Content &frame)
QHash<int, QVariant>::ConstIterator it;
QHash<int, QVariant>::ConstIterator itEnd = frame.properties_.constEnd();
for (it = frame.properties_.constBegin(); it != itEnd; ++it)
message.d->properties[Message::MessageProperty(it.key())] = it.value();
message.d->properties[MessageProperty(it.key())] = it.value();
}
void QueuePrivate::_q_body(const Frame::ContentBody &frame)