aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp1
-rw-r--r--src/qt/bitcoingui.cpp1
-rw-r--r--src/qt/guiutil.cpp1
-rw-r--r--src/qt/intro.cpp14
-rw-r--r--src/qt/intro.h1
-rw-r--r--src/qt/paymentserver.cpp1
-rw-r--r--src/qt/splashscreen.cpp1
7 files changed, 12 insertions, 8 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 4e9180b88c..3b98334696 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -15,7 +15,6 @@
#include "splashscreen.h"
#include "intro.h"
-#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
#include <QApplication>
#include <QMessageBox>
#if QT_VERSION < 0x050000
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 15541f914d..8ec2f03fad 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -28,7 +28,6 @@
#include "macdockiconhandler.h"
#endif
-#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
#include <QApplication>
#include <QMenuBar>
#include <QMenu>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index d51b68e040..32131bc39d 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -7,7 +7,6 @@
#include "util.h"
#include "init.h"
-#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
#include <QApplication>
#include <QDateTime>
#include <QDoubleValidator>
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 51f3c812e4..99db141c94 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -25,6 +25,7 @@ static const uint64 BLOCK_CHAIN_SIZE = 10LL * GB_BYTES;
class FreespaceChecker : public QObject
{
Q_OBJECT
+
public:
FreespaceChecker(Intro *intro);
@@ -61,9 +62,16 @@ void FreespaceChecker::check()
/* Find first parent that exists, so that fs::space does not fail */
fs::path parentDir = dataDir;
+ fs::path parentDirOld = fs::path();
while(parentDir.has_parent_path() && !fs::exists(parentDir))
{
parentDir = parentDir.parent_path();
+
+ /* Check if we make any progress, break if not to prevent an infinite loop here */
+ if (parentDirOld == parentDir)
+ break;
+
+ parentDirOld = parentDir;
}
try {
@@ -72,9 +80,9 @@ void FreespaceChecker::check()
{
if(fs::is_directory(dataDir))
{
- QString separator = QDir::toNativeSeparators("/");
+ QString separator = "<code>" + QDir::toNativeSeparators("/") + tr("name") + "</code>";
replyStatus = ST_OK;
- replyMessage = tr("Directory already exists. Add <code>%1name</code> if you intend to create a new directory here.").arg(separator);
+ replyMessage = tr("Directory already exists. Add %1 if you intend to create a new directory here.").arg(separator);
} else {
replyStatus = ST_ERROR;
replyMessage = tr("Path already exists, and is not a directory.");
@@ -201,7 +209,7 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable
} else {
ui->freeSpace->setStyleSheet("");
}
- ui->freeSpace->setText(freeString+".");
+ ui->freeSpace->setText(freeString + ".");
}
/* Don't allow confirm in ERROR state */
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(status != FreespaceChecker::ST_ERROR);
diff --git a/src/qt/intro.h b/src/qt/intro.h
index b246c65a82..788799b7b0 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -37,6 +37,7 @@ public:
* Determine default data directory for operating system.
*/
static QString getDefaultDataDirectory();
+
signals:
void requestCheck();
void stopThread();
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 8178065bcc..0d31f24a13 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -8,7 +8,6 @@
#include "ui_interface.h"
#include "util.h"
-#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
#include <QApplication>
#include <QByteArray>
#include <QDataStream>
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 43430a858e..22cf04486b 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -2,7 +2,6 @@
#include "clientversion.h"
#include "util.h"
-#undef loop /* Todo: ugh, remove this when the #define loop is gone from util.h */
#include <QApplication>
#include <QPainter>