Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storage of Queues and Exchanges to QAmqpClient. #27

Merged
merged 18 commits into from
Jun 8, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
QAmqpChannelHash: Store empty/null strings as null strings.
  • Loading branch information
Stuart Longland committed May 2, 2015
commit e43224877fc5958b10d3af1f9f837b14790d6699
10 changes: 5 additions & 5 deletions src/qamqpchannelhash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 30,8 @@
*/
QAmqpChannel* QAmqpChannelHash::get(const QString& name) const
{
if (name.isNull())
return channels.value(QString(""));
if (name.isEmpty())
return channels.value(QString());
return channels.value(name);
}

Expand All @@ -41,8 41,8 @@ QAmqpChannel* QAmqpChannelHash::get(const QString& name) const
*/
bool QAmqpChannelHash::contains(const QString& name) const
{
if (name.isNull())
return channels.contains(QString(""));
if (name.isEmpty())
return channels.contains(QString());
return channels.contains(name);
}

Expand All @@ -53,7 53,7 @@ bool QAmqpChannelHash::contains(const QString& name) const
void QAmqpChannelHash::put(QAmqpExchange* exchange)
{
if (exchange->name().isEmpty())
put(QString(""), exchange);
put(QString(), exchange);
else
put(exchange->name(), exchange);
}
Expand Down