mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-20 04:36:08 +01:00
Qt5 compatibility
This commit squashes all the changes in the Qt5 branch relative to master. Backward compatibility with Qt4 is retained. Original authors: - Philip Kaufmann <phil.kaufmann@t-online.de> - Jonas Schnelli <jonas.schnelli@include7.ch>
This commit is contained in:
@@ -21,7 +21,11 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QAction>
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QDesktopServices>
|
||||
#else
|
||||
#include <QStandardPaths>
|
||||
#endif
|
||||
#include <QFileDialog>
|
||||
#include <QPushButton>
|
||||
|
||||
@@ -232,7 +236,11 @@ void WalletView::encryptWallet(bool status)
|
||||
|
||||
void WalletView::backupWallet()
|
||||
{
|
||||
#if QT_VERSION < 0x050000
|
||||
QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
|
||||
#else
|
||||
QString saveDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
#endif
|
||||
QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)"));
|
||||
if (!filename.isEmpty()) {
|
||||
if (!walletModel->backupWallet(filename)) {
|
||||
|
||||
Reference in New Issue
Block a user