Browse Source

fixed to work with modern libs (QT5, libssl, ...)

psy 1 week ago
parent
commit
12fdf5f045

+ 6 - 6
ecoin/INSTALL

@@ -1,5 +1,5 @@
 
-ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 ===================================================
 # BUILDS - ECOlogical P2P Crypto-Currency (ECOin) #
@@ -13,7 +13,7 @@ cd ecoin/
 
   + GNU/Linux:
 
-	/usr/lib/x86_64-linux-gnu/qt4/bin/qmake USE_UPNP=0 USE_IPV6=0 -o Makefile ecoin-qt.pro
+	/usr/lib/x86_64-linux-gnu/qt5/bin/qmake USE_UPNP=- USE_IPV6=- -o Makefile ecoin-qt.pro
 
 ================
 + Build leveldb:
@@ -43,8 +43,7 @@ See doc/build-*.txt for detailed instructions on building /ecoin-qt/ on differen
 
   + GNU/Linux:
 
-	cd ..
-	qmake USE_UPNP=- (or USE_UPNP=0)
+	qmake USE_UPNP=-
 	make
 
         ./ecoin-qt
@@ -58,7 +57,7 @@ See doc/build-*.txt for detailed instructions on building /ecoind/ on different
   + GNU/Linux:
 
 	cd src/
-	make -f makefile.linux USE_UPNP=- (or USE_UPNP=0)
+	make -f makefile.linux USE_UPNP=-
 	strip ecoind
 
         ./ecoind
@@ -72,8 +71,9 @@ See doc/build-*.txt for detailed instructions on building /ecoind/ on different
      - File: /home/$USER/.ecoin/ecoin.conf # chmod 600 ecoin.conf
 
         rpcuser=ecoinrpc
-        rpcpassword=YourPassWord2021 # use lowercase, upper case and numbers
+        rpcpassword=<YourPassWord2024> # use lowercase, upper case and numbers
         rpcallowip=127.0.0.1
+        rpcallowip=<YourPrivateIP> # ex: 10.0.0.5
         noirc=1
         listen=1
         server=1

+ 12 - 0
ecoin/doc/IMPLEMENTATIONS.txt

@@ -0,0 +1,12 @@
+
+ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
+=========================================================
+# IMPLEMENTATIONS - ECOlogical P2P Crypto-Currency (ECOin) #
+=========================================================
+
+ This code is part of the project:
+ 
+     https://solarnethub.com/
+ 
+=========================================================

+ 4 - 4
ecoin/doc/build-linux.txt

@@ -1,5 +1,5 @@
 
-ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 ======================================
 # SOURCES for ECOin (Unix/GNU-Linux) #
@@ -55,12 +55,12 @@ All of the commands should be executed in a shell.
 ------------------------------
 
 ======================================
-# Qt4 GUI for ECOin (Unix/GNU-Linux) #
+# Qt5 GUI for ECOin (Unix/GNU-Linux) #
 ======================================
 
-(1.) First, make sure that the required packages for Qt4 development of your distribution are installed, for Debian and Ubuntu these are:
+(1.) First, make sure that the required packages for Qt5 development of your distribution are installed, for Debian and Ubuntu these are:
 
-        sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev miniupnpc libminiupnpc-dev \
+        sudo apt-get install qt5-qmake qtbase5-dev build-essential libboost-dev libboost-system-dev miniupnpc libminiupnpc-dev \
              libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libssl1.1 libdb5.3++-dev
 
 (2.) Then execute the following:

+ 3 - 3
ecoin/doc/build-osx.txt

@@ -1,5 +1,5 @@
 
-ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 ===============================
 # SOURCES for ECOin (MacOS X) #
@@ -53,7 +53,7 @@ All of the commands should be executed in Terminal.app
      An executable named 'ecoind' will be built.
 
 ===============================
-# Qt4 GUI for ECOin (MacOS X) #
+# Qt5 GUI for ECOin (MacOS X) #
 ===============================
 
 (1.) Download and install MacPorts from: http://www.macports.org/
@@ -61,7 +61,7 @@ All of the commands should be executed in Terminal.app
 (2.) Execute the following commands in a terminal to get the dependencies:
 
         sudo port selfupdate
