aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletview.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-05-31 14:02:24 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2013-06-01 11:05:08 +0200
commit25c0cce7fb494fcb871d134e28b26504d30e34d3 (patch)
treec6fb9d0daa4675999cfa57d4f3668e2990dc9368 /src/qt/walletview.cpp
parent365ab225c082277076debeb68ddd75e73f71ac26 (diff)
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>
Diffstat (limited to 'src/qt/walletview.cpp')
-rw-r--r--src/qt/walletview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 6d44c174b7..277c056693 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -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)) {