mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge pull request #3477 from 10xcryptodev/pr_remove_qt_todo
Backport qt support minimum to 5.5.1 and associated backports
This commit is contained in:
commit
4b50ee5294
@ -53,8 +53,8 @@ dnl CAUTION: Do not use this inside of a conditional.
|
|||||||
AC_DEFUN([BITCOIN_QT_INIT],[
|
AC_DEFUN([BITCOIN_QT_INIT],[
|
||||||
dnl enable qt support
|
dnl enable qt support
|
||||||
AC_ARG_WITH([gui],
|
AC_ARG_WITH([gui],
|
||||||
[AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
|
[AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@],
|
||||||
[build dash-qt GUI (default=auto, qt5 tried first)])],
|
[build dash-qt GUI (default=auto)])],
|
||||||
[
|
[
|
||||||
bitcoin_qt_want_version=$withval
|
bitcoin_qt_want_version=$withval
|
||||||
if test "x$bitcoin_qt_want_version" = xyes; then
|
if test "x$bitcoin_qt_want_version" = xyes; then
|
||||||
@ -94,18 +94,17 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$use_pkgconfig" = xyes; then
|
if test "x$use_pkgconfig" = xyes; then
|
||||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
|
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG])
|
||||||
else
|
else
|
||||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
|
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl This is ugly and complicated. Yuck. Works as follows:
|
dnl This is ugly and complicated. Yuck. Works as follows:
|
||||||
dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
|
dnl For Qt5, we can check a header to find out whether Qt is build
|
||||||
dnl check a header to find out. When Qt is built statically, some plugins must
|
dnl statically. When Qt is built statically, some plugins must be linked into
|
||||||
dnl be linked into the final binary as well. These plugins have changed between
|
dnl the final binary as well.
|
||||||
dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
|
dnl With Qt5, languages moved into core and the WindowsIntegration plugin was
|
||||||
dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
|
dnl added.
|
||||||
dnl assumed for windows builds.
|
|
||||||
dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
|
dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
|
||||||
dnl results to QT_LIBS.
|
dnl results to QT_LIBS.
|
||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
@ -113,53 +112,22 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
TEMP_CXXFLAGS=$CXXFLAGS
|
TEMP_CXXFLAGS=$CXXFLAGS
|
||||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
||||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
||||||
if test "x$bitcoin_qt_got_major_vers" = x5; then
|
_BITCOIN_QT_IS_STATIC
|
||||||
_BITCOIN_QT_IS_STATIC
|
if test "x$bitcoin_cv_static_qt" = xyes; then
|
||||||
if test "x$bitcoin_cv_static_qt" = xyes; then
|
_BITCOIN_QT_FIND_STATIC_PLUGINS
|
||||||
_BITCOIN_QT_FIND_STATIC_PLUGINS
|
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
||||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
|
||||||
AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[
|
AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#include <QtCore/qconfig.h>
|
|
||||||
#ifndef QT_VERSION
|
|
||||||
# include <QtCore/qglobal.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#if QT_VERSION >= 0x050400
|
|
||||||
choke
|
|
||||||
#endif
|
|
||||||
]])],
|
|
||||||
[bitcoin_cv_need_acc_widget=yes],
|
|
||||||
[bitcoin_cv_need_acc_widget=no])
|
|
||||||
])
|
|
||||||
if test "x$bitcoin_cv_need_acc_widget" = xyes; then
|
|
||||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
|
|
||||||
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$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
|
|
||||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
|
|
||||||
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)])
|
|
||||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
|
|
||||||
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test "x$TARGET_OS" = xwindows; then
|
if test "x$TARGET_OS" = xwindows; then
|
||||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
|
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
|
||||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([
|
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
|
||||||
Q_IMPORT_PLUGIN(qcncodecs)
|
elif test "x$TARGET_OS" = xlinux; then
|
||||||
Q_IMPORT_PLUGIN(qjpcodecs)
|
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
|
||||||
Q_IMPORT_PLUGIN(qtwcodecs)
|
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
|
||||||
Q_IMPORT_PLUGIN(qkrcodecs)
|
elif test "x$TARGET_OS" = xdarwin; then
|
||||||
Q_IMPORT_PLUGIN(AccessibleFactory)],
|
AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
|
||||||
[-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
|
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
|
||||||
|
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
CPPFLAGS=$TEMP_CPPFLAGS
|
CPPFLAGS=$TEMP_CPPFLAGS
|
||||||
@ -167,9 +135,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
])
|
])
|
||||||
|
|
||||||
if test "x$use_pkgconfig$qt_bin_path" = xyes; then
|
if test "x$use_pkgconfig$qt_bin_path" = xyes; then
|
||||||
if test "x$bitcoin_qt_got_major_vers" = x5; then
|
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
|
||||||
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$use_hardening" != xno; then
|
if test "x$use_hardening" != xno; then
|
||||||
@ -219,11 +185,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
|
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path)
|
||||||
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
|
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path)
|
||||||
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
|
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path)
|
||||||
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
|
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path)
|
||||||
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
|
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes)
|
||||||
|
|
||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
AC_CACHE_CHECK([whether $RCC accepts --format-version option],
|
AC_CACHE_CHECK([whether $RCC accepts --format-version option],
|
||||||
@ -277,7 +243,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
],[
|
],[
|
||||||
bitcoin_enable_qt=no
|
bitcoin_enable_qt=no
|
||||||
])
|
])
|
||||||
AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
|
AC_MSG_RESULT([$bitcoin_enable_qt (Qt5)])
|
||||||
|
|
||||||
AC_SUBST(QT_PIE_FLAGS)
|
AC_SUBST(QT_PIE_FLAGS)
|
||||||
AC_SUBST(QT_INCLUDES)
|
AC_SUBST(QT_INCLUDES)
|
||||||
@ -287,7 +253,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
AC_SUBST(QT_DBUS_LIBS)
|
AC_SUBST(QT_DBUS_LIBS)
|
||||||
AC_SUBST(QT_TEST_INCLUDES)
|
AC_SUBST(QT_TEST_INCLUDES)
|
||||||
AC_SUBST(QT_TEST_LIBS)
|
AC_SUBST(QT_TEST_LIBS)
|
||||||
AC_SUBST(QT_SELECT, qt${bitcoin_qt_got_major_vers})
|
AC_SUBST(QT_SELECT, qt5)
|
||||||
AC_SUBST(MOC_DEFS)
|
AC_SUBST(MOC_DEFS)
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -295,7 +261,7 @@ dnl All macros below are internal and should _not_ be used from the main
|
|||||||
dnl configure.ac.
|
dnl configure.ac.
|
||||||
dnl ----
|
dnl ----
|
||||||
|
|
||||||
dnl Internal. Check if the included version of Qt is Qt5.
|
dnl Internal. Check included version of Qt against minimum specified in doc/dependencies.md
|
||||||
dnl Requires: INCLUDES must be populated as necessary.
|
dnl Requires: INCLUDES must be populated as necessary.
|
||||||
dnl Output: bitcoin_cv_qt5=yes|no
|
dnl Output: bitcoin_cv_qt5=yes|no
|
||||||
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
||||||
@ -307,7 +273,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
|||||||
#endif
|
#endif
|
||||||
]],
|
]],
|
||||||
[[
|
[[
|
||||||
#if QT_VERSION < 0x050000
|
#if QT_VERSION < 0x050501
|
||||||
choke
|
choke
|
||||||
#endif
|
#endif
|
||||||
]])],
|
]])],
|
||||||
@ -316,7 +282,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
|||||||
])])
|
])])
|
||||||
|
|
||||||
dnl Internal. Check if the linked version of Qt was built as static libs.
|
dnl Internal. Check if the linked version of Qt was built as static libs.
|
||||||
dnl Requires: Qt5. This check cannot determine if Qt4 is static.
|
dnl Requires: Qt5.
|
||||||
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
||||||
dnl Output: bitcoin_cv_static_qt=yes|no
|
dnl Output: bitcoin_cv_static_qt=yes|no
|
||||||
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
|
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
|
||||||
@ -361,58 +327,48 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
|
|||||||
])
|
])
|
||||||
|
|
||||||
dnl Internal. Find paths necessary for linking qt static plugins
|
dnl Internal. Find paths necessary for linking qt static plugins
|
||||||
dnl Inputs: bitcoin_qt_got_major_vers. 4 or 5.
|
|
||||||
dnl Inputs: qt_plugin_path. optional.
|
dnl Inputs: qt_plugin_path. optional.
|
||||||
dnl Outputs: QT_LIBS is appended
|
dnl Outputs: QT_LIBS is appended
|
||||||
AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
|
AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
|
||||||
if test "x$bitcoin_qt_got_major_vers" = x5; then
|
if test "x$qt_plugin_path" != x; then
|
||||||
if test "x$qt_plugin_path" != x; then
|
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
|
||||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
|
if test -d "$qt_plugin_path/accessible"; then
|
||||||
if test -d "$qt_plugin_path/accessible"; then
|
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
||||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if test "x$use_pkgconfig" = xyes; then
|
fi
|
||||||
: dnl
|
if test "x$use_pkgconfig" = xyes; then
|
||||||
m4_ifdef([PKG_CHECK_MODULES],[
|
: dnl
|
||||||
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
|
m4_ifdef([PKG_CHECK_MODULES],[
|
||||||
if test "x$TARGET_OS" = xlinux; then
|
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
|
||||||
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
|
if test "x$TARGET_OS" = xlinux; then
|
||||||
if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
|
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
|
||||||
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
|
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
|
||||||
fi
|
elif test "x$TARGET_OS" = xdarwin; then
|
||||||
elif test "x$TARGET_OS" = xdarwin; then
|
PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
|
||||||
PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
|
fi
|
||||||
fi
|
])
|
||||||
])
|
else
|
||||||
else
|
if test "x$TARGET_OS" = xwindows; then
|
||||||
if test "x$TARGET_OS" = xwindows; then
|
AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[
|
||||||
AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
#include <QtCore/qconfig.h>
|
||||||
#include <QtCore/qconfig.h>
|
#ifndef QT_VERSION
|
||||||
#ifndef QT_VERSION
|
# include <QtCore/qglobal.h>
|
||||||
# include <QtCore/qglobal.h>
|
#endif
|
||||||
#endif
|
]],
|
||||||
]],
|
[[
|
||||||
[[
|
#if QT_VERSION < 0x050600
|
||||||
#if QT_VERSION < 0x050600
|
choke
|
||||||
choke
|
#endif
|
||||||
#endif
|
]])],
|
||||||
]])],
|
[bitcoin_cv_need_platformsupport=yes],
|
||||||
[bitcoin_cv_need_platformsupport=yes],
|
[bitcoin_cv_need_platformsupport=no])
|
||||||
[bitcoin_cv_need_platformsupport=no])
|
])
|
||||||
])
|
if test "x$bitcoin_cv_need_platformsupport" = xyes; then
|
||||||
if test "x$bitcoin_cv_need_platformsupport" = xyes; then
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}PlatformSupport not found)))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}PlatformSupport not found)))
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
fi
|
||||||
if test "x$qt_plugin_path" != x; then
|
|
||||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
|
|
||||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Internal. Find Qt libraries using pkg-config.
|
dnl Internal. Find Qt libraries using pkg-config.
|
||||||
@ -421,38 +377,14 @@ dnl first.
|
|||||||
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
|
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
|
||||||
dnl first.
|
dnl first.
|
||||||
dnl Outputs: All necessary QT_* variables are set.
|
dnl Outputs: All necessary QT_* variables are set.
|
||||||
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
|
||||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
|
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
|
||||||
m4_ifdef([PKG_CHECK_MODULES],[
|
m4_ifdef([PKG_CHECK_MODULES],[
|
||||||
auto_priority_version=$1
|
QT_LIB_PREFIX=Qt5
|
||||||
if test "x$auto_priority_version" = x; then
|
|
||||||
auto_priority_version=qt5
|
|
||||||
fi
|
|
||||||
if test "x$bitcoin_qt_want_version" = xqt5 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt5 ); then
|
|
||||||
QT_LIB_PREFIX=Qt5
|
|
||||||
bitcoin_qt_got_major_vers=5
|
|
||||||
else
|
|
||||||
QT_LIB_PREFIX=Qt
|
|
||||||
bitcoin_qt_got_major_vers=4
|
|
||||||
fi
|
|
||||||
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
|
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
|
||||||
qt4_modules="QtCore QtGui QtNetwork"
|
|
||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
if test "x$bitcoin_qt_want_version" = xqt5 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt5 ); then
|
PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
|
||||||
PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
|
|
||||||
elif test "x$bitcoin_qt_want_version" = xqt4 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt4 ); then
|
|
||||||
PKG_CHECK_MODULES([QT4], [$qt4_modules], [QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes], [have_qt=no])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
|
|
||||||
if test "x$have_qt" = xno && test "x$bitcoin_qt_want_version" = xauto; then
|
|
||||||
if test "x$auto_priority_version" = xqt5; then
|
|
||||||
PKG_CHECK_MODULES([QT4], [$qt4_modules], [QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
|
|
||||||
else
|
|
||||||
PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" ; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5], [have_qt=no])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "x$have_qt" != xyes; then
|
if test "x$have_qt" != xyes; then
|
||||||
have_qt=no
|
have_qt=no
|
||||||
BITCOIN_QT_FAIL([Qt dependencies not found])
|
BITCOIN_QT_FAIL([Qt dependencies not found])
|
||||||
@ -473,7 +405,6 @@ dnl from the discovered headers.
|
|||||||
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
|
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
|
||||||
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
|
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
|
||||||
dnl Outputs: All necessary QT_* variables are set.
|
dnl Outputs: All necessary QT_* variables are set.
|
||||||
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
|
|
||||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
||||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||||
@ -495,13 +426,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
|||||||
if test "x$bitcoin_qt_want_version" = xauto; then
|
if test "x$bitcoin_qt_want_version" = xauto; then
|
||||||
_BITCOIN_QT_CHECK_QT5
|
_BITCOIN_QT_CHECK_QT5
|
||||||
fi
|
fi
|
||||||
if test "x$bitcoin_cv_qt5" = xyes || test "x$bitcoin_qt_want_version" = xqt5; then
|
QT_LIB_PREFIX=Qt5
|
||||||
QT_LIB_PREFIX=Qt5
|
|
||||||
bitcoin_qt_got_major_vers=5
|
|
||||||
else
|
|
||||||
QT_LIB_PREFIX=Qt
|
|
||||||
bitcoin_qt_got_major_vers=4
|
|
||||||
fi
|
|
||||||
])
|
])
|
||||||
|
|
||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
@ -523,9 +448,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
|||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Core not found)))
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Core not found)))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Gui not found)))
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Gui not found)))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Network not found)))
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Network not found)))
|
||||||
if test "x$bitcoin_qt_got_major_vers" = x5; then
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Widgets not found)))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Widgets not found)))
|
|
||||||
fi
|
|
||||||
QT_LIBS="$LIBS"
|
QT_LIBS="$LIBS"
|
||||||
LIBS="$TEMP_LIBS"
|
LIBS="$TEMP_LIBS"
|
||||||
|
|
||||||
@ -551,4 +474,3 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
|||||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||||
LIBS="$TEMP_LIBS"
|
LIBS="$TEMP_LIBS"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -856,7 +856,7 @@ fi
|
|||||||
BITCOIN_QT_INIT
|
BITCOIN_QT_INIT
|
||||||
|
|
||||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt5])
|
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
|
||||||
|
|
||||||
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
|
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
|
||||||
use_boost=no
|
use_boost=no
|
||||||
@ -1447,7 +1447,6 @@ echo "Options used to compile and link:"
|
|||||||
echo " with wallet = $enable_wallet"
|
echo " with wallet = $enable_wallet"
|
||||||
echo " with gui / qt = $bitcoin_enable_qt"
|
echo " with gui / qt = $bitcoin_enable_qt"
|
||||||
if test x$bitcoin_enable_qt != xno; then
|
if test x$bitcoin_enable_qt != xno; then
|
||||||
echo " qt version = $bitcoin_qt_got_major_vers"
|
|
||||||
echo " with qr = $use_qr"
|
echo " with qr = $use_qr"
|
||||||
fi
|
fi
|
||||||
echo " with zmq = $use_zmq"
|
echo " with zmq = $use_zmq"
|
||||||
|
@ -141,13 +141,8 @@ void AddressBookPage::setModel(AddressTableModel *_model)
|
|||||||
ui->tableView->sortByColumn(0, Qt::AscendingOrder);
|
ui->tableView->sortByColumn(0, Qt::AscendingOrder);
|
||||||
|
|
||||||
// Set column widths
|
// Set column widths
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
|
|
||||||
ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
|
|
||||||
#else
|
|
||||||
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
|
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
|
||||||
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
|
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
|
||||||
#endif
|
|
||||||
|
|
||||||
connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||||
this, SLOT(selectionChanged()));
|
this, SLOT(selectionChanged()));
|
||||||
|
@ -52,9 +52,7 @@ public:
|
|||||||
g_connman->GetBanned(banMap);
|
g_connman->GetBanned(banMap);
|
||||||
|
|
||||||
cachedBanlist.clear();
|
cachedBanlist.clear();
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
cachedBanlist.reserve(banMap.size());
|
cachedBanlist.reserve(banMap.size());
|
||||||
#endif
|
|
||||||
for (const auto& entry : banMap)
|
for (const auto& entry : banMap)
|
||||||
{
|
{
|
||||||
CCombinedBan banEntry;
|
CCombinedBan banEntry;
|
||||||
|
@ -55,14 +55,8 @@
|
|||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QToolBar>
|
#include <QToolBar>
|
||||||
#include <QVBoxLayout>
|
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
#include <QTextDocument>
|
|
||||||
#include <QUrl>
|
|
||||||
#else
|
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#endif
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
|
const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
@ -154,12 +148,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
|
|||||||
setWindowIcon(networkStyle->getTrayAndWindowIcon());
|
setWindowIcon(networkStyle->getTrayAndWindowIcon());
|
||||||
setWindowTitle(windowTitle);
|
setWindowTitle(windowTitle);
|
||||||
|
|
||||||
#if defined(Q_OS_MAC) && QT_VERSION < 0x050000
|
|
||||||
// This property is not implemented in Qt 5. Setting it has no effect.
|
|
||||||
// A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras.
|
|
||||||
setUnifiedTitleAndToolBarOnMac(true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rpcConsole = new RPCConsole(_platformStyle, 0);
|
rpcConsole = new RPCConsole(_platformStyle, 0);
|
||||||
helpMessageDialog = new HelpMessageDialog(this, HelpMessageDialog::cmdline);
|
helpMessageDialog = new HelpMessageDialog(this, HelpMessageDialog::cmdline);
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
@ -234,7 +222,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
|
|||||||
|
|
||||||
// Override style sheet for progress bar for styles that have a segmented progress bar,
|
// Override style sheet for progress bar for styles that have a segmented progress bar,
|
||||||
// as they make the text unreadable (workaround for issue #1071)
|
// as they make the text unreadable (workaround for issue #1071)
|
||||||
// See https://qt-project.org/doc/qt-4.8/gallery.html
|
// See https://doc.qt.io/qt-5/gallery.html
|
||||||
QString curStyle = QApplication::style()->metaObject()->className();
|
QString curStyle = QApplication::style()->metaObject()->className();
|
||||||
if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
|
if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
|
||||||
{
|
{
|
||||||
|
@ -114,11 +114,7 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidge
|
|||||||
connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(viewItemChanged(QTreeWidgetItem*, int)));
|
connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(viewItemChanged(QTreeWidgetItem*, int)));
|
||||||
|
|
||||||
// click on header
|
// click on header
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
ui->treeWidget->header()->setClickable(true);
|
|
||||||
#else
|
|
||||||
ui->treeWidget->header()->setSectionsClickable(true);
|
ui->treeWidget->header()->setSectionsClickable(true);
|
||||||
#endif
|
|
||||||
connect(ui->treeWidget->header(), SIGNAL(sectionClicked(int)), this, SLOT(headerSectionClicked(int)));
|
connect(ui->treeWidget->header(), SIGNAL(sectionClicked(int)), this, SLOT(headerSectionClicked(int)));
|
||||||
|
|
||||||
// ok button
|
// ok button
|
||||||
@ -130,10 +126,6 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidge
|
|||||||
// Toggle lock state
|
// Toggle lock state
|
||||||
connect(ui->pushButtonToggleLock, SIGNAL(clicked()), this, SLOT(buttonToggleLockClicked()));
|
connect(ui->pushButtonToggleLock, SIGNAL(clicked()), this, SLOT(buttonToggleLockClicked()));
|
||||||
|
|
||||||
// change coin control first column label due Qt4 bug.
|
|
||||||
// see https://github.com/bitcoin/bitcoin/issues/5716
|
|
||||||
ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString());
|
|
||||||
|
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84);
|
ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
|
ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);
|
ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);
|
||||||
@ -433,16 +425,6 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
|
|||||||
if (ui->treeWidget->isEnabled()) // do not update on every click for (un)select all
|
if (ui->treeWidget->isEnabled()) // do not update on every click for (un)select all
|
||||||
CoinControlDialog::updateLabels(model, this);
|
CoinControlDialog::updateLabels(model, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.
|
|
||||||
// Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
|
|
||||||
{
|
|
||||||
if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked)
|
|
||||||
item->setCheckState(COLUMN_CHECKBOX, Qt::Checked);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// shows count of locked unspent outputs
|
// shows count of locked unspent outputs
|
||||||
|
@ -58,16 +58,6 @@
|
|||||||
|
|
||||||
#if defined(QT_STATICPLUGIN)
|
#if defined(QT_STATICPLUGIN)
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
Q_IMPORT_PLUGIN(qcncodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qjpcodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qtwcodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qkrcodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qtaccessiblewidgets)
|
|
||||||
#else
|
|
||||||
#if QT_VERSION < 0x050400
|
|
||||||
Q_IMPORT_PLUGIN(AccessibleFactory)
|
|
||||||
#endif
|
|
||||||
#if defined(QT_QPA_PLATFORM_XCB)
|
#if defined(QT_QPA_PLATFORM_XCB)
|
||||||
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
|
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
|
||||||
#elif defined(QT_QPA_PLATFORM_WINDOWS)
|
#elif defined(QT_QPA_PLATFORM_WINDOWS)
|
||||||
@ -76,11 +66,6 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
|
|||||||
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
#include <QTextCodec>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Declare meta types used for QMetaObject::invokeMethod
|
// Declare meta types used for QMetaObject::invokeMethod
|
||||||
Q_DECLARE_METATYPE(bool*)
|
Q_DECLARE_METATYPE(bool*)
|
||||||
@ -153,16 +138,6 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* qDebug() message handler --> debug.log */
|
/* qDebug() message handler --> debug.log */
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
void DebugMessageHandler(QtMsgType type, const char *msg)
|
|
||||||
{
|
|
||||||
if (type == QtDebugMsg) {
|
|
||||||
LogPrint(BCLog::QT, "GUI: %s\n", msg);
|
|
||||||
} else {
|
|
||||||
LogPrintf("GUI: %s\n", msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
|
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
|
||||||
{
|
{
|
||||||
Q_UNUSED(context);
|
Q_UNUSED(context);
|
||||||
@ -172,7 +147,6 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons
|
|||||||
LogPrintf("GUI: %s\n", msg.toStdString());
|
LogPrintf("GUI: %s\n", msg.toStdString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Class encapsulating Dash Core startup and shutdown.
|
/** Class encapsulating Dash Core startup and shutdown.
|
||||||
* Allows running startup and shutdown in a different thread from the UI thread.
|
* Allows running startup and shutdown in a different thread from the UI thread.
|
||||||
@ -589,19 +563,11 @@ int main(int argc, char *argv[])
|
|||||||
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
|
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
|
||||||
|
|
||||||
/// 2. Basic Qt initialization (not dependent on parameters or configuration)
|
/// 2. Basic Qt initialization (not dependent on parameters or configuration)
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
// Internal string conversion is all UTF-8
|
|
||||||
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
|
|
||||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Q_INIT_RESOURCE(dash);
|
Q_INIT_RESOURCE(dash);
|
||||||
Q_INIT_RESOURCE(dash_locale);
|
Q_INIT_RESOURCE(dash_locale);
|
||||||
|
|
||||||
#if QT_VERSION > 0x050100
|
|
||||||
// Generate high-dpi pixmaps
|
// Generate high-dpi pixmaps
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
|
||||||
#if QT_VERSION >= 0x050600
|
#if QT_VERSION >= 0x050600
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
#endif
|
#endif
|
||||||
@ -712,17 +678,12 @@ int main(int argc, char *argv[])
|
|||||||
/// 9. Main GUI initialization
|
/// 9. Main GUI initialization
|
||||||
// Install global event filter that makes sure that long tooltips can be word-wrapped
|
// Install global event filter that makes sure that long tooltips can be word-wrapped
|
||||||
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
|
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
// Install qDebug() message handler to route to debug.log
|
|
||||||
qInstallMsgHandler(DebugMessageHandler);
|
|
||||||
#else
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
// Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
|
// Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
|
||||||
qApp->installNativeEventFilter(new WinShutdownMonitor());
|
qApp->installNativeEventFilter(new WinShutdownMonitor());
|
||||||
#endif
|
#endif
|
||||||
// Install qDebug() message handler to route to debug.log
|
// Install qDebug() message handler to route to debug.log
|
||||||
qInstallMessageHandler(DebugMessageHandler);
|
qInstallMessageHandler(DebugMessageHandler);
|
||||||
#endif
|
|
||||||
// Allow parameter interaction before we create the options model
|
// Allow parameter interaction before we create the options model
|
||||||
app.parameterSetup();
|
app.parameterSetup();
|
||||||
// Load GUI settings from QSettings
|
// Load GUI settings from QSettings
|
||||||
@ -743,7 +704,7 @@ int main(int argc, char *argv[])
|
|||||||
// so the GUI thread won't be held up.
|
// so the GUI thread won't be held up.
|
||||||
if (BitcoinCore::baseInitialize()) {
|
if (BitcoinCore::baseInitialize()) {
|
||||||
app.requestInitialize();
|
app.requestInitialize();
|
||||||
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
|
#if defined(Q_OS_WIN)
|
||||||
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId());
|
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId());
|
||||||
#endif
|
#endif
|
||||||
app.exec();
|
app.exec();
|
||||||
|
@ -47,21 +47,14 @@
|
|||||||
#include <QDoubleValidator>
|
#include <QDoubleValidator>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
|
#include <QFontDatabase>
|
||||||
|
#include <QKeyEvent>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTextDocument> // for Qt::mightBeRichText
|
#include <QTextDocument> // for Qt::mightBeRichText
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QMouseEvent>
|
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
#include <QUrl>
|
|
||||||
#else
|
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#endif
|
#include <QMouseEvent>
|
||||||
|
|
||||||
#if QT_VERSION >= 0x50200
|
|
||||||
#include <QFontDatabase>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static fs::detail::utf8_codecvt_facet utf8;
|
static fs::detail::utf8_codecvt_facet utf8;
|
||||||
|
|
||||||
@ -156,17 +149,7 @@ QString dateTimeStr(qint64 nTime)
|
|||||||
|
|
||||||
QFont fixedPitchFont()
|
QFont fixedPitchFont()
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= 0x50200
|
|
||||||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||||
#else
|
|
||||||
QFont font("Monospace");
|
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
font.setStyleHint(QFont::Monospace);
|
|
||||||
#else
|
|
||||||
font.setStyleHint(QFont::TypeWriter);
|
|
||||||
#endif
|
|
||||||
return font;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Just some dummy data to generate an convincing random-looking (but consistent) address
|
// Just some dummy data to generate an convincing random-looking (but consistent) address
|
||||||
@ -192,12 +175,10 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent, bool fAllow
|
|||||||
parent->setFocusProxy(widget);
|
parent->setFocusProxy(widget);
|
||||||
|
|
||||||
widget->setFont(fixedPitchFont());
|
widget->setFont(fixedPitchFont());
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
// We don't want translators to use own addresses in translations
|
// We don't want translators to use own addresses in translations
|
||||||
// and this is the only place, where this address is supplied.
|
// and this is the only place, where this address is supplied.
|
||||||
widget->setPlaceholderText(QObject::tr("Enter a Dash address (e.g. %1)").arg(
|
widget->setPlaceholderText(QObject::tr("Enter a Dash address (e.g. %1)").arg(
|
||||||
QString::fromStdString(DummyAddress(Params()))));
|
QString::fromStdString(DummyAddress(Params()))));
|
||||||
#endif
|
|
||||||
widget->setValidator(new BitcoinAddressEntryValidator(parent, fAllowURI));
|
widget->setValidator(new BitcoinAddressEntryValidator(parent, fAllowURI));
|
||||||
widget->setCheckValidator(new BitcoinAddressCheckValidator(parent));
|
widget->setCheckValidator(new BitcoinAddressCheckValidator(parent));
|
||||||
}
|
}
|
||||||
@ -225,12 +206,8 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
|
|||||||
}
|
}
|
||||||
rv.amount = 0;
|
rv.amount = 0;
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
QList<QPair<QString, QString> > items = uri.queryItems();
|
|
||||||
#else
|
|
||||||
QUrlQuery uriQuery(uri);
|
QUrlQuery uriQuery(uri);
|
||||||
QList<QPair<QString, QString> > items = uriQuery.queryItems();
|
QList<QPair<QString, QString> > items = uriQuery.queryItems();
|
||||||
#endif
|
|
||||||
|
|
||||||
for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
|
for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
|
||||||
{
|
{
|
||||||
@ -336,11 +313,7 @@ bool isDust(const QString& address, const CAmount& amount)
|
|||||||
|
|
||||||
QString HtmlEscape(const QString& str, bool fMultiLine)
|
QString HtmlEscape(const QString& str, bool fMultiLine)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
QString escaped = Qt::escape(str);
|
|
||||||
#else
|
|
||||||
QString escaped = str.toHtmlEscaped();
|
QString escaped = str.toHtmlEscaped();
|
||||||
#endif
|
|
||||||
escaped = escaped.replace(" ", " ");
|
escaped = escaped.replace(" ", " ");
|
||||||
if(fMultiLine)
|
if(fMultiLine)
|
||||||
{
|
{
|
||||||
@ -382,11 +355,7 @@ QString getSaveFileName(QWidget *parent, const QString &caption, const QString &
|
|||||||
QString myDir;
|
QString myDir;
|
||||||
if(dir.isEmpty()) // Default to user documents location
|
if(dir.isEmpty()) // Default to user documents location
|
||||||
{
|
{
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
|
|
||||||
#else
|
|
||||||
myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -432,11 +401,7 @@ QString getOpenFileName(QWidget *parent, const QString &caption, const QString &
|
|||||||
QString myDir;
|
QString myDir;
|
||||||
if(dir.isEmpty()) // Default to user documents location
|
if(dir.isEmpty()) // Default to user documents location
|
||||||
{
|
{
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
|
|
||||||
#else
|
|
||||||
myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -613,11 +578,7 @@ void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals()
|
|||||||
// Refactored here for readability.
|
// Refactored here for readability.
|
||||||
void TableViewLastColumnResizingFixer::setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode)
|
void TableViewLastColumnResizingFixer::setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
tableView->horizontalHeader()->setResizeMode(logicalIndex, resizeMode);
|
|
||||||
#else
|
|
||||||
tableView->horizontalHeader()->setSectionResizeMode(logicalIndex, resizeMode);
|
tableView->horizontalHeader()->setSectionResizeMode(logicalIndex, resizeMode);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TableViewLastColumnResizingFixer::resizeColumn(int nColumnIndex, int width)
|
void TableViewLastColumnResizingFixer::resizeColumn(int nColumnIndex, int width)
|
||||||
|
@ -286,7 +286,7 @@ namespace GUIUtil
|
|||||||
void mouseReleaseEvent(QMouseEvent *event);
|
void mouseReleaseEvent(QMouseEvent *event);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(Q_OS_MAC) && QT_VERSION >= 0x050000
|
#if defined(Q_OS_MAC)
|
||||||
// workaround for Qt OSX Bug:
|
// workaround for Qt OSX Bug:
|
||||||
// https://bugreports.qt-project.org/browse/QTBUG-15631
|
// https://bugreports.qt-project.org/browse/QTBUG-15631
|
||||||
// QProgressBar uses around 10% CPU even when app is in background
|
// QProgressBar uses around 10% CPU even when app is in background
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
#include <objc/runtime.h>
|
#include <objc/runtime.h>
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
extern void qt_mac_set_dock_menu(QMenu *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static MacDockIconHandler *s_instance = nullptr;
|
static MacDockIconHandler *s_instance = nullptr;
|
||||||
|
|
||||||
bool dockClickHandler(id self, SEL _cmd, ...) {
|
bool dockClickHandler(id self, SEL _cmd, ...) {
|
||||||
|
@ -85,13 +85,8 @@ NetworkStyle::NetworkStyle(const QString &_appName, const int iconColorHueShift,
|
|||||||
rotateColors(splashImageImg, iconColorHueShift, iconColorSaturationReduction);
|
rotateColors(splashImageImg, iconColorHueShift, iconColorSaturationReduction);
|
||||||
|
|
||||||
//convert back to QPixmap
|
//convert back to QPixmap
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
appIconPixmap.convertFromImage(appIconImg);
|
appIconPixmap.convertFromImage(appIconImg);
|
||||||
splashImagePixmap.convertFromImage(splashImageImg);
|
splashImagePixmap.convertFromImage(splashImageImg);
|
||||||
#else
|
|
||||||
appIconPixmap = QPixmap::fromImage(appIconImg);
|
|
||||||
splashImagePixmap = QPixmap::fromImage(splashImageImg);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
appIcon = QIcon(appIconPixmap);
|
appIcon = QIcon(appIconPixmap);
|
||||||
|
@ -16,9 +16,7 @@ OpenURIDialog::OpenURIDialog(QWidget *parent) :
|
|||||||
ui(new Ui::OpenURIDialog)
|
ui(new Ui::OpenURIDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
ui->uriEdit->setPlaceholderText("dash:");
|
ui->uriEdit->setPlaceholderText("dash:");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenURIDialog::~OpenURIDialog()
|
OpenURIDialog::~OpenURIDialog()
|
||||||
|
@ -104,28 +104,16 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
|
|||||||
/** check if the locale name consists of 2 parts (language_country) */
|
/** check if the locale name consists of 2 parts (language_country) */
|
||||||
if(langStr.contains("_"))
|
if(langStr.contains("_"))
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
/** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */
|
/** 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.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
|
||||||
#else
|
|
||||||
/** display language strings as "language - country (locale name)", e.g. "German - Germany (de)" */
|
|
||||||
ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" - ") + QLocale::countryToString(locale.country()) + QString(" (") + langStr + QString(")"), QVariant(langStr));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
/** display language strings as "native language (locale name)", e.g. "Deutsch (de)" */
|
/** display language strings as "native language (locale name)", e.g. "Deutsch (de)" */
|
||||||
ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
|
ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
|
||||||
#else
|
|
||||||
/** display language strings as "language (locale name)", e.g. "German (de)" */
|
|
||||||
ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" (") + langStr + QString(")"), QVariant(langStr));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
ui->thirdPartyTxUrls->setPlaceholderText("https://example.com/tx/%s");
|
ui->thirdPartyTxUrls->setPlaceholderText("https://example.com/tx/%s");
|
||||||
#endif
|
|
||||||
|
|
||||||
ui->unit->setModel(new BitcoinUnits(this));
|
ui->unit->setModel(new BitcoinUnits(this));
|
||||||
|
|
||||||
|
@ -97,12 +97,10 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
|
|||||||
qWarning() << "PaymentRequestPlus::getMerchant: Payment request: certificate expired or not yet active: " << qCert;
|
qWarning() << "PaymentRequestPlus::getMerchant: Payment request: certificate expired or not yet active: " << qCert;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
if (qCert.isBlacklisted()) {
|
if (qCert.isBlacklisted()) {
|
||||||
qWarning() << "PaymentRequestPlus::getMerchant: Payment request: certificate blacklisted: " << qCert;
|
qWarning() << "PaymentRequestPlus::getMerchant: Payment request: certificate blacklisted: " << qCert;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
const unsigned char *data = (const unsigned char *)certChain.certificate(i).data();
|
const unsigned char *data = (const unsigned char *)certChain.certificate(i).data();
|
||||||
X509 *cert = d2i_X509(nullptr, &data, certChain.certificate(i).size());
|
X509 *cert = d2i_X509(nullptr, &data, certChain.certificate(i).size());
|
||||||
if (cert)
|
if (cert)
|
||||||
|
@ -41,12 +41,7 @@
|
|||||||
#include <QSslSocket>
|
#include <QSslSocket>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
#include <QUrl>
|
|
||||||
#else
|
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#endif
|
|
||||||
|
|
||||||
const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
|
const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
|
||||||
const QString BITCOIN_IPC_PREFIX("dash:");
|
const QString BITCOIN_IPC_PREFIX("dash:");
|
||||||
@ -100,11 +95,7 @@ static QList<QString> savedPaymentRequests;
|
|||||||
|
|
||||||
static void ReportInvalidCertificate(const QSslCertificate& cert)
|
static void ReportInvalidCertificate(const QSslCertificate& cert)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
qDebug() << QString("%1: Payment server found an invalid certificate: ").arg(__func__) << cert.serialNumber() << cert.subjectInfo(QSslCertificate::CommonName) << cert.subjectInfo(QSslCertificate::OrganizationalUnitName);
|
|
||||||
#else
|
|
||||||
qDebug() << QString("%1: Payment server found an invalid certificate: ").arg(__func__) << cert.serialNumber() << cert.subjectInfo(QSslCertificate::CommonName) << cert.subjectInfo(QSslCertificate::DistinguishedNameQualifier) << cert.subjectInfo(QSslCertificate::OrganizationalUnitName);
|
qDebug() << QString("%1: Payment server found an invalid certificate: ").arg(__func__) << cert.serialNumber() << cert.subjectInfo(QSslCertificate::CommonName) << cert.subjectInfo(QSslCertificate::DistinguishedNameQualifier) << cert.subjectInfo(QSslCertificate::OrganizationalUnitName);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -157,13 +148,11 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
// Blacklisted certificate
|
// Blacklisted certificate
|
||||||
if (cert.isBlacklisted()) {
|
if (cert.isBlacklisted()) {
|
||||||
ReportInvalidCertificate(cert);
|
ReportInvalidCertificate(cert);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
QByteArray certData = cert.toDer();
|
QByteArray certData = cert.toDer();
|
||||||
const unsigned char *data = (const unsigned char *)certData.data();
|
const unsigned char *data = (const unsigned char *)certData.data();
|
||||||
|
|
||||||
@ -408,11 +397,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
|
|||||||
|
|
||||||
if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dash: URI
|
if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dash: URI
|
||||||
{
|
{
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
QUrl uri(s);
|
|
||||||
#else
|
|
||||||
QUrlQuery uri((QUrl(s)));
|
QUrlQuery uri((QUrl(s)));
|
||||||
#endif
|
|
||||||
if (uri.hasQueryItem("r")) // payment request URI
|
if (uri.hasQueryItem("r")) // payment request URI
|
||||||
{
|
{
|
||||||
QByteArray temp;
|
QByteArray temp;
|
||||||
|
@ -63,9 +63,7 @@ public:
|
|||||||
std::vector<CNodeStats> vstats;
|
std::vector<CNodeStats> vstats;
|
||||||
if(g_connman)
|
if(g_connman)
|
||||||
g_connman->GetNodeStats(vstats);
|
g_connman->GetNodeStats(vstats);
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
cachedNodeStats.reserve(vstats.size());
|
cachedNodeStats.reserve(vstats.size());
|
||||||
#endif
|
|
||||||
for (const CNodeStats& nodestats : vstats)
|
for (const CNodeStats& nodestats : vstats)
|
||||||
{
|
{
|
||||||
CNodeCombinedStats stats;
|
CNodeCombinedStats stats;
|
||||||
|
@ -16,9 +16,6 @@
|
|||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
#include <QUrl>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HAVE_CONFIG_H)
|
#if defined(HAVE_CONFIG_H)
|
||||||
#include <config/dash-config.h> /* for USE_QRCODE */
|
#include <config/dash-config.h> /* for USE_QRCODE */
|
||||||
|
@ -40,10 +40,6 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
#include <QUrl>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TODO: add a scrollback limit, as there is currently none
|
// TODO: add a scrollback limit, as there is currently none
|
||||||
// TODO: make it possible to filter out categories (esp debug messages when implemented)
|
// TODO: make it possible to filter out categories (esp debug messages when implemented)
|
||||||
// TODO: receive errors and debug messages through ClientModel
|
// TODO: receive errors and debug messages through ClientModel
|
||||||
|
@ -27,9 +27,7 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par
|
|||||||
|
|
||||||
if (platformStyle->getUseExtraSpacing())
|
if (platformStyle->getUseExtraSpacing())
|
||||||
ui->payToLayout->setSpacing(4);
|
ui->payToLayout->setSpacing(4);
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
|
ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
|
||||||
#endif
|
|
||||||
|
|
||||||
// These icons are needed on Mac also!
|
// These icons are needed on Mac also!
|
||||||
ui->addressBookButton->setIcon(QIcon(":/icons/address-book"));
|
ui->addressBookButton->setIcon(QIcon(":/icons/address-book"));
|
||||||
|
@ -29,9 +29,7 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(const PlatformStyle *_platformS
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
|
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
|
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
|
||||||
ui->signMessageButton_SM->setIcon(QIcon());
|
ui->signMessageButton_SM->setIcon(QIcon());
|
||||||
|
@ -121,7 +121,6 @@ void RPCNestedTests::rpcNestedTests()
|
|||||||
RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest( abc , cba )");
|
RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest( abc , cba )");
|
||||||
QVERIFY(result == "[\"abc\",\"cba\"]");
|
QVERIFY(result == "[\"abc\",\"cba\"]");
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050300
|
|
||||||
// do the QVERIFY_EXCEPTION_THROWN checks only with Qt5.3 and higher (QVERIFY_EXCEPTION_THROWN was introduced in Qt5.3)
|
// do the QVERIFY_EXCEPTION_THROWN checks only with Qt5.3 and higher (QVERIFY_EXCEPTION_THROWN was introduced in Qt5.3)
|
||||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() .\n"), std::runtime_error); //invalid syntax
|
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() .\n"), std::runtime_error); //invalid syntax
|
||||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() getblockchaininfo()"), std::runtime_error); //invalid syntax
|
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() getblockchaininfo()"), std::runtime_error); //invalid syntax
|
||||||
@ -132,5 +131,4 @@ void RPCNestedTests::rpcNestedTests()
|
|||||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest abc,,abc"), std::runtime_error); //don't tollerate empty arguments when using ,
|
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest abc,,abc"), std::runtime_error); //don't tollerate empty arguments when using ,
|
||||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,abc)"), std::runtime_error); //don't tollerate empty arguments when using ,
|
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,abc)"), std::runtime_error); //don't tollerate empty arguments when using ,
|
||||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,)"), std::runtime_error); //don't tollerate empty arguments when using ,
|
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,)"), std::runtime_error); //don't tollerate empty arguments when using ,
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,6 @@
|
|||||||
|
|
||||||
#if defined(QT_STATICPLUGIN)
|
#if defined(QT_STATICPLUGIN)
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
Q_IMPORT_PLUGIN(qcncodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qjpcodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qtwcodecs)
|
|
||||||
Q_IMPORT_PLUGIN(qkrcodecs)
|
|
||||||
#else
|
|
||||||
#if defined(QT_QPA_PLATFORM_MINIMAL)
|
#if defined(QT_QPA_PLATFORM_MINIMAL)
|
||||||
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
|
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
|
||||||
#endif
|
#endif
|
||||||
@ -44,7 +38,6 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
|
|||||||
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void noui_connect();
|
extern void noui_connect();
|
||||||
|
|
||||||
|
@ -113,16 +113,12 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
hlayout->addWidget(typeWidget);
|
hlayout->addWidget(typeWidget);
|
||||||
|
|
||||||
search_widget = new QLineEdit(this);
|
search_widget = new QLineEdit(this);
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
search_widget->setPlaceholderText(tr("Enter address, transaction id, or label to search"));
|
search_widget->setPlaceholderText(tr("Enter address, transaction id, or label to search"));
|
||||||
#endif
|
|
||||||
search_widget->setObjectName("search_widget");
|
search_widget->setObjectName("search_widget");
|
||||||
hlayout->addWidget(search_widget);
|
hlayout->addWidget(search_widget);
|
||||||
|
|
||||||
amountWidget = new QLineEdit(this);
|
amountWidget = new QLineEdit(this);
|
||||||
#if QT_VERSION >= 0x040700
|
|
||||||
amountWidget->setPlaceholderText(tr("Min amount"));
|
amountWidget->setPlaceholderText(tr("Min amount"));
|
||||||
#endif
|
|
||||||
if (platformStyle->getUseExtraSpacing()) {
|
if (platformStyle->getUseExtraSpacing()) {
|
||||||
amountWidget->setFixedWidth(118);
|
amountWidget->setFixedWidth(118);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <qt/winshutdownmonitor.h>
|
#include <qt/winshutdownmonitor.h>
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
|
#if defined(Q_OS_WIN)
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
#include <windef.h> // for HWND
|
#include <windef.h> // for HWND
|
||||||
|
|
||||||
#include <QAbstractNativeEventFilter>
|
#include <QAbstractNativeEventFilter>
|
||||||
@ -24,6 +23,5 @@ public:
|
|||||||
static void registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId);
|
static void registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // BITCOIN_QT_WINSHUTDOWNMONITOR_H
|
#endif // BITCOIN_QT_WINSHUTDOWNMONITOR_H
|
||||||
|
Loading…
Reference in New Issue
Block a user