-        sudo port install qt4-mac qt4-creator-mac boost db53 miniupnpc
+        sudo port install qt5-mac qt5-creator-mac boost db53 miniupnpc
 
 (3.) Open the .pro file in Qt Creator (with Desktop kit) and build as normal (cmd-B)
 

+ 1 - 1
ecoin/doc/build-win32.txt

@@ -1,5 +1,5 @@
 
-ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 =============================
 # SOURCES for ECOin (Win32) #

+ 13 - 5
ecoin/ecoin-qt.pro

@@ -1,9 +1,8 @@
-
-# ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+# ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 TEMPLATE = app
 TARGET = ecoin-qt
-VERSION = 0.0.3
+VERSION = 0.0.4
 INCLUDEPATH += src src/json src/qt
 DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
 CONFIG += no_include_pwd
@@ -11,6 +10,17 @@ CONFIG += thread
 OBJECTS_DIR = build
 MOC_DIR = build
 UI_DIR = build
+QT += core gui widgets
+QT_NO_DEFAULT_CODEC = 1
+
+QMAKE_CXXFLAGS_WARN_ON = -Wno-unused-parameter -Wno-deprecated-declarations -Wno-stringop-overread -Wno-return-type
+
+# Disable stack-protector warnings
+QMAKE_CXXFLAGS += -Wno-stack-protector
+
+# Extra security measures for Windows
+win32:QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat
+win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++
 
 # use: qmake "RELEASE=1"
 contains(RELEASE, 1) {
@@ -129,8 +139,6 @@ contains(USE_O3, 1) {
     QMAKE_CFLAGS += -msse2
 }
 
-QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector
-
 # Input
 DEPENDPATH += src src/json src/qt
 HEADERS += src/qt/ecoingui.h \

+ 5 - 5
ecoin/share/setup.nsi

@@ -1,5 +1,5 @@
 
-# ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+# ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 Name Ecoin
 
@@ -8,9 +8,9 @@ SetCompressor /SOLID lzma
 
 # General Symbol Definitions
 !define REGKEY "SOFTWARE\$(^Name)"
-!define VERSION 0.0.2
+!define VERSION 0.0.3
 !define COMPANY "Ecoin project"
-!define URL https://03c8.net
+!define URL https://ecoin.03c8.net
 
 # MUI Symbol Definitions
 !define MUI_ICON "../share/pixmaps/ecoin.ico"
@@ -48,13 +48,13 @@ Var StartMenuGroup
 !insertmacro MUI_LANGUAGE English
 
 # Installer attributes
-OutFile ecoin-0.0.2-win32-setup.exe
+OutFile ecoin-0.0.3-win32-setup.exe
 InstallDir $PROGRAMFILES\Ecoin
 CRCCheck on
 XPStyle on
 BrandingText " "
 ShowInstDetails show
-VIProductVersion 0.0.2.1
+VIProductVersion 0.0.3.1
 VIAddVersionKey ProductName Ecoin
 VIAddVersionKey ProductVersion "${VERSION}"
 VIAddVersionKey CompanyName "${COMPANY}"

+ 5 - 5
ecoin/src/db.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include "db.h"
 #include "net.h"
@@ -57,11 +57,11 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_)
         return false;
 
     pathEnv = pathEnv_;
-    filesystem::path pathDataDir = pathEnv;
+    boost::filesystem::path pathDataDir = pathEnv;
     strPath = pathDataDir.string();
-    filesystem::path pathLogDir = pathDataDir / "database";
-    filesystem::create_directory(pathLogDir);
-    filesystem::path pathErrorFile = pathDataDir / "db.log";
+    boost::filesystem::path pathLogDir = pathDataDir / "database";
+    boost::filesystem::create_directory(pathLogDir);
+    boost::filesystem::path pathErrorFile = pathDataDir / "db.log";
     printf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string().c_str(), pathErrorFile.string().c_str());
 
     unsigned int nEnvFlags = 0;

+ 13 - 10
ecoin/src/ecoinrpc.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include "init.h"
 #include "util.h"
@@ -11,7 +11,9 @@
 #undef printf
 #include <boost/asio.hpp>
 #include <boost/asio/ip/v6_only.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
