Browse Source

mingw compiler

import_zecw
Aditya Kulkarni 6 years ago
parent
commit
297dae7f5e
  1. 6
      .travis.yml
  2. 13
      src/connection.cpp

6
.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

13
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<void(json)>& cb,
void Connection::doRPCWithDefaultErrorHandling(const json& payload, const std::function<void(json)>& 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());
}
});
}

Loading…
Cancel
Save