removed (no label) string if we have NO label
authorPhilip Kaufmann <phil.kaufmann@t-online.de>
Wed, 11 Apr 2012 12:21:15 +0000 (14:21 +0200)
committerLuke Dashjr <luke-jr+git@utopios.org>
Sat, 14 Apr 2012 19:11:28 +0000 (15:11 -0400)
(partial of 9e0dba8c17eb6507083b4d7602541c25f1fd7f38)

src/qt/addressbookpage.cpp

index 76aa87b..387043a 100644 (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();