+using namespace boost::placeholders;
+
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
 #include <boost/iostreams/concepts.hpp>
@@ -547,7 +549,7 @@ public:
     }
     bool connect(const std::string& server, const std::string& port)
     {
-        ip::tcp::resolver resolver(stream.get_io_service());
+        ip::tcp::resolver resolver(GetIOService(stream));
         ip::tcp::resolver::query query(server.c_str(), port.c_str());
         ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
         ip::tcp::resolver::iterator end;
@@ -647,7 +649,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
                    ssl::context& context,
                    const bool fUseSSL)
 {
-    AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
+    AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(GetIOService(*acceptor), context, fUseSSL);
 
     acceptor->async_accept(
             conn->sslStream.lowest_layer(),
@@ -736,14 +738,14 @@ void ThreadRPCServer2(void* parg)
     {
         context.set_options(ssl::context::no_sslv2);
 
-        filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
-        if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile;
-        if (filesystem::exists(pathCertFile)) context.use_certificate_chain_file(pathCertFile.string());
+        boost::filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
+        if (!pathCertFile.is_complete()) pathCertFile = boost::filesystem::path(GetDataDir()) / pathCertFile;
+        if (boost::filesystem::exists(pathCertFile)) context.use_certificate_chain_file(pathCertFile.string());
         else printf("ThreadRPCServer ERROR: missing server certificate file %s\n", pathCertFile.string().c_str());
 
-        filesystem::path pathPKFile(GetArg("-rpcsslprivatekeyfile", "server.pem"));
-        if (!pathPKFile.is_complete()) pathPKFile = filesystem::path(GetDataDir()) / pathPKFile;
-        if (filesystem::exists(pathPKFile)) context.use_private_key_file(pathPKFile.string(), ssl::context::pem);
+        boost::filesystem::path pathPKFile(GetArg("-rpcsslprivatekeyfile", "server.pem"));
+        if (!pathPKFile.is_complete()) pathPKFile = boost::filesystem::path(GetDataDir()) / pathPKFile;
+        if (boost::filesystem::exists(pathPKFile)) context.use_private_key_file(pathPKFile.string(), ssl::context::pem);
         else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str());
 
         string strCiphers = GetArg("-rpcsslciphers", "TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH");
@@ -1223,3 +1225,4 @@ int main(int argc, char *argv[])
 #endif
 
 const CRPCTable tableRPC;
+

+ 9 - 5
ecoin/src/init.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include "txdb.h"
 #include "walletdb.h"
@@ -16,6 +16,9 @@
 #include <boost/algorithm/string/predicate.hpp>
 #include <openssl/crypto.h>
 
+#include <boost/bind/bind.hpp>
+using namespace boost::placeholders;
+
 #ifndef WIN32
 #include <signal.h>
 #endif
@@ -23,6 +26,7 @@
 using namespace std;
 using namespace boost;
 
+
 CWallet* pwalletMain;
 CClientUIInterface uiInterface;
 std::string strWalletFileName;
@@ -489,7 +493,7 @@ bool AppInit2()
             return false;
     }
 
-    if (filesystem::exists(GetDataDir() / strWalletFileName))
+    if (boost::filesystem::exists(GetDataDir() / strWalletFileName))
     {
         CDBEnv::VerifyResult r = bitdb.Verify(strWalletFileName, CWalletDB::Recover);
         if (r == CDBEnv::RECOVER_OK)
@@ -779,13 +783,13 @@ bool AppInit2()
         exit(0);
     }
 
-    filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat";
-    if (filesystem::exists(pathBootstrap)) {
+    boost::filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat";
+    if (boost::filesystem::exists(pathBootstrap)) {
         uiInterface.InitMessage(_("Importing bootstrap blockchain data file."));
 
         FILE *file = fopen(pathBootstrap.string().c_str(), "rb");
         if (file) {
-            filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old";
+            boost::filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old";
             LoadExternalBlockFile(file);
             RenameOver(pathBootstrap, pathBootstrapOld);
         }

+ 5 - 2
ecoin/src/json/json_spirit_reader_template.h

@@ -1,10 +1,13 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #ifndef JSON_SPIRIT_READER_TEMPLATE
 #define JSON_SPIRIT_READER_TEMPLATE
 
 #include "json_spirit_value.h"
 #include "json_spirit_error_position.h"
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
+using namespace boost::placeholders;
+
 #include <boost/function.hpp>
 #include <boost/version.hpp>
 

+ 2 - 2
ecoin/src/key.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include <map>
 
@@ -96,7 +96,7 @@ int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned ch
     if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; }
     if (8*msglen > n) BN_rshift(e, e, 8-(n & 7));
     zero = BN_CTX_get(ctx);
-    if (!BN_zero(zero)) { ret=-1; goto err; }
+    BN_zero(zero); // Set the value of 'zero' to zero
     if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; }
     rr = BN_CTX_get(ctx);
     ECDSA_SIG_get0(ecsig, (const BIGNUM **)&s, 0);

+ 4 - 4
ecoin/src/main.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include "alert.h"
 #include "checkpoints.h"
@@ -2251,7 +2251,7 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos)
     pindexNew->SetStakeModifier(nStakeModifier, fGeneratedStakeModifier);
     pindexNew->nStakeModifierChecksum = GetStakeModifierChecksum(pindexNew);
     if (!CheckStakeModifierCheckpoints(pindexNew->nHeight, pindexNew->nStakeModifierChecksum))
