removed (no label) string if we have NO label

(partial of 9e0dba8c17)
This commit is contained in:
Philip Kaufmann
2012-04-11 14:21:15 +02:00
committed by Luke Dashjr
parent 06de079091
commit 760d9480ed

View File

@@ -308,8 +308,8 @@ void AddressBookPage::on_showQRCode_clicked()
foreach (QModelIndex index, indexes)
{
QString address = index.data().toString(),
label = index.sibling(index.row(), 0).data().toString(),
title = QString("%1 << %2 >>").arg(label).arg(address);
label = index.sibling(index.row(), 0).data(Qt::EditRole).toString(),
title = QString("%1%2<< %3 >>").arg(label).arg(label.isEmpty() ? "" : " ").arg(address);
QRCodeDialog *d = new QRCodeDialog(title, address, label, tab == ReceivingTab, this);
d->show();