From e16fc9251f0ddd5acc1d00d15cf4e1a6db3021b0 Mon Sep 17 00:00:00 2001 From: clemahieu Date: Sun, 21 Oct 2018 21:18:09 +0100 Subject: [PATCH] Fixing some QT tests. --- rai/qt/qt.cpp | 16 ++++++++-------- rai/qt_test/qt.cpp | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rai/qt/qt.cpp b/rai/qt/qt.cpp index f0e8e540..e582231f 100644 --- a/rai/qt/qt.cpp +++ b/rai/qt/qt.cpp @@ -2012,29 +2012,29 @@ wallet (wallet_a) layout->addWidget (create); layout->addWidget (back); window->setLayout (layout); - QObject::connect (send, &QRadioButton::toggled, [this]() { - if (send->isChecked ()) + QObject::connect (send, &QRadioButton::toggled, [this](bool on) { + if (on) { deactivate_all (); activate_send (); } }); - QObject::connect (receive, &QRadioButton::toggled, [this]() { - if (receive->isChecked ()) + QObject::connect (receive, &QRadioButton::toggled, [this](bool on) { + if (on) { deactivate_all (); activate_receive (); } }); - QObject::connect (open, &QRadioButton::toggled, [this]() { - if (open->isChecked ()) + QObject::connect (open, &QRadioButton::toggled, [this](bool on) { + if (on) { deactivate_all (); activate_open (); } }); - QObject::connect (change, &QRadioButton::toggled, [this]() { - if (change->isChecked ()) + QObject::connect (change, &QRadioButton::toggled, [this](bool on) { + if (on) { deactivate_all (); activate_change (); diff --git a/rai/qt_test/qt.cpp b/rai/qt_test/qt.cpp index 2e323667..21679da8 100644 --- a/rai/qt_test/qt.cpp +++ b/rai/qt_test/qt.cpp @@ -71,7 +71,7 @@ TEST (wallet, startup_balance) wallet_l->insert_adhoc (key.prv); auto wallet (std::make_shared (*test_application, processor, *system.nodes[0], wallet_l, key.pub)); wallet->start (); - ASSERT_EQ ("Balance: 0 XRB", wallet->self.balance_label->text ().toStdString ()); + ASSERT_EQ ("Balance: 0 NANO", wallet->self.balance_label->text ().toStdString ()); } TEST (wallet, select_account) @@ -391,7 +391,7 @@ TEST (wallet, create_open_receive) wallet->client_window->show (); QTest::mouseClick (wallet->show_advanced, Qt::LeftButton); QTest::mouseClick (wallet->advanced.create_block, Qt::LeftButton); - QTest::mouseClick (wallet->block_creation.open, Qt::LeftButton); + wallet->block_creation.open->click (); QTest::keyClicks (wallet->block_creation.source, latest1.to_string ().c_str ()); QTest::keyClicks (wallet->block_creation.representative, rai::test_genesis_key.pub.to_account ().c_str ()); QTest::mouseClick (wallet->block_creation.create, Qt::LeftButton);