Skip to content

Commit

Permalink
Add the batch of release v3.4.5 commits
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-at-bcn committed Jun 11, 2019
1 parent 85d7885 commit 4559563
Showing 8 changed files with 39 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bytecoin-gui

[![Build Status](https://dev.azure.com/bcndev/bytecoin/_apis/build/status/bytecoin-desktop?branchName=releases/3.4.4)](https://dev.azure.com/bcndev/bytecoin/_build/latest?definitionId=2&branchName=releases/3.4.4)
[![Build Status](https://dev.azure.com/bcndev/bytecoin/_apis/build/status/bytecoin-desktop?branchName=releases/3.4.5)](https://dev.azure.com/bcndev/bytecoin/_build/latest?definitionId=2&branchName=releases/3.4.5)

## How to build binaries from source code

6 changes: 6 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Release Notes

### v3.4.5 (Amethyst)

- Disabled asking passwords for wallets with empty passwords.
- Disabled asking passwords for hardware wallets.
- Updated the Bytecoin daemons.

### v3.4.4 (Amethyst)

- Added a menu item to create hardware wallets.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -88,6 +88,7 @@ jobs:
displayName: Clone desktop code
- script: |
sudo apt-get update
sudo apt-get install -y qt5-qmake qtbase5-dev qtbase5-dev-tools qt5-default
displayName: Install qt
25 changes: 24 additions & 1 deletion src/application.cpp
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ WalletApplication::WalletApplication(int& argc, char** argv)
, walletd_(nullptr)
, walletModel_(new WalletModel(this))
, downloader_(new FileDownloader(this))
, tryToOpenWithEmptyPassword_(false)
, crashDialog_(new CrashDialog())
, m_isAboutToQuit(false)
{
@@ -148,8 +149,11 @@ bool WalletApplication::init()
if(isFirstRun)
firstRun();
else
{
// createWalletd();
tryToOpenWithEmptyPassword_ = true;
emit createWalletdSignal(QPrivateSignal{});
}

checkForUpdate();
return true;
@@ -344,7 +348,18 @@ void WalletApplication::daemonFinished(int exitCode, QProcess::ExitStatus /*exit
qDebug("[WalletApplication] Daemon finished. Return code: %s (%d)",
metaEnum.valueToKey(static_cast<int>(exitCode)),
exitCode);
const QString walletdMsg = BuiltinWalletd::errorMessage(static_cast<BuiltinWalletd::ReturnCodes>(exitCode));

const BuiltinWalletd::ReturnCodes returnCode = static_cast<BuiltinWalletd::ReturnCodes>(exitCode);

if (returnCode == BuiltinWalletd::ReturnCodes::WALLET_FILE_DECRYPT_ERROR && tryToOpenWithEmptyPassword_)
{
tryToOpenWithEmptyPassword_ = false;
restartDaemon();
return;
}
tryToOpenWithEmptyPassword_ = false;

const QString walletdMsg = BuiltinWalletd::errorMessage(returnCode);
const QString msg = !walletdMsg.isEmpty() ?
walletdMsg :
tr("Walletd just crashed. %1. Return code %2. ").arg(walletd->errorString()).arg(exitCode);
@@ -426,6 +441,7 @@ void WalletApplication::openWallet(QWidget* parent)
if (fileName.isEmpty())
return;

tryToOpenWithEmptyPassword_ = true;
runBuiltinWalletd(fileName, false, false, false, QByteArray{}, QByteArray{});
}

@@ -486,6 +502,13 @@ void WalletApplication::importKeys(QWidget* parent)

void WalletApplication::requestPassword()
{
if (tryToOpenWithEmptyPassword_)
{
BuiltinWalletd* walletd = static_cast<BuiltinWalletd*>(walletd_);
walletd->setPassword(QString{});
return;
}

AskPasswordDialog dlg(false, m_mainWindow);
BuiltinWalletd* walletd = static_cast<BuiltinWalletd*>(walletd_);
connect(walletd, &BuiltinWalletd::daemonErrorOccurredSignal, &dlg, &AskPasswordDialog::reject);
1 change: 1 addition & 0 deletions src/application.h
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ class WalletApplication: public QApplication
WalletModel* walletModel_;
FileDownloader* downloader_;
QTimer checkForUpdateTimer_;
bool tryToOpenWithEmptyPassword_;

QScopedPointer<CrashDialog> crashDialog_;
bool m_isAboutToQuit;
2 changes: 1 addition & 1 deletion src/bytecoin-gui.pro
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ TEMPLATE = app
macx: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
macx: ICON = images/bytecoin.icns
win32: RC_ICONS = images/bytecoin.ico
win32: VERSION = 3.19.5.30
win32: VERSION = 3.19.6.11

#QMAKE_CXXFLAGS += -fno-omit-frame-pointer -fsanitize=address,undefined
#LIBS += -lasan -lubsan
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -5,10 +5,10 @@

namespace WalletGUI {

constexpr char VERSION[] = "3.4.4";
constexpr char VERSION[] = "3.4.5";
constexpr char CODENAME[] = "Amethyst";
constexpr char VERSION_SUFFIX[] = "stable";
constexpr char REVISION[] = "20190530";
constexpr char REVISION[] = "20190611";

// returns <0, if newVersion is worse than currentVersion, returns >0, if newVersion is better, and returns 0, if versions are equal
int compareVersion(const QString& newVersion, const QString& currentVersion);
4 changes: 3 additions & 1 deletion src/walletd.cpp
Original file line number Diff line number Diff line change
@@ -563,8 +563,10 @@ void BuiltinWalletd::daemonStarted()
setState(State::RUNNING);

const bool restoreFromMnemonic = !createNew_ && !mnemonic_.isEmpty();
if (createLegacy_ || createNew_ || restoreFromMnemonic || createHardware_)
if (createLegacy_ || createNew_ || restoreFromMnemonic)
emit requestPasswordWithConfirmationSignal();
else if (createHardware_)
setPassword(QString{});
else if (!changePassword_)
emit requestPasswordSignal();

0 comments on commit 4559563

Please sign in to comment.