-        return error("AddToBlockIndex() : Rejected by stake modifier checkpoint height=%d, modifier=0x%016" PRI64x" pindexNew->nStakeModifierChecksum=0x%08" PRI64x, pindexNew->nHeight, nStakeModifier, pindexNew->nStakeModifierChecksum);
+        return error("AddToBlockIndex() : Rejected by stake modifier checkpoint height=%u, modifier=0x%016llx pindexNew->nStakeModifierChecksum=0x%08llx", pindexNew->nHeight, nStakeModifier, pindexNew->nStakeModifierChecksum);
 
     // Add to mapBlockIndex
     map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
@@ -2755,7 +2755,7 @@ bool CBlock::CheckBlockSignature(bool fProofOfStake) const
 
 bool CheckDiskSpace(uint64 nAdditionalBytes)
 {
-    uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available;
+    uint64 nFreeBytesAvailable = boost::filesystem::space(GetDataDir()).available;
 
     if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes)
     {
@@ -2770,7 +2770,7 @@ bool CheckDiskSpace(uint64 nAdditionalBytes)
     return true;
 }
 
-static filesystem::path BlockFilePath(unsigned int nFile)
+static boost::filesystem::path BlockFilePath(unsigned int nFile)
 {
     string strBlockFn = strprintf("blk%04u.dat", nFile);
     return GetDataDir() / strBlockFn;

+ 2 - 2
ecoin/src/makefile.linux

@@ -95,8 +95,8 @@ endif
 
 # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only
 # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
-xCXXFLAGS=-O2 $(EXT_OPTIONS) -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \
-    $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
+xCXXFLAGS=-O2 $(EXT_OPTIONS) -pthread -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \
+    $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) -Wno-deprecated-declarations -Wno-stringop-overread -Wno-return-type
 
 # LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only
 # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.

+ 5 - 2
ecoin/src/qt/addressbookpage.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "addressbookpage.h"
 #include "ui_addressbookpage.h"
 #include "addresstablemodel.h"
@@ -11,6 +12,8 @@
 #include <QClipboard>
 #include <QMessageBox>
 #include <QMenu>
+#include <QString>
+#include <QUrl>
 
 #ifdef USE_QRCODE
 #include "qrcodedialog.h"
@@ -133,7 +136,7 @@ void AddressBookPage::setModel(AddressTableModel *model)
     // Set column widths
     ui->tableView->horizontalHeader()->resizeSection(
             AddressTableModel::Address, 320);
-    ui->tableView->horizontalHeader()->setResizeMode(
+    ui->tableView->horizontalHeader()->setSectionResizeMode(
             AddressTableModel::Label, QHeaderView::Stretch);
 
     connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),

+ 7 - 5
ecoin/src/qt/clientmodel.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "clientmodel.h"
 #include "guiconstants.h"
 #include "optionsmodel.h"
