Modernize Qt dependency path

This commit is contained in:
root
2026-04-30 06:38:51 +00:00
parent c655e4d576
commit 49ac41045b
43 changed files with 2034 additions and 368 deletions
+6 -5
View File
@@ -237,8 +237,9 @@ am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/test/functional/test_runner.py \
$(top_srcdir)/test/util/bitcoin-util-test.py \
$(top_srcdir)/test/util/rpcauth-test.py COPYING INSTALL \
build-aux/compile build-aux/config.guess build-aux/config.sub \
build-aux/install-sh build-aux/ltmain.sh build-aux/missing
README.md build-aux/compile build-aux/config.guess \
build-aux/config.sub build-aux/install-sh build-aux/ltmain.sh \
build-aux/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -354,6 +355,7 @@ EVENT_PTHREADS_LIBS = @EVENT_PTHREADS_LIBS@
EXEEXT = @EXEEXT@
EXTENDED_FUNCTIONAL_TESTS = @EXTENDED_FUNCTIONAL_TESTS@
FGREP = @FGREP@
FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GENISOIMAGE = @GENISOIMAGE@
@@ -364,7 +366,7 @@ GREP = @GREP@
HARDENED_CPPFLAGS = @HARDENED_CPPFLAGS@
HARDENED_CXXFLAGS = @HARDENED_CXXFLAGS@
HARDENED_LDFLAGS = @HARDENED_LDFLAGS@
HAVE_CXX11 = @HAVE_CXX11@
HAVE_CXX17 = @HAVE_CXX17@
HEXDUMP = @HEXDUMP@
IMAGEMAGICK_CONVERT = @IMAGEMAGICK_CONVERT@
INSTALL = @INSTALL@
@@ -435,8 +437,6 @@ PYTHON = @PYTHON@
PYTHONPATH = @PYTHONPATH@
QR_CFLAGS = @QR_CFLAGS@
QR_LIBS = @QR_LIBS@
QT5_CFLAGS = @QT5_CFLAGS@
QT5_LIBS = @QT5_LIBS@
QTACCESSIBILITY_CFLAGS = @QTACCESSIBILITY_CFLAGS@
QTACCESSIBILITY_LIBS = @QTACCESSIBILITY_LIBS@
QTCGL_CFLAGS = @QTCGL_CFLAGS@
@@ -459,6 +459,7 @@ QTTHEME_CFLAGS = @QTTHEME_CFLAGS@
QTTHEME_LIBS = @QTTHEME_LIBS@
QTXCBQPA_CFLAGS = @QTXCBQPA_CFLAGS@
QTXCBQPA_LIBS = @QTXCBQPA_LIBS@
QT_CFLAGS = @QT_CFLAGS@
QT_DBUS_CFLAGS = @QT_DBUS_CFLAGS@
QT_DBUS_INCLUDES = @QT_DBUS_INCLUDES@
QT_DBUS_LIBS = @QT_DBUS_LIBS@
+80 -14
View File
@@ -53,7 +53,7 @@ dnl CAUTION: Do not use this inside of a conditional.
AC_DEFUN([BITCOIN_QT_INIT],[
dnl enable qt support
AC_ARG_WITH([gui],
[AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@],
[AS_HELP_STRING([--with-gui@<:@=no|qt5|qt6|auto@:>@],
[build agrarian-qt GUI (default=auto)])],
[
bitcoin_qt_want_version=$withval
@@ -136,11 +136,19 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
fi
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
if test "x$QT_LIB_PREFIX" = xQt6; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QTlsBackendOpenSSL)],[-lqopensslbackend -lssl -lcrypto])
AC_DEFINE(QT_TLS_OPENSSL, 1, [Define this symbol if the Qt OpenSSL TLS backend exists])
fi
if test "x$TARGET_OS" = xwindows; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
elif test "x$TARGET_OS" = xlinux; then
if test "x$QT_LIB_PREFIX" = xQt6; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb])
else
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
fi
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
elif test "x$TARGET_OS" = xdarwin; then
AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
@@ -153,7 +161,13 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
])
if test "x$use_pkgconfig$qt_bin_path" = xyes; then
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
qt_bin_path="`$PKG_CONFIG --variable=host_bins ${QT_LIB_PREFIX}Core 2>/dev/null`"
fi
if test "x$qt_bin_path" != x && test -d "$qt_bin_path/../libexec"; then
qt_bin_path="$qt_bin_path$PATH_SEPARATOR$qt_bin_path/../libexec"
fi
if test "x$qt_bin_path" != x; then
qt_bin_path="$qt_bin_path$PATH_SEPARATOR$PATH"
fi
if test "x$use_hardening" != xno; then
@@ -203,11 +217,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
])
fi
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes)
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt6 moc6 moc-qt5 moc5 moc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt6 uic6 uic-qt5 uic5 uic], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt6 rcc6 rcc-qt5 rcc5 rcc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt6 lrelease6 lrelease-qt5 lrelease5 lrelease], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt6 lupdate6 lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes)
MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
case $host in
@@ -246,7 +260,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
],[
bitcoin_enable_qt=no
])
AC_MSG_RESULT([$bitcoin_enable_qt (Qt5)])
AC_MSG_RESULT([$bitcoin_enable_qt ($QT_LIB_PREFIX)])
AC_SUBST(QT_PIE_FLAGS)
AC_SUBST(QT_INCLUDES)
@@ -256,7 +270,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
AC_SUBST(QT_DBUS_LIBS)
AC_SUBST(QT_TEST_INCLUDES)
AC_SUBST(QT_TEST_LIBS)
AC_SUBST(QT_SELECT, qt5)
AC_SUBST(QT_SELECT)
AC_SUBST(MOC_DEFS)
])
@@ -284,6 +298,26 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
[bitcoin_cv_qt5=no])
])])
dnl Internal. Check if the included version of Qt is Qt6.
dnl Requires: INCLUDES must be populated as necessary.
dnl Output: bitcoin_cv_qt6=yes|no
AC_DEFUN([_BITCOIN_QT_CHECK_QT6],[
AC_CACHE_CHECK(for Qt 6, bitcoin_cv_qt6,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QtCore/qconfig.h>
#ifndef QT_VERSION
# include <QtCore/qglobal.h>
#endif
]],
[[
#if QT_VERSION < 0x060000 || QT_VERSION_MAJOR < 6
choke
#endif
]])],
[bitcoin_cv_qt6=yes],
[bitcoin_cv_qt6=no])
])])
dnl Internal. Check if the included version of Qt is greater than Qt58.
dnl Requires: INCLUDES must be populated as necessary.
dnl Output: bitcoin_cv_qt5=yes|no
@@ -359,6 +393,28 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
if test -d "$qt_plugin_path/accessible"; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
fi
if test "x$QT_LIB_PREFIX" = xQt6; then
if test -d "$qt_plugin_path/imageformats"; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/imageformats"
fi
if test -d "$qt_plugin_path/tls"; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/tls"
fi
if test -d "$qt_plugin_path/platforminputcontexts"; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforminputcontexts"
fi
if test -d "$qt_plugin_path/generic"; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/generic"
fi
if test "x$TARGET_OS" = xlinux; then
QT_LIBS="-lQt6XcbQpa -lQt6InputSupport -lQt6FbSupport -lQt6DeviceDiscoverySupport $QT_LIBS"
QT_LIBS="$QT_LIBS -lQt6BundledHarfbuzz -lQt6BundledLibpng -lQt6BundledLibjpeg -lQt6BundledPcre2"
if test "x$PKG_CONFIG" != x; then
QT6_XCB_LIBS=`PKG_CONFIG_LIBDIR=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig $PKG_CONFIG --libs --static x11 x11-xcb xcb xcb-cursor xcb-icccm xcb-image xcb-keysyms xcb-randr xcb-renderutil xcb-shape xcb-shm xcb-sync xcb-xfixes xcb-xkb xkbcommon xkbcommon-x11 fontconfig freetype2 harfbuzz 2>/dev/null`
QT_LIBS="$QT_LIBS $QT6_XCB_LIBS"
fi
fi
else
if test "x$use_pkgconfig" = xyes; then
: dnl
m4_ifdef([PKG_CHECK_MODULES],[
@@ -416,6 +472,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
fi
fi
fi
fi
])
dnl Internal. Find Qt libraries using pkg-config.
@@ -427,14 +484,17 @@ dnl Outputs: All necessary QT_* variables are set.
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
m4_ifdef([PKG_CHECK_MODULES],[
QT_LIB_PREFIX=Qt6
qt_modules="Qt6Core Qt6Gui Qt6Network Qt6Widgets"
if test "x$bitcoin_qt_want_version" = xqt5; then
QT_LIB_PREFIX=Qt5
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
qt_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
fi
BITCOIN_QT_CHECK([
PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
PKG_CHECK_MODULES([QT], [$qt_modules], [QT_INCLUDES="$QT_CFLAGS"; QT_LIBS="$QT_LIBS" have_qt=yes],[have_qt=no])
if test "x$have_qt" != xyes; then
have_qt=no
BITCOIN_QT_FAIL([Qt dependencies not found])
_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG
fi
])
BITCOIN_QT_CHECK([
@@ -471,10 +531,17 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
BITCOIN_QT_CHECK([
if test "x$bitcoin_qt_want_version" = xauto; then
_BITCOIN_QT_CHECK_QT6
_BITCOIN_QT_CHECK_QT5
_BITCOIN_QT_CHECK_QT58
fi
QT_LIB_PREFIX=Qt6
if test "x$bitcoin_qt_want_version" = xqt5; then
QT_LIB_PREFIX=Qt5
fi
if test "x$bitcoin_qt_want_version" = xauto && test "x$bitcoin_cv_qt6" != xyes; then
QT_LIB_PREFIX=Qt5
fi
])
BITCOIN_QT_CHECK([
@@ -527,4 +594,3 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
CXXFLAGS="$TEMP_CXXFLAGS"
LIBS="$TEMP_LIBS"
])
Vendored
+1578 -59
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -62,8 +62,8 @@ case $host in
lt_cv_deplibs_check_method="pass_all"
;;
esac
dnl Require C++11 compiler (no GNU extensions)
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault])
dnl Require C++17 compiler (no GNU extensions). Qt 6.8 requires C++17.
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory], [nodefault])
dnl Check if -latomic is required for <std::atomic>
CHECK_ATOMIC
+7 -23
View File
@@ -6,10 +6,6 @@ JOBS="${JOBS:-1}"
HOST="${HOST:-x86_64-pc-linux-gnu}"
PREFIX="$ROOT/depends/$HOST"
BASE_CONFIG="$PREFIX/share/config.site"
CONFIG_SITE_FILE="${CONFIG_SITE_FILE:-/tmp/agrarian-linux-wallet-config.site}"
QT_PKG_CONFIG_DIR="${QT_PKG_CONFIG_DIR:-/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig}"
QT_BINDIR="${QT_BINDIR:-/usr/lib/qt5/bin}"
PROTOC_BINDIR="${PROTOC_BINDIR:-/usr/bin}"
require_cmd() {
if ! command -v "$1" >/dev/null 2>&1; then
@@ -31,36 +27,24 @@ require_cmd make
require_cmd pkg-config
require_cmd gcc
require_cmd g++
require_cmd sed
require_cmd cp
require_cmd "$PROTOC_BINDIR/protoc"
require_path "$QT_BINDIR/moc"
require_path "$QT_BINDIR/uic"
require_path "$QT_BINDIR/rcc"
require_path "$QT_BINDIR/lrelease"
require_path "$QT_BINDIR/lupdate"
require_cmd cmake
require_cmd ninja
echo "Building native depends for $HOST..."
make -C depends -j"$JOBS"
make -C depends HOST="$HOST" NO_QT=0 -j"$JOBS"
require_path "$BASE_CONFIG"
cp "$BASE_CONFIG" "$CONFIG_SITE_FILE"
sed -i.old \
-e "s#^with_qt_bindir=.*#with_qt_bindir='$QT_BINDIR'#" \
-e "s#^with_protoc_bindir=.*#with_protoc_bindir='$PROTOC_BINDIR'#" \
-e "s#^PKG_CONFIG_LIBDIR=.*#PKG_CONFIG_LIBDIR='$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$QT_PKG_CONFIG_DIR'#" \
"$CONFIG_SITE_FILE"
if [[ ! -f configure ]]; then
./autogen.sh
fi
echo "Configuring Ubuntu Qt wallet build..."
CONFIG_SITE="$CONFIG_SITE_FILE" ./configure \
echo "Configuring Ubuntu Qt6 wallet build..."
CONFIG_SITE="$BASE_CONFIG" ./configure \
--disable-maintainer-mode \
--disable-tests \
--disable-bench \
--with-gui=qt5
--with-gui=qt6 \
--with-qtdbus=no
echo "Building Ubuntu Qt wallet with JOBS=$JOBS..."
make -j"$JOBS"
+4 -3
View File
@@ -54,17 +54,18 @@ EOF
-rpcbind=127.0.0.1 -rpcport="$RPCPORT" -port="$PORT" -keypool=1 -daemon
for _ in $(seq 1 "$WAIT_SECONDS"); do
if rpc getinfo >/dev/null 2>&1; then
if rpc getwalletinfo >/dev/null 2>&1; then
break
fi
sleep 1
done
if ! rpc getinfo >/dev/null; then
echo "Timed out waiting for RPC on 127.0.0.1:$RPCPORT" >&2
if ! rpc getwalletinfo >/dev/null; then
echo "Timed out waiting for wallet RPC on 127.0.0.1:$RPCPORT" >&2
tail -n 80 "$DATADIR/regtest/debug.log" >&2 || true
exit 1
fi
rpc getinfo >/dev/null
rpc getwalletinfo >/dev/null
rpc getmininginfo >/dev/null
rpc getstakingstatus >/dev/null
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DATADIR="${DATADIR:-$(mktemp -d /tmp/agrarian-qt-smoke.XXXXXX)}"
LOGFILE="${LOGFILE:-/tmp/agrarian-qt-smoke.log}"
WAIT_SECONDS="${WAIT_SECONDS:-25}"
AGRARIAN_QT="${AGRARIAN_QT:-$ROOT/src/qt/agrarian-qt}"
require_path() {
if [[ ! -x "$1" ]]; then
echo "Missing executable: $1" >&2
exit 1
fi
}
require_path "$AGRARIAN_QT"
mkdir -p "$DATADIR"
rm -f "$LOGFILE"
set +e
timeout --kill-after=5s "${WAIT_SECONDS}s" xvfb-run -a "$AGRARIAN_QT" \
-regtest -datadir="$DATADIR" -choosedatadir=0 -debug=qt -debug=rpc \
-printtoconsole -server=0 -listen=0 -dnsseed=0 -connect=0 >"$LOGFILE" 2>&1
exit_code=$?
set -e
if [[ "$exit_code" -ne 124 ]]; then
echo "Expected Qt wallet to keep running until timeout, got exit code $exit_code" >&2
tail -n 80 "$LOGFILE" >&2 || true
exit 1
fi
if ! grep -q "init message: Done loading" "$LOGFILE"; then
echo "Qt wallet did not reach Done loading" >&2
tail -n 120 "$LOGFILE" >&2 || true
exit 1
fi
if grep -E "No functional TLS|No such signal|Unknown property" "$LOGFILE" >/dev/null; then
echo "Qt wallet logged a Qt6 runtime compatibility warning" >&2
grep -E "No functional TLS|No such signal|Unknown property" "$LOGFILE" >&2 || true
exit 1
fi
echo "Agrarian Qt smoke test passed"
echo " datadir: $DATADIR"
echo " log: $LOGFILE"
+102
View File
@@ -0,0 +1,102 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DATADIR="${DATADIR:-$(mktemp -d /tmp/agrarian-wallet-smoke.XXXXXX)}"
RPCPORT="${RPCPORT:-36435}"
PORT="${PORT:-36436}"
WAIT_SECONDS="${WAIT_SECONDS:-90}"
AGRARIAND="${AGRARIAND:-$ROOT/src/agrariand}"
AGRARIAN_CLI="${AGRARIAN_CLI:-$ROOT/src/agrarian-cli}"
BACKUP="${BACKUP:-/tmp/agrarian-wallet-backup-smoke.dat}"
cleanup() {
if [[ -x "$AGRARIAN_CLI" && -d "$DATADIR" ]]; then
"$AGRARIAN_CLI" -datadir="$DATADIR" -regtest \
-rpcuser=wallet -rpcpassword=wallet-pass -rpcport="$RPCPORT" stop >/dev/null 2>&1 || true
fi
}
trap cleanup EXIT
require_path() {
if [[ ! -x "$1" ]]; then
echo "Missing executable: $1" >&2
exit 1
fi
}
rpc() {
"$AGRARIAN_CLI" -datadir="$DATADIR" -regtest \
-rpcuser=wallet -rpcpassword=wallet-pass -rpcconnect=127.0.0.1 \
-rpcport="$RPCPORT" "$@"
}
require_path "$AGRARIAND"
require_path "$AGRARIAN_CLI"
mkdir -p "$DATADIR"
cat > "$DATADIR/agrarian.conf" <<EOF
regtest=1
server=1
rpcuser=wallet
rpcpassword=wallet-pass
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
listen=0
dnsseed=0
upnp=0
staking=0
keypool=10
EOF
"$AGRARIAND" -datadir="$DATADIR" -regtest -server -listen=0 -dnsseed=0 \
-connect=0 -upnp=0 -staking=0 -rpcuser=wallet -rpcpassword=wallet-pass \
-rpcbind=127.0.0.1 -rpcport="$RPCPORT" -port="$PORT" -keypool=10 -daemon
for _ in $(seq 1 "$WAIT_SECONDS"); do
if rpc getinfo >/dev/null 2>&1; then
break
fi
sleep 1
done
if ! rpc getinfo >/dev/null; then
echo "Timed out waiting for RPC on 127.0.0.1:$RPCPORT" >&2
tail -n 80 "$DATADIR/regtest/debug.log" >&2 || true
exit 1
fi
rpc getwalletinfo >/dev/null
receive_address="$(rpc getnewaddress receive)"
send_address="$(rpc getnewaddress sendtest)"
rpc generate 101 >/dev/null
mined_balance="$(rpc getbalance)"
txid="$(rpc sendtoaddress "$send_address" 1.0)"
rpc generate 1 >/dev/null
rpc gettransaction "$txid" >/dev/null
rm -f "$BACKUP"
rpc backupwallet "$BACKUP"
test -s "$BACKUP"
set +e
encrypt_output="$(rpc encryptwallet smoke-passphrase 2>&1)"
encrypt_code=$?
set -e
if [[ "$encrypt_code" -ne 0 ]]; then
echo "$encrypt_output" >&2
exit "$encrypt_code"
fi
sleep 2
if rpc getinfo >/dev/null 2>&1; then
echo "Expected encryptwallet to stop the daemon, but RPC is still available" >&2
exit 1
fi
echo "Agrarian wallet smoke test passed"
echo " datadir: $DATADIR"
echo " receive_address: $receive_address"
echo " send_txid: $txid"
echo " mined_balance_before_send: $mined_balance"
echo " backup: $BACKUP"
+1 -1
View File
@@ -47,7 +47,7 @@ define $(package)_build_cmds
endef
define $(package)_stage_cmds
$(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw
$(MAKE) DESTDIR=$($(package)_staging_dir) -j1 install_sw
endef
define $(package)_postprocess_cmds
+1 -1
View File
@@ -25,7 +25,7 @@ USE_UPNP ?= 1
qt_native_packages := native_protobuf
qt_packages := qrencode protobuf zlib
qt_linux_packages := qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
qt_linux_packages := qt
qt_darwin_packages := qt
qt_mingw32_packages := qt
+31 -145
View File
@@ -1,20 +1,18 @@
PACKAGE=qt
$(package)_version=5.9.7
$(package)_download_path=https://download.qt.io/new_archive/qt/5.9/$($(package)_version)/submodules
$(package)_suffix=opensource-src-$($(package)_version).tar.xz
$(package)_version=6.8.3
$(package)_download_path=https://download.qt.io/official_releases/qt/6.8/$($(package)_version)/submodules
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=36dd9574f006eaa1e5af780e4b33d11fe39d09fd7c12f3b9d83294174bd28f00
$(package)_sha256_hash=56001b905601bb9023d399f3ba780d7fa940f3e4861e496a7c490331f49e0b80
$(package)_dependencies=openssl zlib
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=mac-qmake.conf
$(package)_linux_dependencies=
$(package)_build_subdir=qtbase-build
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14
$(package)_qttranslations_sha256_hash=c3c61d79c3d8fe316a20b3617c64673ce5b5519b2e45535f49bee313152fa531
$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=d62e0f70d99645d6704dbb8976fb2222443061743689943d40970c52c49367a1
$(package)_qttools_sha256_hash=02a4e219248b94f1333df843d25763f35251c1074cdc4fb5bda67d340f8c8b3a
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
@@ -22,100 +20,35 @@ $(package)_extra_sources += $($(package)_qttools_file_name)
define $(package)_set_vars
$(package)_config_opts_release = -release
$(package)_config_opts_debug = -debug
$(package)_config_opts += -bindir $(build_prefix)/bin
$(package)_config_opts += -c++std c++11
$(package)_config_opts += -bindir bin
$(package)_config_opts += -confirm-license
$(package)_config_opts += -dbus-runtime
$(package)_config_opts += -hostprefix $(build_prefix)
$(package)_config_opts += -no-compile-examples
$(package)_config_opts += -no-cups
$(package)_config_opts += -no-egl
$(package)_config_opts += -no-eglfs
$(package)_config_opts += -no-freetype
$(package)_config_opts += -no-gif
$(package)_config_opts += -no-dbus
$(package)_config_opts += -no-glib
$(package)_config_opts += -no-icu
$(package)_config_opts += -no-iconv
$(package)_config_opts += -no-kms
$(package)_config_opts += -no-linuxfb
$(package)_config_opts += -no-libudev
$(package)_config_opts += -no-mtdev
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations
$(package)_config_opts += -no-qml-debug
$(package)_config_opts += -no-sql-db2
$(package)_config_opts += -no-sql-ibase
$(package)_config_opts += -no-sql-oci
$(package)_config_opts += -no-sql-tds
$(package)_config_opts += -no-sql-mysql
$(package)_config_opts += -no-sql-odbc
$(package)_config_opts += -no-sql-psql
$(package)_config_opts += -no-sql-sqlite
$(package)_config_opts += -no-sql-sqlite2
$(package)_config_opts += -no-use-gold-linker
$(package)_config_opts += -no-xinput2
$(package)_config_opts += -no-opengl
$(package)_config_opts += -no-pch
$(package)_config_opts += -no-feature-sql
$(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -opensource
$(package)_config_opts += -openssl-linked
$(package)_config_opts += -optimized-qmake
$(package)_config_opts += -no-pch
$(package)_config_opts += -pkg-config
$(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -qt-libpng
$(package)_config_opts += -qt-libjpeg
$(package)_config_opts += -qt-pcre
$(package)_config_opts += -qt-harfbuzz
$(package)_config_opts += -system-zlib
$(package)_config_opts += -qt-libjpeg
$(package)_config_opts += -qt-libpng
$(package)_config_opts += -qt-pcre
$(package)_config_opts += -static
$(package)_config_opts += -silent
$(package)_config_opts += -v
$(package)_config_opts += -no-feature-dial
$(package)_config_opts += -no-feature-ftp
$(package)_config_opts += -no-feature-lcdnumber
$(package)_config_opts += -no-feature-pdf
$(package)_config_opts += -no-feature-printer
$(package)_config_opts += -no-feature-printdialog
$(package)_config_opts += -no-feature-concurrent
$(package)_config_opts += -no-feature-sql
$(package)_config_opts += -no-feature-statemachine
$(package)_config_opts += -no-feature-syntaxhighlighter
$(package)_config_opts += -no-feature-textbrowser
$(package)_config_opts += -no-feature-textodfwriter
$(package)_config_opts += -no-feature-udpsocket
$(package)_config_opts += -no-feature-wizard
$(package)_config_opts += -no-feature-xml
ifneq ($(build_os),darwin)
$(package)_config_opts_darwin = -xplatform macx-clang-linux
$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK)
$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION)
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-"
$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION)
$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
$(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION)
endif
$(package)_config_opts_linux = -qt-xkbcommon-x11
$(package)_config_opts_linux += -qt-xcb
$(package)_config_opts += -system-zlib
$(package)_config_opts_linux = -fontconfig
$(package)_config_opts_linux += -qpa xcb
$(package)_config_opts_linux += -xcb
$(package)_config_opts_linux += -xkbcommon
$(package)_config_opts_linux += -system-freetype
$(package)_config_opts_linux += -no-feature-sessionmanager
$(package)_config_opts_linux += -fontconfig
$(package)_config_opts_linux += -no-opengl
$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform agrarian-linux-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform agrarian-linux-g++
$(package)_config_opts_s390x_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_powerpc_linux += -platform linux-g++ -xplatform linux-g++-32
$(package)_config_opts_powerpc64le_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_sparc64_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_alpha_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_m68k_linux += -platform linux-g++ -xplatform linux-g++-32
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
$(package)_build_env = QT_RCC_TEST=1
$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1
$(package)_config_opts_mingw32 = -qpa windows
$(package)_config_opts_darwin = -qpa cocoa
endef
define $(package)_fetch_cmds
@@ -130,75 +63,28 @@ define $(package)_extract_cmds
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
mkdir qtbase && \
mkdir qtbase qtbase-build qttools qttools-build qttranslations qttranslations-build && \
tar --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
mkdir qttranslations && \
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
mkdir qttools && \
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
endef
define $(package)_preprocess_cmds
sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
sed -i.old "/#include <QtCore\/qbytearray.h>/a #include <limits>" qtbase/src/corelib/tools/qbytearraymatcher.h && \
sed -i.old "/#include \"qfloat16_p.h\"/a #include <limits>" qtbase/src/corelib/global/qfloat16.cpp && \
sed -i.old "s/#if defined(Q_CC_MINGW) || !defined(TOUCHEVENTF_MOVE)/#if (defined(Q_CC_MINGW) \&\& WINVER < 0x0601) || !defined(TOUCHEVENTF_MOVE)/" qtbase/src/plugins/platforms/windows/qwindowsmousehandler.cpp && \
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \
sed -i.old "s|X11/extensions/XIproto.h|X11/X.h|" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
sed -i.old "/SUBDIRS += printsupport/d" qtbase/src/plugins/plugins.pro && \
sed -i.old -e 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' -e 's|/bin/pwd|pwd|' qtbase/configure && \
sed -i.old 's/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0)/CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft)/' qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm && \
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/agrarian-linux-g++ && \
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/agrarian-linux-g++/qmake.conf && \
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_LFLAGS = |!host_build: QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CXXFLAGS = |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations
endef
define $(package)_config_cmds
export PKG_CONFIG_SYSROOT_DIR=/ && \
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig && \
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
./configure $($(package)_config_opts) && \
echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
$(MAKE) sub-src-clean && \
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. && \
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile && \
cd ../lupdate/ && ../../../../qtbase/bin/qmake lupdate.pro -o Makefile && cd ../../../..
../qtbase/configure $($(package)_config_opts) -- -G Ninja
endef
define $(package)_build_cmds
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
$(MAKE) -C ../qttools/src/linguist/lrelease && \
$(MAKE) -C ../qttools/src/linguist/lupdate && \
$(MAKE) -C ../qttranslations
cmake --build . --parallel
endef
define $(package)_stage_cmds
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. && \
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets && \
if `test -f qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a`; then \
cp qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a $($(package)_staging_prefix_dir)/lib; \
fi
DESTDIR=$($(package)_staging_dir) cmake --install .
endef
define $(package)_postprocess_cmds
rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
rm -rf lib/cmake share/doc share/examples share/qt6/sbom && \
rm -f lib/lib*.la lib/*.prl plugins/*/*.prl
endef
+9
View File
@@ -9,6 +9,15 @@ define $(package)_set_vars
$(package)_config_opts_linux=--with-pic
endef
define $(package)_preprocess_cmds
sed -i.old \
-e 's/import sys, os, py_compile, imp/import sys, os, py_compile, importlib.util/' \
-e "s/hasattr(imp, 'get_tag')/True/g" \
-e 's/imp.cache_from_source(filepath)/importlib.util.cache_from_source(filepath)/g' \
-e 's/imp.cache_from_source(filepath, False)/importlib.util.cache_from_source(filepath, optimization="")/g' \
py-compile
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
+18 -22
View File
@@ -21,14 +21,12 @@ Install the native daemon build dependencies:
sudo apt-get update
sudo apt-get install -y \
build-essential pkg-config autoconf automake libtool bsdmainutils \
libboost-all-dev libevent-dev libgmp-dev libssl-dev \
libdb5.3-dev libdb5.3++-dev
cmake ninja-build python3 curl git
For the desktop wallet, also install Qt and protobuf tools:
For a headless Qt wallet smoke test, also install:
sudo apt-get install -y \
qtbase5-dev qttools5-dev-tools qtchooser \
libqrencode-dev libprotobuf-dev protobuf-compiler
xvfb
Daemon-only build
-----------------
@@ -57,42 +55,40 @@ For the desktop wallet, use:
JOBS=1 ./contrib/build-linux-wallet.sh
The wallet helper builds/restores the native depends prefix first, then creates
a temporary config.site that keeps the depends libraries while allowing system
Qt 5 tools and pkg-config files to be used.
The wallet helper builds/restores the native depends prefix first, including
Qt 6.8.3, OpenSSL 3.5.6, and Boost 1.91.0. It then configures the project with
the generated depends `config.site` and builds the Ubuntu Qt wallet.
Defaults:
HOST=x86_64-pc-linux-gnu
QT_BINDIR=/usr/lib/qt5/bin
PROTOC_BINDIR=/usr/bin
CONFIG_SITE_FILE=/tmp/agrarian-linux-wallet-config.site
Warnings
--------
Qt 5.15 and protobuf 3.x emit compatibility/deprecation warnings in a few Qt
translation units. Those warnings are expected while the Windows build remains
pinned to Qt 5.9.7 and protobuf 2.6.1.
The Qt6/OpenSSL3 path should build without Qt compatibility warnings. First-run
runtime logs may report missing cache files such as `peers.dat`, `banlist.dat`,
or masternode cache files; those are created during startup.
Functional smoke test
---------------------
After building the daemon, run the isolated regtest smoke test:
After building, run the isolated smoke tests:
./contrib/smoke-test-daemon.sh
./contrib/smoke-test-wallet.sh
./contrib/smoke-test-qt.sh
The script starts `agrariand` with a temporary regtest datadir, confirms RPC and
wallet calls work, mines one block with `generate`, checks the block count, and
stops the daemon.
The daemon script confirms RPC and wallet calls work, mines one block, checks
the block count, and stops the daemon. The wallet script checks address
creation, mining, send/confirm, backup, and encryption shutdown. The Qt script
starts `agrarian-qt` under Xvfb and confirms the GUI reaches `Done loading`
without Qt6 TLS, signal, or stylesheet compatibility warnings.
OpenSSL 3
---------
Ubuntu 24.04 ships OpenSSL 3. Agrarian no longer rejects this only because
`RAND_egd` is unavailable. Some deprecated OpenSSL SHA calls still warn during
compilation; those warnings are expected until the hashing helper code is
modernized.
The deterministic depends build currently uses OpenSSL 3.5.6.
Berkeley DB
-----------
+8 -10
View File
@@ -32,8 +32,7 @@ Ubuntu package baseline
For the native Ubuntu wallet:
sudo apt-get install -y \
qtbase5-dev qttools5-dev-tools qtchooser \
libqrencode-dev libprotobuf-dev protobuf-compiler
cmake ninja-build xvfb
For the Windows wallet:
@@ -51,11 +50,9 @@ Why the helpers exist
The wallet build is sensitive to tool version mismatches:
* Native Ubuntu uses current system Qt tools and protobuf while keeping the
deterministic depends libraries.
* Windows uses the Qt 5.9.7 and protobuf 2.6.1 libraries from depends. Its host
tools must match those libraries closely enough for generated C++ output to
compile.
* Native Ubuntu uses the deterministic depends Qt6, OpenSSL, Boost, protobuf,
and supporting libraries.
* Cross-target wallets must use the matching Qt host tools staged by depends.
The helper scripts keep those rules in one place so the build is repeatable on a
fresh server.
@@ -80,10 +77,11 @@ After the Windows wallet build:
Version checks
--------------
On Ubuntu:
On Ubuntu, use the smoke tests:
QT_QPA_PLATFORM=offscreen src/qt/agrarian-qt --version
src/agrariand --version
./contrib/smoke-test-daemon.sh
./contrib/smoke-test-wallet.sh
./contrib/smoke-test-qt.sh
For Windows binaries from the Linux build host:
+5 -5
View File
@@ -6,26 +6,26 @@ These are the dependencies currently used by Agrarian Core. You can find instruc
| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) |
| --- | --- | --- | --- | --- | --- |
| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
| Boost | [1.64.0](https://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No | | |
| Clang | | [3.3+](https://llvm.org/releases/download.html) (C++11 support) | | | |
| Boost | [1.91.0](https://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No | | |
| Clang | | C++17 support | | | |
| D-Bus | [1.10.18](https://cgit.freedesktop.org/dbus/dbus/tree/NEWS?h=dbus-1.10) | | No | Yes | |
| Expat | [2.2.6](https://libexpat.github.io/) | | No | Yes | |
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | |
| GCC | | [4.8+](https://gcc.gnu.org/) (C++11 support) | | | |
| GCC | | C++17 support | | | |
| HarfBuzz-NG | | | | | |
| libevent | [2.1.8-stable](https://github.com/libevent/libevent/releases) | 2.0.22 | No | | |
| libjpeg | | | | | [Yes](https://github.com/agrarian-project/agrarian/blob/master/depends/packages/qt.mk#L65) |
| libpng | | | | | [Yes](https://github.com/agrarian-project/agrarian/blob/master/depends/packages/qt.mk#L64) |
| librsvg | | | | | |
| MiniUPnPc | [2.0.20180203](http://miniupnp.free.fr/files) | | No | | |
| OpenSSL | [1.0.1k](https://www.openssl.org/source) | | Yes | | |
| OpenSSL | [3.5.6](https://www.openssl.org/source) | | No | | |
| GMP | [6.1.2](https://gmplib.org/) | | No | | |
| PCRE | | | | | [Yes](https://github.com/agrarian-project/agrarian/blob/master/depends/packages/qt.mk#L66) |
| protobuf | [2.6.1](https://github.com/google/protobuf/releases) | | No | | |
| Python (tests) | | [3.5](https://www.python.org/downloads) | | | |
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |
| Qt | [5.9.7](https://download.qt.io/official_releases/qt/) | [5.5.1](https://github.com/bitcoin/bitcoin/issues/13478) | No | | |
| Qt | [6.8.3](https://download.qt.io/official_releases/qt/) | 6.8 LTS | No | | |
| XCB | | | | | [Yes](https://github.com/agrarian-project/agrarian/blob/master/depends/packages/qt.mk#L87) (Linux only) |
| xkbcommon | | | | | [Yes](https://github.com/agrarian-project/agrarian/blob/master/depends/packages/qt.mk#L86) (Linux only) |
| ZeroMQ | [4.3.1](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No | | |
+3 -3
View File
@@ -247,6 +247,7 @@ EVENT_PTHREADS_LIBS = @EVENT_PTHREADS_LIBS@
EXEEXT = @EXEEXT@
EXTENDED_FUNCTIONAL_TESTS = @EXTENDED_FUNCTIONAL_TESTS@
FGREP = @FGREP@
FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GENISOIMAGE = @GENISOIMAGE@
@@ -257,7 +258,7 @@ GREP = @GREP@
HARDENED_CPPFLAGS = @HARDENED_CPPFLAGS@
HARDENED_CXXFLAGS = @HARDENED_CXXFLAGS@
HARDENED_LDFLAGS = @HARDENED_LDFLAGS@
HAVE_CXX11 = @HAVE_CXX11@
HAVE_CXX17 = @HAVE_CXX17@
HEXDUMP = @HEXDUMP@
IMAGEMAGICK_CONVERT = @IMAGEMAGICK_CONVERT@
INSTALL = @INSTALL@
@@ -328,8 +329,6 @@ PYTHON = @PYTHON@
PYTHONPATH = @PYTHONPATH@
QR_CFLAGS = @QR_CFLAGS@
QR_LIBS = @QR_LIBS@
QT5_CFLAGS = @QT5_CFLAGS@
QT5_LIBS = @QT5_LIBS@
QTACCESSIBILITY_CFLAGS = @QTACCESSIBILITY_CFLAGS@
QTACCESSIBILITY_LIBS = @QTACCESSIBILITY_LIBS@
QTCGL_CFLAGS = @QTCGL_CFLAGS@
@@ -352,6 +351,7 @@ QTTHEME_CFLAGS = @QTTHEME_CFLAGS@
QTTHEME_LIBS = @QTTHEME_LIBS@
QTXCBQPA_CFLAGS = @QTXCBQPA_CFLAGS@
QTXCBQPA_LIBS = @QTXCBQPA_LIBS@
QT_CFLAGS = @QT_CFLAGS@
QT_DBUS_CFLAGS = @QT_DBUS_CFLAGS@
QT_DBUS_INCLUDES = @QT_DBUS_INCLUDES@
QT_DBUS_LIBS = @QT_DBUS_LIBS@
+3 -3
View File
@@ -1932,6 +1932,7 @@ EVENT_PTHREADS_LIBS = @EVENT_PTHREADS_LIBS@
EXEEXT = @EXEEXT@
EXTENDED_FUNCTIONAL_TESTS = @EXTENDED_FUNCTIONAL_TESTS@
FGREP = @FGREP@
FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GENISOIMAGE = @GENISOIMAGE@
@@ -1942,7 +1943,7 @@ GREP = @GREP@
HARDENED_CPPFLAGS = @HARDENED_CPPFLAGS@
HARDENED_CXXFLAGS = @HARDENED_CXXFLAGS@
HARDENED_LDFLAGS = @HARDENED_LDFLAGS@
HAVE_CXX11 = @HAVE_CXX11@
HAVE_CXX17 = @HAVE_CXX17@
HEXDUMP = @HEXDUMP@
IMAGEMAGICK_CONVERT = @IMAGEMAGICK_CONVERT@
INSTALL = @INSTALL@
@@ -2013,8 +2014,6 @@ PYTHON = @PYTHON@
PYTHONPATH = @PYTHONPATH@
QR_CFLAGS = @QR_CFLAGS@
QR_LIBS = @QR_LIBS@
QT5_CFLAGS = @QT5_CFLAGS@
QT5_LIBS = @QT5_LIBS@
QTACCESSIBILITY_CFLAGS = @QTACCESSIBILITY_CFLAGS@
QTACCESSIBILITY_LIBS = @QTACCESSIBILITY_LIBS@
QTCGL_CFLAGS = @QTCGL_CFLAGS@
@@ -2037,6 +2036,7 @@ QTTHEME_CFLAGS = @QTTHEME_CFLAGS@
QTTHEME_LIBS = @QTTHEME_LIBS@
QTXCBQPA_CFLAGS = @QTXCBQPA_CFLAGS@
QTXCBQPA_LIBS = @QTXCBQPA_LIBS@
QT_CFLAGS = @QT_CFLAGS@
QT_DBUS_CFLAGS = @QT_DBUS_CFLAGS@
QT_DBUS_INCLUDES = @QT_DBUS_INCLUDES@
QT_DBUS_LIBS = @QT_DBUS_LIBS@
+5 -2
View File
@@ -70,8 +70,8 @@
/* Define this symbol if the consensus lib has been built */
#undef HAVE_CONSENSUS_LIB
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
/* define if the compiler supports basic C++17 syntax */
#undef HAVE_CXX17
/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
don't. */
@@ -366,6 +366,9 @@
/* Define this symbol if qt plugins are static */
#undef QT_STATICPLUGIN
/* Define this symbol if the Qt OpenSSL TLS backend exists */
#undef QT_TLS_OPENSSL
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
+17 -4
View File
@@ -58,6 +58,12 @@
#if QT_VERSION < 0x050400
Q_IMPORT_PLUGIN(AccessibleFactory)
#endif
#if defined(QT_TLS_OPENSSL)
Q_IMPORT_PLUGIN(QTlsBackendOpenSSL);
#endif
#if defined(QT_QPA_PLATFORM_MINIMAL)
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
#endif
#if defined(QT_QPA_PLATFORM_XCB)
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
#elif defined(QT_QPA_PLATFORM_WINDOWS)
@@ -120,12 +126,19 @@ static void initTranslations(QTranslator& qtTranslatorBase, QTranslator& qtTrans
// - First load the translator for the base language, without territory
// - Then load the more specific locale translator
const QString qtTranslationsPath =
#if QT_VERSION >= 0x060000
QLibraryInfo::path(QLibraryInfo::TranslationsPath);
#else
QLibraryInfo::location(QLibraryInfo::TranslationsPath);
#endif
// Load e.g. qt_de.qm
if (qtTranslatorBase.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
if (qtTranslatorBase.load("qt_" + lang, qtTranslationsPath))
QApplication::installTranslator(&qtTranslatorBase);
// Load e.g. qt_de_DE.qm
if (qtTranslator.load("qt_" + lang_territory, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
if (qtTranslator.load("qt_" + lang_territory, qtTranslationsPath))
QApplication::installTranslator(&qtTranslator);
// Load e.g. bitcoin_de.qm (shortcut "de" needs to be defined in agrarian.qrc)
@@ -502,11 +515,11 @@ int main(int argc, char* argv[])
Q_INIT_RESOURCE(agrarian_locale);
Q_INIT_RESOURCE(agrarian);
#if QT_VERSION > 0x050100
#if QT_VERSION > 0x050100 && QT_VERSION < 0x060000
// Generate high-dpi pixmaps
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
#if QT_VERSION >= 0x050600
#if QT_VERSION >= 0x050600 && QT_VERSION < 0x060000
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#ifdef Q_OS_MAC
+3 -3
View File
@@ -16,6 +16,7 @@
#include <QDebug>
#include <QList>
#include <QLocale>
bool BannedNodeLessThan::operator()(const CCombinedBan& left, const CCombinedBan& right) const
{
@@ -125,9 +126,8 @@ QVariant BanTableModel::data(const QModelIndex &index, int role) const
case Address:
return QString::fromStdString(rec->subnet.ToString());
case Bantime:
QDateTime date = QDateTime::fromMSecsSinceEpoch(0);
date = date.addSecs(rec->banEntry.nBanUntil);
return date.toString(Qt::SystemLocaleLongDate);
QDateTime date = QDateTime::fromSecsSinceEpoch(rec->banEntry.nBanUntil);
return QLocale::system().toString(date, QLocale::LongFormat);
}
}
+4 -1
View File
@@ -119,7 +119,10 @@ public:
opt.rect = rect();
cachedMinimumSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this).expandedTo(QApplication::globalStrut());
cachedMinimumSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
cachedMinimumSizeHint = cachedMinimumSizeHint.expandedTo(QApplication::globalStrut());
#endif
}
return cachedMinimumSizeHint;
}
+18 -15
View File
@@ -37,9 +37,12 @@
#include <iostream>
#include <QAction>
#include <QActionGroup>
#include <QApplication>
#include <QDateTime>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QDesktopWidget>
#endif
#include <QDragEnterEvent>
#include <QIcon>
#include <QListWidget>
@@ -305,9 +308,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
overviewAction->setToolTip(overviewAction->statusTip());
overviewAction->setCheckable(true);
#ifdef Q_OS_MAC
overviewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1));
overviewAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_1));
#else
overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
overviewAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_1));
#endif
tabGroup->addAction(overviewAction);
@@ -316,9 +319,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
sendCoinsAction->setToolTip(sendCoinsAction->statusTip());
sendCoinsAction->setCheckable(true);
#ifdef Q_OS_MAC
sendCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2));
sendCoinsAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_2));
#else
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_2));
#endif
tabGroup->addAction(sendCoinsAction);
@@ -327,9 +330,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip());
receiveCoinsAction->setCheckable(true);
#ifdef Q_OS_MAC
receiveCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_3));
receiveCoinsAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_3));
#else
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_3));
#endif
tabGroup->addAction(receiveCoinsAction);
@@ -338,9 +341,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
historyAction->setToolTip(historyAction->statusTip());
historyAction->setCheckable(true);
#ifdef Q_OS_MAC
historyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_4));
historyAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_4));
#else
historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
historyAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_4));
#endif
tabGroup->addAction(historyAction);
@@ -349,9 +352,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
privacyAction->setToolTip(privacyAction->statusTip());
privacyAction->setCheckable(true);
#ifdef Q_OS_MAC
privacyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_5));
privacyAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_5));
#else
privacyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
privacyAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_5));
#endif
tabGroup->addAction(privacyAction);
@@ -364,9 +367,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
masternodeAction->setToolTip(masternodeAction->statusTip());
masternodeAction->setCheckable(true);
#ifdef Q_OS_MAC
masternodeAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_6));
masternodeAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_6));
#else
masternodeAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
masternodeAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_6));
#endif
tabGroup->addAction(masternodeAction);
connect(masternodeAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
@@ -378,9 +381,9 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
governanceAction->setToolTip(governanceAction->statusTip());
governanceAction->setCheckable(true);
#ifdef Q_OS_MAC
governanceAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_7));
governanceAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_7));
#else
governanceAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_7));
governanceAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_7));
#endif
tabGroup->addAction(governanceAction);
@@ -401,7 +404,7 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
quitAction->setStatusTip(tr("Quit application"));
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
quitAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q));
quitAction->setMenuRole(QAction::QuitRole);
aboutAction = new QAction(networkStyle->getAppIcon(), tr("&About Agrarian Core"), this);
aboutAction->setStatusTip(tr("Show information about Agrarian Core"));
+1 -2
View File
@@ -72,8 +72,7 @@ static std::string ScriptToString(const CScript& Script, bool Long = false, bool
static std::string TimeToString(uint64_t Time)
{
QDateTime timestamp;
timestamp.setTime_t(Time);
QDateTime timestamp = QDateTime::fromSecsSinceEpoch(Time);
return timestamp.toString("yyyy-MM-dd hh:mm:ss").toUtf8().data();
}
+3 -3
View File
@@ -110,9 +110,9 @@ QDateTime ClientModel::getLastBlockDate() const
{
LOCK(cs_main);
if (chainActive.Tip())
return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime());
return QDateTime::fromSecsSinceEpoch(chainActive.Tip()->GetBlockTime());
else
return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network
return QDateTime::fromSecsSinceEpoch(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network
}
double ClientModel::getVerificationProgress() const
@@ -248,7 +248,7 @@ QString ClientModel::clientName() const
QString ClientModel::formatClientStartupTime() const
{
return QDateTime::fromTime_t(nClientStartupTime).toString();
return QDateTime::fromSecsSinceEpoch(nClientStartupTime).toString();
}
void ClientModel::updateBanlist()
+6 -1
View File
@@ -730,7 +730,12 @@ void CoinControlDialog::updateView()
ui->treeWidget->setEnabled(false); // performance, otherwise updateLabels would be called for every checked checkbox
ui->treeWidget->setAlternatingRowColors(!treeMode);
QFlags<Qt::ItemFlag> flgCheckbox = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable |
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Qt::ItemIsAutoTristate;
#else
Qt::ItemIsTristate;
#endif
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
+18 -9
View File
@@ -48,14 +48,21 @@
#include <QClipboard>
#include <QDateTime>
#include <QDesktopServices>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QDesktopWidget>
#endif
#include <QDir>
#include <QDoubleValidator>
#include <QFileDialog>
#include <QFileInfo>
#include <QFont>
#include <QGuiApplication>
#include <QLineEdit>
#include <QLocale>
#include <QRegularExpression>
#include <QScreen>
#include <QSettings>
#include <QStandardPaths>
#include <QTextDocument> // for Qt::mightBeRichText
#include <QThread>
#include <QUrlQuery>
@@ -82,12 +89,12 @@ namespace GUIUtil
{
QString dateTimeStr(const QDateTime& date)
{
return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm");
return QLocale::system().toString(date.date(), QLocale::ShortFormat) + QString(" ") + date.toString("hh:mm");
}
QString dateTimeStr(qint64 nTime)
{
return dateTimeStr(QDateTime::fromTime_t((qint32)nTime));
return dateTimeStr(QDateTime::fromSecsSinceEpoch((qint32)nTime));
}
QFont bitcoinAddressFont()
@@ -269,10 +276,11 @@ QString getSaveFileName(QWidget* parent, const QString& caption, const QString&
QString result = QDir::toNativeSeparators(QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter));
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
QRegularExpression filter_re(".* \\(\\*\\.([^\\s\\)]+).*\\)");
QString selectedSuffix;
if (filter_re.exactMatch(selectedFilter)) {
selectedSuffix = filter_re.cap(1);
QRegularExpressionMatch filter_match = filter_re.match(selectedFilter);
if (filter_match.hasMatch()) {
selectedSuffix = filter_match.captured(1);
}
/* Add suffix if needed */
@@ -310,10 +318,11 @@ QString getOpenFileName(QWidget* parent, const QString& caption, const QString&
if (selectedSuffixOut) {
/* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */
QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]");
QRegularExpression filter_re(".* \\(\\*\\.([^\\s\\)]+).*\\)");
QString selectedSuffix;
if (filter_re.exactMatch(selectedFilter)) {
selectedSuffix = filter_re.cap(1);
QRegularExpressionMatch filter_match = filter_re.match(selectedFilter);
if (filter_match.hasMatch()) {
selectedSuffix = filter_match.captured(1);
}
*selectedSuffixOut = selectedSuffix;
}
@@ -809,7 +818,7 @@ bool isExternal(QString theme)
if (theme.isEmpty())
return false;
return (theme.operator!=("default"));
return theme != "default";
}
// Open CSS when configured
+1 -1
View File
@@ -120,7 +120,7 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet) : QDialog(paren
if(langStr.contains("_"))
{
/** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */
ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeTerritoryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
}
else
{
+4 -4
View File
@@ -219,12 +219,12 @@ QVariant OptionsModel::data(const QModelIndex& index, int role) const
return settings.value("fUseProxy", false);
case ProxyIP: {
// contains IP at index 0 and port at index 1
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", QString::SkipEmptyParts);
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", Qt::SkipEmptyParts);
return strlIpPort.at(0);
}
case ProxyPort: {
// contains IP at index 0 and port at index 1
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", QString::SkipEmptyParts);
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", Qt::SkipEmptyParts);
return strlIpPort.at(1);
}
@@ -308,7 +308,7 @@ bool OptionsModel::setData(const QModelIndex& index, const QVariant& value, int
break;
case ProxyIP: {
// contains current IP at index 0 and current port at index 1
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", QString::SkipEmptyParts);
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", Qt::SkipEmptyParts);
// if that key doesn't exist or has a changed IP
if (!settings.contains("addrProxy") || strlIpPort.at(0) != value.toString()) {
// construct new value from new IP and current port
@@ -319,7 +319,7 @@ bool OptionsModel::setData(const QModelIndex& index, const QVariant& value, int
} break;
case ProxyPort: {
// contains current IP at index 0 and current port at index 1
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", QString::SkipEmptyParts);
QStringList strlIpPort = settings.value("addrProxy").toString().split(":", Qt::SkipEmptyParts);
// if that key doesn't exist or has a changed port
if (!settings.contains("addrProxy") || strlIpPort.at(1) != value.toString()) {
// construct new value from current IP and new port
+1 -1
View File
@@ -37,6 +37,7 @@
#include <QObject>
#include <QString>
#include <QSslError>
class OptionsModel;
@@ -48,7 +49,6 @@ class QByteArray;
class QLocalServer;
class QNetworkAccessManager;
class QNetworkReply;
class QSslError;
class QUrl;
QT_END_NAMESPACE
+1 -1
View File
@@ -217,7 +217,7 @@ bool RecentRequestEntryLessThan::operator()(RecentRequestEntry& left, RecentRequ
switch (column) {
case RecentRequestsTableModel::Date:
return pLeft->date.toTime_t() < pRight->date.toTime_t();
return pLeft->date.toSecsSinceEpoch() < pRight->date.toSecsSinceEpoch();
case RecentRequestsTableModel::Label:
return pLeft->recipient.label < pRight->recipient.label;
case RecentRequestsTableModel::Address:
+2 -2
View File
@@ -30,7 +30,7 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
unsigned int nDate = date.toTime_t();
unsigned int nDate = date.toSecsSinceEpoch();
READWRITE(this->nVersion);
nVersion = this->nVersion;
@@ -39,7 +39,7 @@ public:
READWRITE(recipient);
if (ser_action.ForRead())
date = QDateTime::fromTime_t(nDate);
date = QDateTime::fromSecsSinceEpoch(nDate);
}
};
+1 -1
View File
@@ -72,7 +72,7 @@ width: 70px;
}
QToolBar > QToolButton {
Alignment: left;
qproperty-alignment: 'AlignLeft';
background-color: #372f44;
selection-background-color:transparent;
border:0.5px solid #888;
+7 -3
View File
@@ -367,7 +367,7 @@ bool RPCConsole::eventFilter(QObject* obj, QEvent* event)
case Qt::Key_PageUp: /* pass paging keys to messages widget */
case Qt::Key_PageDown:
if (obj == ui->lineEdit) {
QApplication::postEvent(ui->messagesWidget, new QKeyEvent(*keyevt));
QApplication::postEvent(ui->messagesWidget, new QKeyEvent(keyevt->type(), keyevt->key(), keyevt->modifiers(), keyevt->text(), keyevt->isAutoRepeat(), keyevt->count()));
return true;
}
break;
@@ -375,7 +375,7 @@ bool RPCConsole::eventFilter(QObject* obj, QEvent* event)
case Qt::Key_Enter:
// forward these events to lineEdit
if(obj == autoCompleter->popup()) {
QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt));
QApplication::postEvent(ui->lineEdit, new QKeyEvent(keyevt->type(), keyevt->key(), keyevt->modifiers(), keyevt->text(), keyevt->isAutoRepeat(), keyevt->count()));
return true;
}
break;
@@ -386,7 +386,7 @@ bool RPCConsole::eventFilter(QObject* obj, QEvent* event)
((mod & Qt::ControlModifier) && key == Qt::Key_V) ||
((mod & Qt::ShiftModifier) && key == Qt::Key_Insert))) {
ui->lineEdit->setFocus();
QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt));
QApplication::postEvent(ui->lineEdit, new QKeyEvent(keyevt->type(), keyevt->key(), keyevt->modifiers(), keyevt->text(), keyevt->isAutoRepeat(), keyevt->count()));
return true;
}
}
@@ -451,7 +451,11 @@ void RPCConsole::setClientModel(ClientModel* model)
connect(banAction24h, SIGNAL(triggered()), signalMapper, SLOT(map()));
connect(banAction7d, SIGNAL(triggered()), signalMapper, SLOT(map()));
connect(banAction365d, SIGNAL(triggered()), signalMapper, SLOT(map()));
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(signalMapper, SIGNAL(mappedInt(int)), this, SLOT(banSelectedNode(int)));
#else
connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(banSelectedNode(int)));
#endif
// peer table context menu signals
connect(ui->peerWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showPeersTableContextMenu(const QPoint&)));
+8
View File
@@ -180,11 +180,19 @@ void SendCoinsDialog::setModel(WalletModel* model)
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateSmartFeeLabel()));
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateGlobalFeeVariables()));
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(coinControlUpdateLabels()));
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(ui->groupFee, SIGNAL(idClicked(int)), this, SLOT(updateFeeSectionControls()));
connect(ui->groupFee, SIGNAL(idClicked(int)), this, SLOT(updateGlobalFeeVariables()));
connect(ui->groupFee, SIGNAL(idClicked(int)), this, SLOT(coinControlUpdateLabels()));
connect(ui->groupCustomFee, SIGNAL(idClicked(int)), this, SLOT(updateGlobalFeeVariables()));
connect(ui->groupCustomFee, SIGNAL(idClicked(int)), this, SLOT(coinControlUpdateLabels()));
#else
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateGlobalFeeVariables()));
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(updateGlobalFeeVariables()));
connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
#endif
connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(updateGlobalFeeVariables()));
connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
+2
View File
@@ -19,7 +19,9 @@
#include <QApplication>
#include <QCloseEvent>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QDesktopWidget>
#endif
#include <QGuiApplication>
#include <QPainter>
#include <QScreen>
+2 -2
View File
@@ -13,9 +13,9 @@
#include <QDateTime>
// Earliest date that can be represented (far in the past)
const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0);
const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromSecsSinceEpoch(0);
// Last date that can be represented (far in the future)
const QDateTime TransactionFilterProxy::MAX_DATE = QDateTime::fromTime_t(0xFFFFFFFF);
const QDateTime TransactionFilterProxy::MAX_DATE = QDateTime::fromSecsSinceEpoch(0xFFFFFFFF);
TransactionFilterProxy::TransactionFilterProxy(QObject* parent) : QSortFilterProxyModel(parent),
dateFrom(MIN_DATE),
+1 -1
View File
@@ -608,7 +608,7 @@ QVariant TransactionTableModel::data(const QModelIndex& index, int role) const
case TypeRole:
return rec->type;
case DateRole:
return QDateTime::fromTime_t(static_cast<uint>(rec->time));
return QDateTime::fromSecsSinceEpoch(static_cast<uint>(rec->time));
case WatchonlyRole:
return rec->involvesWatchAddress;
case WatchonlyDecorationRole:
+5 -1
View File
@@ -175,7 +175,11 @@ TransactionView::TransactionView(QWidget* parent) : QWidget(parent), model(0), t
mapperThirdPartyTxUrls = new QSignalMapper(this);
// Connect actions
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(mapperThirdPartyTxUrls, SIGNAL(mappedString(QString)), this, SLOT(openThirdPartyTxUrl(QString)));
#else
connect(mapperThirdPartyTxUrls, SIGNAL(mapped(QString)), this, SLOT(openThirdPartyTxUrl(QString)));
#endif
connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int)));
connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int)));
@@ -231,7 +235,7 @@ void TransactionView::setModel(WalletModel* model)
if (model->getOptionsModel()) {
// Add third party transaction URLs to context menu
QStringList listUrls = model->getOptionsModel()->getThirdPartyTxUrls().split("|", QString::SkipEmptyParts);
QStringList listUrls = model->getOptionsModel()->getThirdPartyTxUrls().split("|", Qt::SkipEmptyParts);
for (int i = 0; i < listUrls.size(); ++i) {
QString host = QUrl(listUrls[i].trimmed(), QUrl::StrictMode).host();
if (!host.isEmpty()) {
+2 -3
View File
@@ -22,7 +22,7 @@
#include <QCloseEvent>
#include <QLabel>
#include <QRegExp>
#include <QRegularExpression>
#include <QTextTable>
#include <QTextCursor>
#include <QVBoxLayout>
@@ -52,8 +52,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about) : QDialog(pare
QString licenseInfoHTML = licenseInfo;
// Make URLs clickable
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
uri.setMinimal(true); // use non-greedy matching
QRegularExpression uri("<(.*?)>");
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
// Replace newlines with HTML breaks
licenseInfoHTML.replace("\n\n", "<br><br>");
+1 -1
View File
@@ -65,7 +65,7 @@ WalletView::WalletView(QWidget* parent) : QStackedWidget(parent),
QFont fontHeaderLeft;
fontHeaderLeft.setPointSize(20);
fontHeaderLeft.setBold(true);
fontHeaderLeft.setWeight(75);
fontHeaderLeft.setWeight(QFont::Bold);
labelOverviewHeaderLeft->setFont(fontHeaderLeft);
horizontalLayout_Header->addWidget(labelOverviewHeaderLeft);
+6 -1
View File
@@ -59,7 +59,12 @@ void ZPivControlDialog::updateList()
ui->treeWidget->clear();
// add a top level item for each denomination
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsEnabled | Qt::ItemIsUserCheckable |
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Qt::ItemIsAutoTristate;
#else
Qt::ItemIsTristate;
#endif
map<libzerocoin::CoinDenomination, int> mapDenomPosition;
for (auto denom : libzerocoin::zerocoinDenomList) {
CZPivControlWidgetItem* itemDenom(new CZPivControlWidgetItem);
+1 -2
View File
@@ -132,8 +132,7 @@ private:
bool TryEnter(const char* pszName, const char* pszFile, int nLine)
{
EnterCritical(pszName, pszFile, nLine, (void*)(lock.mutex()), true);
lock.try_lock();
if (!lock.owns_lock())
if (!lock.try_lock())
LeaveCritical();
return lock.owns_lock();
}
+1 -1
View File
@@ -1699,7 +1699,7 @@ UniValue backupwallet(const UniValue& params, bool fHelp)
"\nExamples:\n" +
HelpExampleCli("backupwallet", "\"backup.dat\"") + HelpExampleRpc("backupwallet", "\"backup.dat\""));
LOCK2(cs_main, pwalletMain->cs_wallet);
LOCK(pwalletMain->cs_wallet);
string strDest = params[0].get_str();
if (!BackupWallet(*pwalletMain, strDest))