Any reason to use std::string
here? If we just use QString
we could avoid conversions on lines 238 and 274
0
1diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
2index 3acf9d6b2..708c3cc92 100644
3--- a/src/qt/test/wallettests.cpp
4+++ b/src/qt/test/wallettests.cpp
5@@ -225,7 +225,7 @@ void TestGUI(interfaces::Node& node)
6 int initialRowCount = requestTableModel->rowCount({});
7 QPushButton* requestPaymentButton = receiveCoinsDialog.findChild<QPushButton*>("receiveButton");
8 requestPaymentButton->click();
9- std::string address;
10+ QString address;
11 for (QWidget* widget : QApplication::topLevelWidgets()) {
12 if (widget->inherits("ReceiveRequestDialog")) {
13 ReceiveRequestDialog* receiveRequestDialog = qobject_cast<ReceiveRequestDialog*>(widget);
14@@ -234,9 +234,9 @@ void TestGUI(interfaces::Node& node)
15 QString uri = receiveRequestDialog->QObject::findChild<QLabel*>("uri_content")->text();
16 QCOMPARE(uri.count("bitcoin:"), 2);
17 QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("address_tag")->text(), QString("Address:"));
18- QVERIFY(address.empty());
19- address = receiveRequestDialog->QObject::findChild<QLabel*>("address_content")->text().toStdString();
20- QVERIFY(!address.empty());
21+ QVERIFY(address.isEmpty());
22+ address = receiveRequestDialog->QObject::findChild<QLabel*>("address_content")->text();
23+ QVERIFY(!address.isEmpty());
24
25 QCOMPARE(uri.count("amount=0.00000001"), 2);
26 QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("amount_tag")->text(), QString("Amount:"));
27@@ -271,7 +271,7 @@ void TestGUI(interfaces::Node& node)
28 QCOMPARE(entry.nVersion, int{1});
29 QCOMPARE(entry.id, int64_t{1});
30 QVERIFY(entry.date.isValid());
31- QCOMPARE(entry.recipient.address, QString::fromStdString(address));
32+ QCOMPARE(entry.recipient.address, address);
33 QCOMPARE(entry.recipient.label, QString{"TEST_LABEL_1"});
34 QCOMPARE(entry.recipient.amount, CAmount{1});
35 QCOMPARE(entry.recipient.message, QString{"TEST_MESSAGE_1"});