@@ -138,7 +138,7 @@ void AddressBookPage::setModel(AddressTableModel *model)
138
138
#endif
139
139
140
140
connect (ui->tableView ->selectionModel (), SIGNAL (selectionChanged (QItemSelection,QItemSelection)),
141
- this , SLOT (selectionChanged ()));
141
+ this , SLOT (selectionChanged ()));
142
142
143
143
// Select row for newly created address
144
144
connect (model, SIGNAL (rowsInserted (QModelIndex,int ,int )), this , SLOT (selectNewAddress (QModelIndex,int ,int )));
@@ -270,7 +270,8 @@ void AddressBookPage::on_exportButton_clicked()
270
270
tr (" Export Address List" ), QString (),
271
271
tr (" Comma separated file (*.csv)" ), NULL );
272
272
273
- if (filename.isNull ()) return ;
273
+ if (filename.isNull ())
274
+ return ;
274
275
275
276
CSVModelWriter writer (filename);
276
277
@@ -279,10 +280,9 @@ void AddressBookPage::on_exportButton_clicked()
279
280
writer.addColumn (" Label" , AddressTableModel::Label, Qt::EditRole);
280
281
writer.addColumn (" Address" , AddressTableModel::Address, Qt::EditRole);
281
282
282
- if (!writer.write ())
283
- {
284
- QMessageBox::critical (this , tr (" Error exporting" ), tr (" Could not write to file %1." ).arg (filename),
285
- QMessageBox::Abort, QMessageBox::Abort);
283
+ if (!writer.write ()) {
284
+ QMessageBox::critical (this , tr (" Exporting Failed" ),
285
+ tr (" There was an error trying to save the address list to %1." ).arg (filename));
286
286
}
287
287
}
288
288
0 commit comments