From 297dae7f5e5317cc63d5bb1e49b02752930d0b3b Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Thu, 1 Nov 2018 15:32:34 -0700 Subject: [PATCH] mingw compiler --- .travis.yml | 6 +++--- src/connection.cpp | 13 +++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d0d1ae..a0a04ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ matrix: compiler: clang addons: apt: - sources: ['llvm-toolchain-trusty-5.0'] - packages: ['clang-5.0'] + sources: ['llvm-toolchain-precise-3.7'] + packages: ['clang-3.7'] env: - MATRIX_EVAL="CC=clang CXX=clang++" @@ -29,6 +29,6 @@ before_install: script: - qmake -v - clang++ -v - - g++-8 -v + - g++ -v - qmake zec-qt-wallet.pro CONFIG+=release -spec linux-clang - make $MATRIX_EVAL diff --git a/src/connection.cpp b/src/connection.cpp index dab9cb4..a8cf863 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -47,13 +47,10 @@ ConnectionLoader::~ConnectionLoader() { void ConnectionLoader::loadConnection() { // Priority 1: Try to connect to detect zcash.conf and connect to it. - bool isZcashConfPresent = false; auto config = autoDetectZcashConf(); // If not autodetected, go and read the UI Settings - if (config.get() != nullptr) { - isZcashConfPresent = true; - } else { + if (config.get() == nullptr) { config = loadFromSettings(); if (config.get() == nullptr) { @@ -118,13 +115,13 @@ void ConnectionLoader::refreshZcashdState(Connection* connection) { % "If you are connecting to a remote/non-standard node " % "please set the host/port and user/password in the File->Settings menu"; - showError(explanation); + this->showError(explanation); } else if (err == QNetworkReply::NetworkError::AuthenticationRequiredError) { auto explanation = QString() % "Authentication failed. The username / password you specified was " % "not accepted by zcashd. Try changing it in the File->Settings menu"; - showError(explanation); + this->showError(explanation); } else if (err == QNetworkReply::NetworkError::InternalServerError && !res.is_discarded()) { // The server is loading, so just poll until it succeeds QString status = QString::fromStdString(res["error"]["message"]); @@ -292,9 +289,9 @@ void Connection::doRPC(const json& payload, const std::function& cb, void Connection::doRPCWithDefaultErrorHandling(const json& payload, const std::function& cb) { doRPC(payload, cb, [=] (auto reply, auto parsed) { if (!parsed.is_discarded() && !parsed["error"]["message"].is_null()) { - showTxError(QString::fromStdString(parsed["error"]["message"])); + this->showTxError(QString::fromStdString(parsed["error"]["message"])); } else { - showTxError(reply->errorString()); + this->showTxError(reply->errorString()); } }); }