X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Faddressbookpage.cpp;h=32d05053ce0f99522534058e9c4ecd4e829559e2;hb=6ec9d30905e8df77e60d0195074920271abb977a;hp=b5a798ca31f233c295e21981c4153748bc8be9bd;hpb=2bc4fd609ca00d5a5cb0b6b3eba5f35cb334b967;p=novacoin.git diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index b5a798c..32d0505 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -122,11 +121,6 @@ void AddressBookPage::setModel(AddressTableModel *model) connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(selectionChanged())); - if(mode == ForSending) - { - // Auto-select first row when in sending mode - ui->tableView->selectRow(0); - } selectionChanged(); } @@ -277,10 +271,9 @@ void AddressBookPage::done(int retval) void AddressBookPage::exportClicked() { // CSV is currently the only supported format - QString filename = QFileDialog::getSaveFileName( + QString filename = GUIUtil::getSaveFileName( this, - tr("Export Address Book Data"), - QDir::currentPath(), + tr("Export Address Book Data"), QString(), tr("Comma separated file (*.csv)")); if (filename.isNull()) return; @@ -310,8 +303,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();