]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
build: fix WITH_SCANNER=OFF
authortobtoht <tob@featherwallet.org>
Tue, 1 Oct 2024 22:06:10 +0000 (00:06 +0200)
committertobtoht <tob@featherwallet.org>
Tue, 1 Oct 2024 22:06:14 +0000 (00:06 +0200)
src/SendWidget.cpp

index a00c2cf94f046a3068d09b9d3d535a4fad9d224d..418e2b8e91d72940e225c7021811c52915a4b186 100644 (file)
@@ -4,13 +4,12 @@
 #include "SendWidget.h"
 #include "ui_SendWidget.h"
 
-#include <QMessageBox>
-
 #include "ColorScheme.h"
 #include "constants.h"
 #include "utils/AppData.h"
 #include "utils/config.h"
 #include "Icons.h"
+#include "libwalletqt/Wallet.h"
 #include "libwalletqt/WalletManager.h"
 
 #if defined(WITH_SCANNER)
@@ -29,8 +28,7 @@ SendWidget::SendWidget(Wallet *wallet, QWidget *parent)
     QString amount_rx = R"(^\d{0,8}[\.,]\d{0,12}|(all)$)";
     QRegularExpression rx;
     rx.setPattern(amount_rx);
-    QValidator *validator = new QRegularExpressionValidator(rx, this);
-    ui->lineAmount->setValidator(validator);
+    ui->lineAmount->setValidator(new QRegularExpressionValidator(rx, this));
 
     connect(m_wallet, &Wallet::initiateTransaction, this, &SendWidget::disableSendButton);
     connect(m_wallet, &Wallet::transactionCreated, this, &SendWidget::enableSendButton);