1
0
Fork 0
forked from lthn/blockchain

msvc compilation fix

This commit is contained in:
sowle 2024-04-03 18:24:03 +02:00
parent b5879f7360
commit 88a0d072b0
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -1017,11 +1017,11 @@ bool MainWindow::update_wallet_status(const view::wallet_status_info& wsi)
m_wallet_states->operator [](wsi.wallet_id) = wsi.wallet_state;
std::string json_str_pub;
epee::serialization::store_t_to_json(static_cast<const view::wallet_status_info_base&>(wsi), json_str_pub, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(static_cast<const view::wallet_status_info_base&>(wsi), json_str_pub, 0);
LOG_PRINT_L0(get_wallet_log_prefix(wsi.wallet_id) + "SENDING SIGNAL -> [update_wallet_status]:" << std::endl << json_str_pub);
std::string json_str;
epee::serialization::store_t_to_json(wsi, json_str, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(wsi, json_str, 0);
QMetaObject::invokeMethod(this, "update_wallet_status", Qt::QueuedConnection, Q_ARG(QString, json_str.c_str()));
return true;
CATCH_ENTRY2(false);
@ -1031,7 +1031,7 @@ bool MainWindow::set_options(const view::gui_options& opt)
{
TRY_ENTRY();
std::string json_str;
epee::serialization::store_t_to_json(opt, json_str, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(opt, json_str, 0);
LOG_PRINT_L0("SENDING SIGNAL -> [set_options]:" << std::endl << json_str);
QMetaObject::invokeMethod(this, "set_options", Qt::QueuedConnection, Q_ARG(QString, json_str.c_str()));
return true;
@ -1042,7 +1042,7 @@ bool MainWindow::update_tor_status(const view::current_action_status& opt)
{
TRY_ENTRY();
std::string json_str;
epee::serialization::store_t_to_json(opt, json_str, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(opt, json_str, 0);
LOG_PRINT_L0("SENDING SIGNAL -> [HANDLE_CURRENT_ACTION_STATE]:" << std::endl << json_str);
QMetaObject::invokeMethod(this, "handle_current_action_state", Qt::QueuedConnection, Q_ARG(QString, json_str.c_str()));
return true;
@ -1087,7 +1087,7 @@ bool MainWindow::update_wallets_info(const view::wallets_summary_info& wsi)
{
TRY_ENTRY();
std::string json_str;
epee::serialization::store_t_to_json(wsi, json_str, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(wsi, json_str, 0);
LOG_PRINT_L0("SENDING SIGNAL -> [update_wallets_info]"<< std::endl << json_str );
QMetaObject::invokeMethod(this, "update_wallets_info", Qt::QueuedConnection, Q_ARG(QString, json_str.c_str()));
@ -1099,7 +1099,7 @@ bool MainWindow::money_transfer(const view::transfer_event_info& tei)
{
TRY_ENTRY();
std::string json_str;
epee::serialization::store_t_to_json(tei, json_str, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(tei, json_str, 0);
LOG_PRINT_L0(get_wallet_log_prefix(tei.wallet_id) + "SENDING SIGNAL -> [money_transfer]" << std::endl << json_str);
//this->money_transfer(json_str.c_str());
@ -1154,7 +1154,7 @@ bool MainWindow::money_transfer_cancel(const view::transfer_event_info& tei)
{
TRY_ENTRY();
std::string json_str;
epee::serialization::store_t_to_json(tei, json_str, 0, epee::serialization::eol_lf);
epee::serialization::store_t_to_json(tei, json_str, 0);
LOG_PRINT_L0(get_wallet_log_prefix(tei.wallet_id) + "SENDING SIGNAL -> [money_transfer_cancel]");
//this->money_transfer_cancel(json_str.c_str());
@ -1169,7 +1169,7 @@ bool MainWindow::wallet_sync_progress(const view::wallet_sync_progres_param& p)
TRY_ENTRY();
LOG_PRINT_L2(get_wallet_log_prefix(p.wallet_id) + "SENDING SIGNAL -> [wallet_sync_progress]" << " wallet_id: " << p.wallet_id << ": " << p.progress << "%");
//this->wallet_sync_progress(epee::serialization::store_t_to_json(p).c_str());
QMetaObject::invokeMethod(this, "wallet_sync_progress", Qt::QueuedConnection, Q_ARG(QString, epee::serialization::store_t_to_json(p, 0, epee::serialization::eol_lf).c_str()));
QMetaObject::invokeMethod(this, "wallet_sync_progress", Qt::QueuedConnection, Q_ARG(QString, epee::serialization::store_t_to_json(p, 0).c_str()));
return true;
CATCH_ENTRY2(false);
}
@ -1231,7 +1231,7 @@ QString MainWindow::get_alias_coast(const QString& param)
PREPARE_ARG_FROM_JSON(currency::struct_with_one_t_type<std::string>, lvl);
view::get_alias_coast_response resp;
resp.error_code = m_backend.get_alias_coast(lvl.v, resp.coast);
return epee::serialization::store_t_to_json(resp, 0, epee::serialization::eol_lf).c_str();
return epee::serialization::store_t_to_json(resp, 0).c_str();
CATCH_ENTRY_FAIL_API_RESPONCE();
}
@ -1259,7 +1259,7 @@ QString MainWindow::set_localization_strings(const QString param)
resp.error_code = API_RETURN_CODE_OK;
LOG_PRINT_L0("New localization set, language title: " << lr.language_title << ", strings " << lr.strings.size());
}
return epee::serialization::store_t_to_json(resp, 0, epee::serialization::eol_lf).c_str();
return epee::serialization::store_t_to_json(resp, 0).c_str();
CATCH_ENTRY_FAIL_API_RESPONCE();
}
@ -1815,7 +1815,7 @@ QString MainWindow::show_openfile_dialog(const QString& param)
if (!epee::serialization::load_t_from_json(ofdr, param.toStdString()))
{
ofdres.error_code = API_RETURN_CODE_BAD_ARG;
return epee::serialization::store_t_to_json(ofdres, 0, epee::serialization::eol_lf).c_str();
return epee::serialization::store_t_to_json(ofdres, 0).c_str();
}
QString path = QFileDialog::getOpenFileName(this, ofdr.caption.c_str(),
@ -1825,7 +1825,7 @@ QString MainWindow::show_openfile_dialog(const QString& param)
if (!path.length())
{
ofdres.error_code = API_RETURN_CODE_CANCELED;
return epee::serialization::store_t_to_json(ofdres, 0, epee::serialization::eol_lf).c_str();
return epee::serialization::store_t_to_json(ofdres, 0).c_str();
}
ofdres.error_code = API_RETURN_CODE_OK;
@ -1848,7 +1848,7 @@ QString MainWindow::show_savefile_dialog(const QString& param)
if (!path.length())
{
ofdres.error_code = API_RETURN_CODE_CANCELED;
return epee::serialization::store_t_to_json(ofdres, 0, epee::serialization::eol_lf).c_str();
return epee::serialization::store_t_to_json(ofdres, 0).c_str();
}
ofdres.error_code = API_RETURN_CODE_OK;