[Qt] sendcoinsdialog: convert QMessageBox usage to message()
- add new processSendCoinsReturn() function, which parses the status of WalletModel::SendCoinsReturn and generates a pair consisting of a message and message flags - result is we only need one emit message() call - this change ensures that the GUI is shown for warnings/errors in sendcoinsdialog, because of message() taking care of that for modal messages - changes 2 warning message into error messages and removed "Error:" in front of the actual error message string
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
#ifndef SENDCOINSDIALOG_H
|
||||
#define SENDCOINSDIALOG_H
|
||||
|
||||
#include "walletmodel.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QVariant>
|
||||
#include <QPair>
|
||||
|
||||
namespace Ui {
|
||||
class SendCoinsDialog;
|
||||
}
|
||||
class WalletModel;
|
||||
class SendCoinsEntry;
|
||||
class SendCoinsRecipient;
|
||||
class OptionsModel;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QUrl;
|
||||
@@ -48,6 +49,11 @@ private:
|
||||
WalletModel *model;
|
||||
bool fNewRecipientAllowed;
|
||||
|
||||
// Process WalletModel::SendCoinsReturn and generate a pair consisting
|
||||
// of a message and message flags for use in emit message().
|
||||
// Additional parameter msgArg can be used via .arg(msgArg).
|
||||
void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg = QString());
|
||||
|
||||
private slots:
|
||||
void on_sendButton_clicked();
|
||||
void removeEntry(SendCoinsEntry* entry);
|
||||
|
||||
Reference in New Issue
Block a user