@@ -158,14 +159,15 @@ void ClientModel::subscribeToCoreSignals()
 {
     // Connect signals to client
     uiInterface.NotifyBlocksChanged.connect(boost::bind(NotifyBlocksChanged, this));
-    uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
-    uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
+    uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, boost::placeholders::_1)); 
+    uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, boost::placeholders::_1, boost::placeholders::_2)); 
 }
 
 void ClientModel::unsubscribeFromCoreSignals()
 {
     // Disconnect signals from client
     uiInterface.NotifyBlocksChanged.disconnect(boost::bind(NotifyBlocksChanged, this));
-    uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
-    uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
+    uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, boost::placeholders::_1)); 
+    uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, boost::placeholders::_1, boost::placeholders::_2)); 
 }
+

+ 3 - 2
ecoin/src/qt/coincontroldialog.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "coincontroldialog.h"
 #include "ui_coincontroldialog.h"
 #include "init.h"
@@ -87,7 +88,7 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
     connect(ui->treeWidget, SIGNAL(itemChanged( QTreeWidgetItem*, int)), this, SLOT(viewItemChanged( QTreeWidgetItem*, int)));
 
     // click on header
-    ui->treeWidget->header()->setClickable(true);
+    ui->treeWidget->header()->setSectionsClickable(true);
     connect(ui->treeWidget->header(), SIGNAL(sectionClicked(int)), this, SLOT(headerSectionClicked(int)));
 
     // ok button

+ 4 - 3
ecoin/src/qt/ecoin.cpp

@@ -1,9 +1,11 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "ecoingui.h"
 #include "clientmodel.h"
 #include "walletmodel.h"
 #include "optionsmodel.h"
 #include "guiutil.h"
+#include "guiutil.cpp"
 #include "guiconstants.h"
 #include "init.h"
 #include "ui_interface.h"
@@ -113,8 +115,7 @@ int main(int argc, char *argv[])
     ipcScanRelay(argc, argv);
 
     // Internal string conversion is all UTF-8
-    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
-    QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
+    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
 
     Q_INIT_RESOURCE(ecoin);
     QApplication app(argc, argv);

+ 5 - 2
ecoin/src/qt/ecoingui.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "ecoingui.h"
 #include "transactiontablemodel.h"
 #include "addressbookpage.h"
@@ -49,6 +50,8 @@
 #include <QUrl>
 #include <QStyle>
 #include <iostream>
+#include <QMimeData>
+#include <QStandardPaths>
 
 extern CWallet* pwalletMain;
 extern int64 nLastCoinStakeSearchInterval;
