Skip to content

Commit

Permalink
[Qt] remove GUIUtil::getSaveFileName() default arguments
Browse files Browse the repository at this point in the history
- harmonize function with GUIUtil::getOpenFileName()
- also make PNG Image singular (grammar)
  • Loading branch information
Philip Kaufmann committed Nov 11, 2013
1 parent a6aa179 commit 4f7d496
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/qt/addressbookpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,9 @@ void AddressBookPage::done(int retval)
void AddressBookPage::on_exportButton_clicked()
{
// CSV is currently the only supported format
QString filename = GUIUtil::getSaveFileName(
this,
tr("Export Address List"), QString(),
tr("Comma separated file (*.csv)"));
QString filename = GUIUtil::getSaveFileName(this,
tr("Export Address List"), QString(),
tr("Comma separated file (*.csv)"), NULL);

if (filename.isNull()) return;

Expand Down
6 changes: 3 additions & 3 deletions src/qt/guiutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ namespace GUIUtil
@param[out] selectedSuffixOut Pointer to return the suffix (file type) that was selected (or 0).
Can be useful when choosing the save file format based on suffix.
*/
QString getSaveFileName(QWidget *parent=0, const QString &caption=QString(),
const QString &dir=QString(), const QString &filter=QString(),
QString *selectedSuffixOut=0);
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,
const QString &filter,
QString *selectedSuffixOut);

/** Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
Expand Down
2 changes: 1 addition & 1 deletion src/qt/receiverequestdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void QRImageWidget::mousePressEvent(QMouseEvent *event)

void QRImageWidget::saveImage()
{
QString fn = GUIUtil::getSaveFileName(this, tr("Save QR Code"), QString(), tr("PNG Images (*.png)"));
QString fn = GUIUtil::getSaveFileName(this, tr("Save QR Code"), QString(), tr("PNG Image (*.png)"), NULL);
if (!fn.isEmpty())
{
exportImage().save(fn);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/transactionview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void TransactionView::exportClicked()
// CSV is currently the only supported format
QString filename = GUIUtil::getSaveFileName(this,
tr("Export Transaction History"), QString(),
tr("Comma separated file (*.csv)"));
tr("Comma separated file (*.csv)"), NULL);

if (filename.isNull())
return;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/walletview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void WalletView::backupWallet()
{
QString filename = GUIUtil::getSaveFileName(this,
tr("Backup Wallet"), QString(),
tr("Wallet Data (*.dat)"));
tr("Wallet Data (*.dat)"), NULL);

if (filename.isEmpty())
return;
Expand Down

0 comments on commit 4f7d496

Please sign in to comment.