diff --git a/doc/build-unix.md b/doc/build-unix.md index 21dea362bc..624c3a7d45 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -313,27 +313,3 @@ or building and depending on a local version of Berkeley DB 4.8. The readily ava `--with-incompatible-bdb` according to the [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD). As mentioned above, when maintaining portability of the wallet between the standard Dash Core distributions and independently built node software is desired, Berkeley DB 4.8 must be used. - - -ARM Cross-compilation -------------------- -These steps can be performed on, for example, an Ubuntu VM. The depends system -will also work on other Linux distributions, however the commands for -installing the toolchain will be different. - -Make sure you install the build requirements mentioned above. -Then, install the toolchain and curl: - - sudo apt-get install g++-arm-linux-gnueabihf curl - -To build executables for ARM: - - cd depends - make HOST=arm-linux-gnueabihf NO_QT=1 - cd .. - ./autogen.sh - CONFIG_SITE=$PWD/depends/arm-linux-gnueabihf/share/config.site ./configure --enable-reduce-exports LDFLAGS=-static-libstdc++ - make - - -For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory. diff --git a/src/bench/string_cast.cpp b/src/bench/string_cast.cpp index 8f08d12103..bc59d79dbc 100644 --- a/src/bench/string_cast.cpp +++ b/src/bench/string_cast.cpp @@ -7,7 +7,6 @@ #include #include -#include #include template @@ -25,21 +24,6 @@ static void int_atoi(benchmark::Bench& bench) }); } -static void int_lexical_cast(benchmark::Bench& bench) -{ - bench.run([&] { - boost::lexical_cast("1"); - }); -} - -static void strings_1_lexical_cast(benchmark::Bench& bench) -{ - int i{0}; - bench.run([&] { - boost::lexical_cast(++i); - }); -} - static void strings_1_numberToString(benchmark::Bench& bench) { int i{0}; @@ -56,19 +40,6 @@ static void strings_1_tostring(benchmark::Bench& bench) }); } -static void strings_2_multi_lexical_cast(benchmark::Bench& bench) -{ - int i{0}; - bench.run([&] { static_cast( - boost::lexical_cast(i) + - boost::lexical_cast(i+1) + - boost::lexical_cast(i+2) + - boost::lexical_cast(i+3) + - boost::lexical_cast(i+4)); - ++i; - }); -} - static void strings_2_multi_numberToString(benchmark::Bench& bench) { int i{0}; @@ -97,11 +68,8 @@ static void strings_2_strptintf(benchmark::Bench& bench) } BENCHMARK(int_atoi); -BENCHMARK(int_lexical_cast); -BENCHMARK(strings_1_lexical_cast); BENCHMARK(strings_1_numberToString); BENCHMARK(strings_1_tostring); -BENCHMARK(strings_2_multi_lexical_cast); BENCHMARK(strings_2_multi_numberToString); BENCHMARK(strings_2_multi_tostring); BENCHMARK(strings_2_strptintf); diff --git a/src/init.cpp b/src/init.cpp index 25c5bdaa6c..ac051755a1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -592,7 +592,7 @@ void SetupServerArgs(NodeContext& node) argsman.AddArg("-proxyrandomize", strprintf("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)", DEFAULT_PROXYRANDOMIZE), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-seednode=", "Connect to a node to retrieve peer addresses, and disconnect. This option can be specified multiple times to connect to multiple nodes.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-socketevents=", "Socket events mode, which must be one of 'select', 'poll', 'epoll' or 'kqueue', depending on your system (default: Linux - 'epoll', FreeBSD/Apple - 'kqueue', Windows - 'select')", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); - gArgs.AddArg("-networkactive", "Enable all P2P network activity (default: 1). Can be changed by the setnetworkactive RPC command", ArgsManager::ALLOW_BOOL, OptionsCategory::CONNECTION); + argsman.AddArg("-networkactive", "Enable all P2P network activity (default: 1). Can be changed by the setnetworkactive RPC command", ArgsManager::ALLOW_BOOL, OptionsCategory::CONNECTION); argsman.AddArg("-timeout=", strprintf("Specify socket connection timeout in milliseconds. If an initial attempt to connect is unsuccessful after this amount of time, drop it (minimum: 1, default: %d)", DEFAULT_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-torcontrol=:", strprintf("Tor control port to use if onion listening enabled (default: %s)", DEFAULT_TOR_CONTROL), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-torpassword=", "Tor control port password (default: empty)", ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::CONNECTION); @@ -1663,7 +1663,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc assert(!node.banman); node.banman = std::make_unique(GetDataDir() / "banlist", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME)); assert(!node.connman); - node.connman = std::make_unique(GetRand(std::numeric_limits::max()), GetRand(std::numeric_limits::max()), *node.addrman, gArgs.GetBoolArg("-networkactive", true)); + node.connman = std::make_unique(GetRand(std::numeric_limits::max()), GetRand(std::numeric_limits::max()), *node.addrman, args.GetBoolArg("-networkactive", true)); assert(!node.fee_estimator); // Don't initialize fee estimation with old data if we don't relay transactions, diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ac22dc5d6b..80dbf3b8c1 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -373,7 +374,7 @@ void BitcoinGUI::createActions() quitAction = new QAction(tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); - quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); + quitAction->setShortcut(QKeySequence(tr("Ctrl+Q"))); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(tr("&About %1").arg(PACKAGE_NAME), this); aboutAction->setStatusTip(tr("Show information about %1").arg(PACKAGE_NAME)); @@ -463,7 +464,7 @@ void BitcoinGUI::createActions() showCoinJoinHelpAction->setStatusTip(tr("Show the %1 basic information").arg(strCoinJoinName)); m_mask_values_action = new QAction(tr("&Discreet mode"), this); - m_mask_values_action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D)); + m_mask_values_action->setShortcut(QKeySequence(tr("Ctrl+Shift+D"))); m_mask_values_action->setStatusTip(tr("Mask the values in the Overview tab")); m_mask_values_action->setCheckable(true); @@ -606,7 +607,7 @@ void BitcoinGUI::createMenuBar() QMenu* window_menu = appMenuBar->addMenu(tr("&Window")); QAction* minimize_action = window_menu->addAction(tr("Minimize")); - minimize_action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); + minimize_action->setShortcut(QKeySequence(tr("Ctrl+M"))); connect(minimize_action, &QAction::triggered, [] { QApplication::activeWindow()->showMinimized(); }); diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 22a33bcc33..2fd1f32611 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -613,7 +614,7 @@ void bringToFront(QWidget* w) void handleCloseWindowShortcut(QWidget* w) { - QObject::connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), w), &QShortcut::activated, w, &QWidget::close); + QObject::connect(new QShortcut(QKeySequence(QObject::tr("Ctrl+W")), w), &QShortcut::activated, w, &QWidget::close); } void openDebugLogfile() @@ -1618,7 +1619,7 @@ void updateButtonGroupShortcuts(QButtonGroup* buttonGroup) int nKey = 0; for (auto button : buttonGroup->buttons()) { if (button->isVisible()) { - button->setShortcut(QKeySequence(modifier + Qt::Key_1 + nKey++)); + button->setShortcut(QKeySequence(static_cast(modifier) | static_cast(Qt::Key_1) | nKey++)); } else { button->setShortcut(QKeySequence()); } diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 44b51d61d0..dd7f52c56d 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -1459,11 +1460,11 @@ QString RPCConsole::tabTitle(TabTypes tab_type) const QKeySequence RPCConsole::tabShortcut(TabTypes tab_type) const { switch (tab_type) { - case TabTypes::INFO: return QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_I); - case TabTypes::CONSOLE: return QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C); - case TabTypes::GRAPH: return QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_G); - case TabTypes::PEERS: return QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_P); - case TabTypes::REPAIR: return QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_R); + case TabTypes::INFO: return QKeySequence(tr("Ctrl+Shift+I")); + case TabTypes::CONSOLE: return QKeySequence(tr("Ctrl+Shift+C")); + case TabTypes::GRAPH: return QKeySequence(tr("Ctrl+Shift+G")); + case TabTypes::PEERS: return QKeySequence(tr("Ctrl+Shift+P")); + case TabTypes::REPAIR: return QKeySequence(tr("Ctrl+Shift+R")); } // no default case, so the compiler can warn about missing cases assert(false); diff --git a/src/qt/trafficgraphwidget.h b/src/qt/trafficgraphwidget.h index 351f3f712c..8767270364 100644 --- a/src/qt/trafficgraphwidget.h +++ b/src/qt/trafficgraphwidget.h @@ -7,8 +7,6 @@ #include -#include - #include #include @@ -37,7 +35,7 @@ public Q_SLOTS: void clear(); private: - typedef boost::function SampleChooser; + typedef std::function SampleChooser; void paintPath(QPainterPath &path, const TrafficGraphData::SampleQueue &queue, SampleChooser chooser); QTimer *timer; diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 021020f103..bfba03eaa2 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -612,7 +612,7 @@ QWidget *TransactionView::createDateRangeWidget() QSettings settings; dateRangeWidget = new QFrame(); - dateRangeWidget->setFrameStyle(QFrame::Panel | QFrame::Raised); + dateRangeWidget->setFrameStyle(static_cast(QFrame::Panel) | static_cast(QFrame::Raised)); dateRangeWidget->setContentsMargins(1,1,1,1); QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget); layout->setContentsMargins(0,0,0,0); diff --git a/src/test/fuzz/addrman.cpp b/src/test/fuzz/addrman.cpp index d819444b1b..9479e5161e 100644 --- a/src/test/fuzz/addrman.cpp +++ b/src/test/fuzz/addrman.cpp @@ -142,7 +142,7 @@ public: * - vvNew entries refer to the same addresses * - vvTried entries refer to the same addresses */ - bool operator==(const CAddrManDeterministic& other) + bool operator==(const CAddrManDeterministic& other) const { LOCK2(cs, other.cs); diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp index a91fa9297e..f430cd96e5 100644 --- a/src/test/serialize_tests.cpp +++ b/src/test/serialize_tests.cpp @@ -38,13 +38,13 @@ public: READWRITE(obj.txval); } - bool operator==(const CSerializeMethodsTestSingle& rhs) + bool operator==(const CSerializeMethodsTestSingle& rhs) const { - return intval == rhs.intval && \ - boolval == rhs.boolval && \ - stringval == rhs.stringval && \ - strcmp(charstrval, rhs.charstrval) == 0 && \ - *txval == *rhs.txval; + return intval == rhs.intval && + boolval == rhs.boolval && + stringval == rhs.stringval && + strcmp(charstrval, rhs.charstrval) == 0 && + *txval == *rhs.txval; } }; diff --git a/test/lint/lint-includes.sh b/test/lint/lint-includes.sh index e3f13c624f..41f9fa8d45 100755 --- a/test/lint/lint-includes.sh +++ b/test/lint/lint-includes.sh @@ -52,8 +52,6 @@ EXPECTED_BOOST_INCLUDES=( boost/date_time/posix_time/posix_time.hpp boost/filesystem.hpp boost/filesystem/fstream.hpp - boost/function.hpp - boost/lexical_cast.hpp boost/multi_index/hashed_index.hpp boost/multi_index/ordered_index.hpp boost/multi_index/sequenced_index.hpp