@@ -821,7 +824,7 @@ void EcoinGUI::encryptWallet(bool status)
 
 void EcoinGUI::backupWallet()
 {
-    QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+    QString saveDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
     QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)"));
     if(!filename.isEmpty()) {
         if(!walletModel->backupWallet(filename)) {

+ 39 - 47
ecoin/src/qt/guiutil.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "guiutil.h"
 #include "ecoinaddressvalidator.h"
 #include "walletmodel.h"
@@ -11,7 +12,6 @@
 #include <QFont>
 #include <QLineEdit>
 #include <QUrl>
-#include <QTextDocument> // For Qt::escape
 #include <QAbstractItemView>
 #include <QApplication>
 #include <QClipboard>
@@ -20,30 +20,21 @@
 #include <QThread>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
+#include <QUrl>
+#include <QUrlQuery>
+#include <QtGlobal>
+#include <QToolTip>
 
 #ifdef WIN32
-#ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
-#endif
-#define _WIN32_WINNT 0x0501
-#ifdef _WIN32_IE
-#undef _WIN32_IE
-#endif
-#define _WIN32_IE 0x0501
-#define WIN32_LEAN_AND_MEAN 1
-#ifndef NOMINMAX
-#define NOMINMAX
-#endif
-#include "shlwapi.h"
-#include "shlobj.h"
-#include "shellapi.h"
+#include <windows.h>
+#include <shlobj.h>
 #endif
 
 namespace GUIUtil {
 
-QString dateTimeStr(const QDateTime &date)
+QString dateTimeStr(const QDateTime &datetime)
 {
-    return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm");
+    return datetime.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + datetime.toString("hh:mm");
 }
 
 QString dateTimeStr(qint64 nTime)
@@ -83,8 +74,8 @@ bool parseEcoinURI(const QUrl &uri, SendCoinsRecipient *out)
     SendCoinsRecipient rv;
     rv.address = uri.path();
     rv.amount = 0;
-    QList<QPair<QString, QString> > items = uri.queryItems();
-    for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
+    QList<QPair<QString, QString>> items = QUrlQuery(uri).queryItems();
+    for (QList<QPair<QString, QString>>::iterator i = items.begin(); i != items.end(); i++)
     {
         bool fShouldReturnFalse = false;
         if (i->first.startsWith("req-"))
@@ -132,7 +123,7 @@ bool parseEcoinURI(QString uri, SendCoinsRecipient *out)
 
 QString HtmlEscape(const QString& str, bool fMultiLine)
 {
-    QString escaped = Qt::escape(str);
+    QString escaped = str.toHtmlEscaped();
     if(fMultiLine)
     {
         escaped = escaped.replace("\n", "<br>\n");
@@ -145,6 +136,31 @@ QString HtmlEscape(const std::string& str, bool fMultiLine)
     return HtmlEscape(QString::fromStdString(str), fMultiLine);
 }
 
+ToolTipToRichTextFilter::ToolTipToRichTextFilter(int threshold, QObject *parent) :
+    QObject(parent),
+    size_threshold(threshold)
+{
+    // Constructor implementation
+}
+
+bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
+{
+    if(evt->type() == QEvent::ToolTipChange)
+    {
+        QWidget *widget = static_cast<QWidget*>(obj);
+        QString tooltip = widget->toolTip();
+        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !QToolTip::isVisible())
+        {
+            // Prefix <qt/> to make sure Qt detects this as rich text
+            // Escape the current message as HTML and replace \n by <br>
+            tooltip = "<qt>" + HtmlEscape(tooltip, true) + "</qt>";
+            widget->setToolTip(tooltip);
+            return true;
+        }
+    }
+    return QObject::eventFilter(obj, evt);
+}
+
 void copyEntryData(QAbstractItemView *view, int column, int role)
 {
     if(!view || !view->selectionModel())
@@ -167,7 +183,7 @@ QString getSaveFileName(QWidget *parent, const QString &caption,
     QString myDir;
     if(dir.isEmpty()) // Default to user documents location
     {
-        myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+        myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
     }
     else
     {
@@ -241,30 +257,6 @@ void openDebugLogfile()
         QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string())));
 }
 
-ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
-    QObject(parent), size_threshold(size_threshold)
-{
-
-}
-
-bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
-{
-    if(evt->type() == QEvent::ToolTipChange)
-    {
-        QWidget *widget = static_cast<QWidget*>(obj);
-        QString tooltip = widget->toolTip();
-        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !Qt::mightBeRichText(tooltip))
-        {
-            // Prefix <qt/> to make sure Qt detects this as rich text
-            // Escape the current message as HTML and replace \n by <br>
-            tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>";
-            widget->setToolTip(tooltip);
-            return true;
-        }
-    }
-    return QObject::eventFilter(obj, evt);
-}
-
 #ifdef WIN32
 boost::filesystem::path static StartupShortcutPath()
 {

+ 3 - 1
ecoin/src/qt/guiutil.h

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #ifndef GUIUTIL_H
 #define GUIUTIL_H
 
@@ -90,3 +91,4 @@ namespace GUIUtil
 } // namespace GUIUtil
 
 #endif // GUIUTIL_H
+

File diff suppressed because it is too large
+ 3033 - 1581
ecoin/src/qt/locale/ecoin_ca.ts


File diff suppressed because it is too large
+ 3050 - 1595
ecoin/src/qt/locale/ecoin_de.ts


File diff suppressed because it is too large
+ 555 - 477
ecoin/src/qt/locale/ecoin_en.ts


File diff suppressed because it is too large
+ 3051 - 1587
ecoin/src/qt/locale/ecoin_es.ts


File diff suppressed because it is too large
+ 2322 - 296
ecoin/src/qt/locale/ecoin_eu_ES.ts


File diff suppressed because it is too large
+ 3043 - 1590
ecoin/src/qt/locale/ecoin_fr.ts


File diff suppressed because it is too large
+ 3043 - 1592
ecoin/src/qt/locale/ecoin_it.ts


File diff suppressed because it is too large
+ 2846 - 1394
ecoin/src/qt/locale/ecoin_pt.ts


File diff suppressed because it is too large
+ 2409 - 1537
ecoin/src/qt/locale/ecoin_ru.ts


File diff suppressed because it is too large
+ 3034 - 1594
ecoin/src/qt/locale/ecoin_zh_CN.ts


+ 7 - 2
ecoin/src/qt/overviewpage.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "overviewpage.h"
 #include "ui_overviewpage.h"
 #include "walletmodel.h"
@@ -10,6 +11,10 @@
 #include "guiconstants.h"
 #include <QAbstractItemDelegate>
 #include <QPainter>
+#include <QVariant>
+#include <QDateTime>
+
+using namespace Qt;
 
 #define DECORATION_SIZE 64
 #define NUM_ITEMS 3
@@ -44,7 +49,7 @@ public:
         bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool();
         QVariant value = index.data(Qt::ForegroundRole);
         QColor foreground = option.palette.color(QPalette::Text);
-        if(qVariantCanConvert<QColor>(value))
+        if (value.canConvert<QColor>())
         {
             foreground = qvariant_cast<QColor>(value);
         }

+ 5 - 2
ecoin/src/qt/sendcoinsdialog.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "sendcoinsdialog.h"
 #include "ui_sendcoinsdialog.h"
 #include "init.h"
@@ -18,6 +19,8 @@
 #include <QTextDocument>
 #include <QScrollBar>
 #include <QClipboard>
+#include <QString>
+#include <QUrl>
 
 SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     QDialog(parent),
@@ -142,7 +145,7 @@ void SendCoinsDialog::on_sendButton_clicked()
     QStringList formatted;
     foreach(const SendCoinsRecipient &rcp, recipients)
     {
-        formatted.append(tr("<b>%1</b> to %2 (%3)").arg(EcoinUnits::formatWithUnit(EcoinUnits::ECO, rcp.amount), Qt::escape(rcp.label), rcp.address));
+    formatted.append(tr("<b>%1</b> to %2 (%3)").arg(EcoinUnits::formatWithUnit(EcoinUnits::ECO, rcp.amount), rcp.label.toHtmlEscaped(), rcp.address));
     }
 
     fNewRecipientAllowed = false;

+ 4 - 1
ecoin/src/qt/transactiondesc.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "transactiondesc.h"
 #include "guiutil.h"
 #include "ecoinunits.h"
@@ -7,6 +8,8 @@
 #include "txdb.h"
 #include "ui_interface.h"
 #include "base58.h"
+#include <QString>
+#include <QUrl>
 
 QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
 {

+ 6 - 3
ecoin/src/qt/transactionview.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "transactionview.h"
 #include "transactionfilterproxy.h"
 #include "transactionrecord.h"
@@ -27,6 +28,8 @@
 #include <QClipboard>
 #include <QLabel>
 #include <QDateTimeEdit>
+#include <QString>
+#include <QUrl>
 
 TransactionView::TransactionView(QWidget *parent) :
     QWidget(parent), model(0), transactionProxyModel(0),
@@ -181,8 +184,8 @@ void TransactionView::setModel(WalletModel *model)
                 TransactionTableModel::Date, 120);
         transactionView->horizontalHeader()->resizeSection(
                 TransactionTableModel::Type, 120);
-        transactionView->horizontalHeader()->setResizeMode(
-                TransactionTableModel::ToAddress, QHeaderView::Stretch);
+        transactionView->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+
         transactionView->horizontalHeader()->resizeSection(
                 TransactionTableModel::Amount, 100);
     }

+ 10 - 7
ecoin/src/qt/walletmodel.cpp

@@ -1,4 +1,5 @@
-// ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+
 #include "walletmodel.h"
 #include "guiconstants.h"
 #include "optionsmodel.h"
@@ -338,17 +339,19 @@ static void NotifyTransactionChanged(WalletModel *walletmodel, CWallet *wallet,
 void WalletModel::subscribeToCoreSignals()
 {
     // Connect signals to wallet
-    wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
-    wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5));
-    wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
+wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, boost::placeholders::_1));
+wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5));
+wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3));
+
 }
 
 void WalletModel::unsubscribeFromCoreSignals()
 {
     // Disconnect signals from wallet
-    wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
-    wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5));
-    wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
+wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, boost::placeholders::_1));
+wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5));
+wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3));
+
 }
 
 // WalletModel::UnlockContext implementation

