mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 21:59:10 +02:00
util: Replace boost::signals2 with std::function
This commit is contained in:
@@ -76,13 +76,10 @@ static void InitMessage(const std::string &message)
|
||||
LogPrintf("init message: %s\n", message);
|
||||
}
|
||||
|
||||
/*
|
||||
Translate string to current locale using Qt.
|
||||
*/
|
||||
static std::string Translate(const char* psz)
|
||||
{
|
||||
/** Translate string to current locale using Qt. */
|
||||
const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) {
|
||||
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
|
||||
}
|
||||
};
|
||||
|
||||
static QString GetLangTerritory()
|
||||
{
|
||||
@@ -619,7 +616,6 @@ int main(int argc, char *argv[])
|
||||
// Now that QSettings are accessible, initialize translations
|
||||
QTranslator qtTranslatorBase, qtTranslator, translatorBase, translator;
|
||||
initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator);
|
||||
translationInterface.Translate.connect(Translate);
|
||||
|
||||
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
|
||||
// but before showing splash screen.
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
#include <QUrlQuery>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
|
||||
#if defined(Q_OS_MAC)
|
||||
"macosx"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <interfaces/handler.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <interfaces/wallet.h>
|
||||
#include <util.h>
|
||||
#include <ui_interface.h>
|
||||
#include <util.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <QPainter>
|
||||
#include <QRadialGradient>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle) :
|
||||
QWidget(0, f), curAlignment(0), m_node(node)
|
||||
{
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
#include <core_io.h>
|
||||
#include <interfaces/handler.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <validation.h>
|
||||
#include <sync.h>
|
||||
#include <uint256.h>
|
||||
#include <util.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <QColor>
|
||||
#include <QDateTime>
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <QIcon>
|
||||
#include <QList>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// Amount column is right-aligned it contains numbers
|
||||
static int column_alignments[] = {
|
||||
Qt::AlignLeft|Qt::AlignVCenter, /* status */
|
||||
|
||||
Reference in New Issue
Block a user