0.6.1
This commit is contained in:
@@ -10,14 +10,14 @@ Head over to the releases page and grab the latest installers or binary. https:/
|
|||||||
|
|
||||||
If you are on Debian/Ubuntu, please download the `.deb` package and install it.
|
If you are on Debian/Ubuntu, please download the `.deb` package and install it.
|
||||||
```
|
```
|
||||||
sudo dpkg -i linux-deb-zec-qt-wallet-v0.6.0.deb
|
sudo dpkg -i linux-deb-zec-qt-wallet-v0.6.1.deb
|
||||||
sudo apt install -f
|
sudo apt install -f
|
||||||
```
|
```
|
||||||
|
|
||||||
Or you can download and run the binaries directly.
|
Or you can download and run the binaries directly.
|
||||||
```
|
```
|
||||||
tar -xvf zec-qt-wallet-v0.6.0.tar.gz
|
tar -xvf zec-qt-wallet-v0.6.1.tar.gz
|
||||||
./zec-qt-wallet-v0.6.0/zec-qt-wallet
|
./zec-qt-wallet-v0.6.1/zec-qt-wallet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|||||||
BIN
res/zec_qt_wallet_it.qm
Normal file
BIN
res/zec_qt_wallet_it.qm
Normal file
Binary file not shown.
59
src/main.cpp
59
src/main.cpp
@@ -37,8 +37,6 @@ private:
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#endif //!_WIN32
|
#endif //!_WIN32
|
||||||
|
|
||||||
// There can be only ONE SignalHandler per process
|
// There can be only ONE SignalHandler per process
|
||||||
@@ -46,11 +44,6 @@ SignalHandler* g_handler(NULL);
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
BOOL WINAPI WIN32_handleFunc(DWORD);
|
|
||||||
int WIN32_physicalToLogical(DWORD);
|
|
||||||
DWORD WIN32_logicalToPhysical(int);
|
|
||||||
std::set<int> g_registry;
|
|
||||||
|
|
||||||
#else //_WIN32
|
#else //_WIN32
|
||||||
|
|
||||||
void POSIX_handleFunc(int);
|
void POSIX_handleFunc(int);
|
||||||
@@ -65,7 +58,7 @@ SignalHandler::SignalHandler(int mask) : _mask(mask)
|
|||||||
g_handler = this;
|
g_handler = this;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetConsoleCtrlHandler(WIN32_handleFunc, TRUE);
|
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
for (int i=0;i<numSignals;i++)
|
for (int i=0;i<numSignals;i++)
|
||||||
@@ -74,7 +67,7 @@ SignalHandler::SignalHandler(int mask) : _mask(mask)
|
|||||||
if (_mask & logical)
|
if (_mask & logical)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
g_registry.insert(logical);
|
|
||||||
#else
|
#else
|
||||||
int sig = POSIX_logicalToPhysical(logical);
|
int sig = POSIX_logicalToPhysical(logical);
|
||||||
bool failed = signal(sig, POSIX_handleFunc) == SIG_ERR;
|
bool failed = signal(sig, POSIX_handleFunc) == SIG_ERR;
|
||||||
@@ -90,7 +83,7 @@ SignalHandler::SignalHandler(int mask) : _mask(mask)
|
|||||||
SignalHandler::~SignalHandler()
|
SignalHandler::~SignalHandler()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetConsoleCtrlHandler(WIN32_handleFunc, FALSE);
|
|
||||||
#else
|
#else
|
||||||
for (int i=0;i<numSignals;i++)
|
for (int i=0;i<numSignals;i++)
|
||||||
{
|
{
|
||||||
@@ -105,17 +98,7 @@ SignalHandler::~SignalHandler()
|
|||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
DWORD WIN32_logicalToPhysical(int signal)
|
|
||||||
{
|
|
||||||
switch (signal)
|
|
||||||
{
|
|
||||||
case SignalHandler::SIG_INT: return CTRL_C_EVENT;
|
|
||||||
case SignalHandler::SIG_TERM: return CTRL_BREAK_EVENT;
|
|
||||||
case SignalHandler::SIG_CLOSE: return CTRL_CLOSE_EVENT;
|
|
||||||
default:
|
|
||||||
return ~(unsigned int)0; // SIG_ERR = -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
int POSIX_logicalToPhysical(int signal)
|
int POSIX_logicalToPhysical(int signal)
|
||||||
{
|
{
|
||||||
@@ -135,17 +118,6 @@ int POSIX_logicalToPhysical(int signal)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int WIN32_physicalToLogical(DWORD signal)
|
|
||||||
{
|
|
||||||
switch (signal)
|
|
||||||
{
|
|
||||||
case CTRL_C_EVENT: return SignalHandler::SIG_INT;
|
|
||||||
case CTRL_BREAK_EVENT: return SignalHandler::SIG_TERM;
|
|
||||||
case CTRL_CLOSE_EVENT: return SignalHandler::SIG_CLOSE;
|
|
||||||
default:
|
|
||||||
return SignalHandler::SIG_UNHANDLED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
int POSIX_physicalToLogical(int signal)
|
int POSIX_physicalToLogical(int signal)
|
||||||
{
|
{
|
||||||
@@ -161,29 +133,6 @@ int POSIX_physicalToLogical(int signal)
|
|||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
BOOL WINAPI WIN32_handleFunc(DWORD signal)
|
|
||||||
{
|
|
||||||
if (g_handler)
|
|
||||||
{
|
|
||||||
int signo = WIN32_physicalToLogical(signal);
|
|
||||||
// The std::set is thread-safe in const reading access and we never
|
|
||||||
// write to it after the program has started so we don't need to
|
|
||||||
// protect this search by a mutex
|
|
||||||
std::set<int>::const_iterator found = g_registry.find(signo);
|
|
||||||
if (signo != -1 && found != g_registry.end())
|
|
||||||
{
|
|
||||||
return g_handler->handleSignal(signo) ? TRUE : FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
void POSIX_handleFunc(int signal)
|
void POSIX_handleFunc(int signal)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1122,7 +1122,10 @@ void RPC::shutdownZcashd() {
|
|||||||
} else {
|
} else {
|
||||||
while (waiter.isActive()) {
|
while (waiter.isActive()) {
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
#ifdef _WIN32
|
||||||
|
#else
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define APP_VERSION "0.6.0"
|
#define APP_VERSION "0.6.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user