+ 7 - 7
ecoin/src/txdb-leveldb.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include <map>
 #include <boost/version.hpp>
@@ -29,27 +29,27 @@ static leveldb::Options GetOptions() {
 
 void init_blockindex(leveldb::Options& options, bool fRemoveOld = false) {
     // First time init.
-    filesystem::path directory = GetDataDir() / "txleveldb";
+    boost::filesystem::path directory = GetDataDir() / "txleveldb";
 
     if (fRemoveOld) {
-        filesystem::remove_all(directory); // remove directory
+        boost::filesystem::remove_all(directory); // remove directory
         unsigned int nFile = 1;
 
         while (true)
         {
-            filesystem::path strBlockFile = GetDataDir() / strprintf("blk%04u.dat", nFile);
+            boost::filesystem::path strBlockFile = GetDataDir() / strprintf("blk%04u.dat", nFile);
 
             // Break if no such file
-            if( !filesystem::exists( strBlockFile ) )
+            if( !boost::filesystem::exists( strBlockFile ) )
                 break;
 
-            filesystem::remove(strBlockFile);
+            boost::filesystem::remove(strBlockFile);
 
             nFile++;
         }
     }
 
-    filesystem::create_directory(directory);
+    boost::filesystem::create_directory(directory);
     printf("Opening LevelDB in %s\n", directory.string().c_str());
     leveldb::Status status = leveldb::DB::Open(options, directory.string(), &txdb);
     if (!status.ok()) {

+ 5 - 0
ecoin/src/util.cpp

@@ -23,6 +23,11 @@ namespace boost {
 #include <openssl/rand.h>
 #include <stdarg.h>
 
+#include <boost/bind/bind.hpp>
+#include <boost/bind/placeholders.hpp>
+
+using namespace boost::placeholders;
+
 #ifdef WIN32
 #ifdef _MSC_VER
 #pragma warning(disable:4786)

+ 7 - 7
ecoin/src/walletdb.cpp

@@ -1,4 +1,4 @@
-// ECOin - Copyright (c) - 2014/2022 - GPLv3 - epsylon@riseup.net (https://03c8.net)
+// ECOin - Copyright (c) - 2014/2024 - GPLv3 - epsylon@riseup.net (https://03c8.net)
 
 #include "walletdb.h"
 #include "wallet.h"
@@ -598,20 +598,20 @@ bool BackupWallet(const CWallet& wallet, const string& strDest)
                 bitdb.mapFileUseCount.erase(wallet.strWalletFile);
 
                 // Copy wallet.dat
-                filesystem::path pathSrc = GetDataDir() / wallet.strWalletFile;
-                filesystem::path pathDest(strDest);
-                if (filesystem::is_directory(pathDest))
+                boost::filesystem::path pathSrc = GetDataDir() / wallet.strWalletFile;
+                boost::filesystem::path pathDest(strDest);
+                if (boost::filesystem::is_directory(pathDest))
                     pathDest /= wallet.strWalletFile;
 
                 try {
 #if BOOST_VERSION >= 104000
-                    filesystem::copy_file(pathSrc, pathDest, filesystem::copy_option::overwrite_if_exists);
+                    boost::filesystem::copy_file(pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
 #else
-                    filesystem::copy_file(pathSrc, pathDest);
+                    boost::filesystem::copy_file(pathSrc, pathDest);
 #endif
                     printf("copied wallet.dat to %s\n", pathDest.string().c_str());
                     return true;
-                } catch(const filesystem::filesystem_error &e) {
+                } catch(const boost::filesystem::filesystem_error &e) {
                     printf("error copying wallet.dat to %s - %s\n", pathDest.string().c_str(), e.what());
                     return false;
                 }