mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-08 20:09:43 +00:00
UI: use QScopedPointer
This commit is contained in:
parent
1afa06af91
commit
bc21aed5af
92 changed files with 95 additions and 198 deletions
|
@ -144,6 +144,4 @@ void CalcWidget::setupComboBox(QComboBox *comboBox, const QStringList &crypto, c
|
|||
comboBox->addItems(fiat);
|
||||
}
|
||||
|
||||
CalcWidget::~CalcWidget() {
|
||||
delete ui;
|
||||
}
|
||||
CalcWidget::~CalcWidget() = default;
|
|
@ -31,7 +31,7 @@ private:
|
|||
void convert(bool reverse);
|
||||
void setupComboBox(QComboBox *comboBox, const QStringList &crypto, const QStringList &fiat);
|
||||
|
||||
Ui::CalcWidget *ui;
|
||||
QScopedPointer<Ui::CalcWidget> ui;
|
||||
bool m_comboBoxInit = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,4 @@ void CalcWindow::closeEvent(QCloseEvent *foo) {
|
|||
emit closed();
|
||||
}
|
||||
|
||||
CalcWindow::~CalcWindow() {
|
||||
delete ui;
|
||||
}
|
||||
CalcWindow::~CalcWindow() = default;
|
|
@ -25,7 +25,7 @@ private:
|
|||
void closeEvent(QCloseEvent *bar) override;
|
||||
|
||||
private:
|
||||
Ui::CalcWindow *ui;
|
||||
QScopedPointer<Ui::CalcWindow> ui;
|
||||
};
|
||||
|
||||
#endif // CalcWindow_H
|
||||
|
|
|
@ -243,6 +243,4 @@ void CoinsWidget::thawCoins(const QVector<int> &indexes) {
|
|||
m_ctx->updateBalance();
|
||||
}
|
||||
|
||||
CoinsWidget::~CoinsWidget() {
|
||||
delete ui;
|
||||
}
|
||||
CoinsWidget::~CoinsWidget() = default;
|
|
@ -50,7 +50,7 @@ private:
|
|||
Amount
|
||||
};
|
||||
|
||||
Ui::CoinsWidget *ui;
|
||||
QScopedPointer<Ui::CoinsWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
QMenu *m_contextMenu;
|
||||
|
|
|
@ -150,7 +150,4 @@ void ContactsWidget::deleteContact()
|
|||
m_model->deleteRow(m_proxyModel->mapToSource(index).row());
|
||||
}
|
||||
|
||||
ContactsWidget::~ContactsWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
ContactsWidget::~ContactsWidget() = default;
|
||||
|
|
|
@ -42,7 +42,7 @@ private slots:
|
|||
void showHeaderMenu(const QPoint &position);
|
||||
|
||||
private:
|
||||
Ui::ContactsWidget *ui;
|
||||
QScopedPointer<Ui::ContactsWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
QAction *m_showFullAddressesAction;
|
||||
|
|
|
@ -38,7 +38,5 @@ AboutDialog::AboutDialog(QWidget *parent)
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog() {
|
||||
delete ui;
|
||||
}
|
||||
AboutDialog::~AboutDialog() = default;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
~AboutDialog() override;
|
||||
|
||||
private:
|
||||
Ui::AboutDialog *ui;
|
||||
QScopedPointer<Ui::AboutDialog> ui;
|
||||
QStringListModel *m_model;
|
||||
};
|
||||
|
||||
|
|
|
@ -103,6 +103,4 @@ Monero::SubaddressAccountRow* AccountSwitcherDialog::currentEntry() {
|
|||
return m_ctx->wallet->subaddressAccountModel()->entryFromIndex(index);
|
||||
}
|
||||
|
||||
AccountSwitcherDialog::~AccountSwitcherDialog() {
|
||||
delete ui;
|
||||
}
|
||||
AccountSwitcherDialog::~AccountSwitcherDialog() = default;
|
||||
|
|
|
@ -33,7 +33,7 @@ private:
|
|||
|
||||
Monero::SubaddressAccountRow* currentEntry();
|
||||
|
||||
Ui::AccountSwitcherDialog *ui;
|
||||
QScopedPointer<Ui::AccountSwitcherDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
SubaddressAccountModel *m_model;
|
||||
SubaddressAccountProxyModel *m_proxyModel;
|
||||
|
|
|
@ -22,6 +22,4 @@ BalanceDialog::BalanceDialog(QWidget *parent, Wallet *wallet)
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
BalanceDialog::~BalanceDialog() {
|
||||
delete ui;
|
||||
}
|
||||
BalanceDialog::~BalanceDialog() = default;
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
~BalanceDialog() override;
|
||||
|
||||
private:
|
||||
Ui::BalanceDialog *ui;
|
||||
QScopedPointer<Ui::BalanceDialog> ui;
|
||||
};
|
||||
|
||||
#endif //FEATHER_BALANCEDIALOG_H
|
||||
|
|
|
@ -56,6 +56,4 @@ void BroadcastTxDialog::onApiResponse(const DaemonRpc::DaemonResponse &resp) {
|
|||
}
|
||||
}
|
||||
|
||||
BroadcastTxDialog::~BroadcastTxDialog() {
|
||||
delete ui;
|
||||
}
|
||||
BroadcastTxDialog::~BroadcastTxDialog() = default;
|
||||
|
|
|
@ -25,7 +25,7 @@ private slots:
|
|||
void onApiResponse(const DaemonRpc::DaemonResponse &resp);
|
||||
|
||||
private:
|
||||
Ui::BroadcastTxDialog *ui;
|
||||
QScopedPointer<Ui::BroadcastTxDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
UtilsNetworking *m_network;
|
||||
DaemonRpc *m_rpc;
|
||||
|
|
|
@ -97,6 +97,4 @@ void CalcConfigDialog::fillListWidgets() {
|
|||
setChecked(ui->list_fiat, checkedFiatCurrencies);
|
||||
}
|
||||
|
||||
CalcConfigDialog::~CalcConfigDialog() {
|
||||
delete ui;
|
||||
}
|
||||
CalcConfigDialog::~CalcConfigDialog() = default;
|
|
@ -32,7 +32,7 @@ private:
|
|||
void fillListWidgets();
|
||||
QListWidget* getVisibleListWidget();
|
||||
|
||||
Ui::CalcConfigDialog *ui;
|
||||
QScopedPointer<Ui::CalcConfigDialog> ui;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -25,10 +25,7 @@ ContactsDialog::ContactsDialog(QWidget *parent, const QString &address, const QS
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
ContactsDialog::~ContactsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
ContactsDialog::~ContactsDialog() = default;
|
||||
|
||||
QString ContactsDialog::getAddress() {
|
||||
return m_address;
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
QString getName();
|
||||
|
||||
private:
|
||||
Ui::ContactsDialog *ui;
|
||||
QScopedPointer<Ui::ContactsDialog> ui;
|
||||
|
||||
QString m_address;
|
||||
QString m_name;
|
||||
|
|
|
@ -146,6 +146,4 @@ void DebugInfoDialog::copyToClipboad() {
|
|||
Utils::copyToClipboard(text);
|
||||
}
|
||||
|
||||
DebugInfoDialog::~DebugInfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
DebugInfoDialog::~DebugInfoDialog() = default;
|
|
@ -25,7 +25,7 @@ private:
|
|||
void copyToClipboad();
|
||||
void updateInfo();
|
||||
|
||||
Ui::DebugInfoDialog *ui;
|
||||
QScopedPointer<Ui::DebugInfoDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
QTimer m_updateTimer;
|
||||
|
|
|
@ -14,6 +14,4 @@ InfoDialog::InfoDialog(QWidget *parent, const QString &title, const QString &inf
|
|||
ui->info->setPlainText(infoData);
|
||||
}
|
||||
|
||||
InfoDialog::~InfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
InfoDialog::~InfoDialog() = default;
|
|
@ -19,7 +19,7 @@ public:
|
|||
~InfoDialog() override;
|
||||
|
||||
private:
|
||||
Ui::InfoDialog *ui;
|
||||
QScopedPointer<Ui::InfoDialog> ui;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,4 @@ KeysDialog::KeysDialog(QSharedPointer<AppContext> ctx, QWidget *parent)
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
KeysDialog::~KeysDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
KeysDialog::~KeysDialog() = default;
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
~KeysDialog() override;
|
||||
|
||||
private:
|
||||
Ui::KeysDialog *ui;
|
||||
QScopedPointer<Ui::KeysDialog> ui;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -46,6 +46,4 @@ void LocalMoneroInfoDialog::onGoToOffer() {
|
|||
Utils::externalLinkWarning(this, offerUrl);
|
||||
}
|
||||
|
||||
LocalMoneroInfoDialog::~LocalMoneroInfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
LocalMoneroInfoDialog::~LocalMoneroInfoDialog() = default;
|
|
@ -26,7 +26,7 @@ private slots:
|
|||
private:
|
||||
void setLabelText(QLabel *label, LocalMoneroModel::Column column);
|
||||
|
||||
Ui::LocalMoneroInfoDialog *ui;
|
||||
QScopedPointer<Ui::LocalMoneroInfoDialog> ui;
|
||||
LocalMoneroModel *m_model;
|
||||
int m_row;
|
||||
};
|
||||
|
|
|
@ -37,6 +37,4 @@ OutputInfoDialog::OutputInfoDialog(CoinsInfo *cInfo, QWidget *parent)
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
OutputInfoDialog::~OutputInfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
OutputInfoDialog::~OutputInfoDialog() = default;
|
|
@ -21,7 +21,7 @@ public:
|
|||
~OutputInfoDialog() override;
|
||||
|
||||
private:
|
||||
Ui::OutputInfoDialog *ui;
|
||||
QScopedPointer<Ui::OutputInfoDialog> ui;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -40,11 +40,6 @@ OutputSweepDialog::OutputSweepDialog(QWidget *parent, CoinsInfo* coin)
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
OutputSweepDialog::~OutputSweepDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString OutputSweepDialog::address() {
|
||||
return m_address;
|
||||
}
|
||||
|
@ -55,4 +50,6 @@ bool OutputSweepDialog::churn() const {
|
|||
|
||||
int OutputSweepDialog::outputs() const {
|
||||
return m_outputs;
|
||||
}
|
||||
}
|
||||
|
||||
OutputSweepDialog::~OutputSweepDialog() = default;
|
|
@ -24,7 +24,7 @@ public:
|
|||
int outputs() const;
|
||||
|
||||
private:
|
||||
Ui::OutputSweepDialog *ui;
|
||||
QScopedPointer<Ui::OutputSweepDialog> ui;
|
||||
|
||||
uint64_t m_amount;
|
||||
|
||||
|
|
|
@ -40,10 +40,7 @@ PasswordChangeDialog::PasswordChangeDialog(QWidget *parent, Wallet *wallet)
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
PasswordChangeDialog::~PasswordChangeDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
PasswordChangeDialog::~PasswordChangeDialog() = default;
|
||||
|
||||
void PasswordChangeDialog::passwordsMatch() {
|
||||
bool match = ui->lineEdit_newPassword->text() == ui->lineEdit_confirmPassword->text();
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
~PasswordChangeDialog() override;
|
||||
|
||||
private:
|
||||
Ui::PasswordChangeDialog *ui;
|
||||
QScopedPointer<Ui::PasswordChangeDialog> ui;
|
||||
Wallet *m_wallet;
|
||||
|
||||
void passwordsMatch();
|
||||
|
|
|
@ -22,7 +22,4 @@ PasswordDialog::PasswordDialog(const QString &walletName, bool incorrectPassword
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
PasswordDialog::~PasswordDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
PasswordDialog::~PasswordDialog() = default;
|
|
@ -21,7 +21,7 @@ public:
|
|||
QString password = "";
|
||||
|
||||
private:
|
||||
Ui::PasswordDialog *ui;
|
||||
QScopedPointer<Ui::PasswordDialog> ui;
|
||||
};
|
||||
|
||||
#endif //FEATHER_PASSWORDDIALOG_H
|
||||
|
|
|
@ -27,10 +27,7 @@ QrCodeDialog::QrCodeDialog(QWidget *parent, const QrCode &qrCode, const QString
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
QrCodeDialog::~QrCodeDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
QrCodeDialog::~QrCodeDialog() = default;
|
||||
|
||||
void QrCodeDialog::setQrCode(const QrCode &qrCode) {
|
||||
m_pixmap = qrCode.toPixmap(1).scaled(500, 500, Qt::KeepAspectRatio);
|
||||
|
|
|
@ -24,7 +24,7 @@ private:
|
|||
void copyImage();
|
||||
void saveImage();
|
||||
|
||||
Ui::QrCodeDialog *ui;
|
||||
QScopedPointer<Ui::QrCodeDialog> ui;
|
||||
QPixmap m_pixmap;
|
||||
};
|
||||
|
||||
|
|
|
@ -62,7 +62,4 @@ void SeedDialog::setSeed(const QString &seed) {
|
|||
"</ul>").arg(words));
|
||||
}
|
||||
|
||||
SeedDialog::~SeedDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
SeedDialog::~SeedDialog() = default;
|
|
@ -22,7 +22,7 @@ public:
|
|||
private:
|
||||
void setSeed(const QString &seed);
|
||||
|
||||
Ui::SeedDialog *ui;
|
||||
QScopedPointer<Ui::SeedDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
};
|
||||
|
||||
|
|
|
@ -52,7 +52,4 @@ void SignVerifyDialog::copyToClipboard() {
|
|||
Utils::copyToClipboard(sig.join("\n"));
|
||||
}
|
||||
|
||||
SignVerifyDialog::~SignVerifyDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
SignVerifyDialog::~SignVerifyDialog() = default;
|
|
@ -20,7 +20,7 @@ public:
|
|||
~SignVerifyDialog() override;
|
||||
|
||||
private:
|
||||
Ui::SignVerifyDialog *ui;
|
||||
QScopedPointer<Ui::SignVerifyDialog> ui;
|
||||
Wallet *m_wallet;
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -29,6 +29,4 @@ void SplashDialog::setIcon(const QPixmap &icon) {
|
|||
ui->icon->setPixmap(icon.scaledToWidth(32, Qt::SmoothTransformation));
|
||||
}
|
||||
|
||||
SplashDialog::~SplashDialog() {
|
||||
delete ui;
|
||||
}
|
||||
SplashDialog::~SplashDialog() = default;
|
|
@ -22,7 +22,7 @@ public:
|
|||
void setIcon(const QPixmap &icon);
|
||||
|
||||
private:
|
||||
Ui::SplashDialog *ui;
|
||||
QScopedPointer<Ui::SplashDialog> ui;
|
||||
};
|
||||
|
||||
#endif //FEATHER_SPLASHDIALOG_H
|
||||
|
|
|
@ -165,6 +165,4 @@ void TorInfoDialog::onShowInitSyncConfigDialog() {
|
|||
}
|
||||
}
|
||||
|
||||
TorInfoDialog::~TorInfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
TorInfoDialog::~TorInfoDialog() = default;
|
|
@ -38,7 +38,7 @@ private:
|
|||
void initConnectionSettings();
|
||||
void initPrivacyLevel();
|
||||
|
||||
Ui::TorInfoDialog *ui;
|
||||
QScopedPointer<Ui::TorInfoDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
};
|
||||
|
||||
|
|
|
@ -134,6 +134,4 @@ void TransactionInfoDialog::createTxProof() {
|
|||
m_txProofDialog->show();
|
||||
}
|
||||
|
||||
TransactionInfoDialog::~TransactionInfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
TransactionInfoDialog::~TransactionInfoDialog() = default;
|
|
@ -31,7 +31,7 @@ private:
|
|||
void setData(TransactionInfo* tx);
|
||||
void updateData();
|
||||
|
||||
Ui::TransactionInfoDialog *ui;
|
||||
QScopedPointer<Ui::TransactionInfoDialog> ui;
|
||||
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
TransactionInfo *m_txInfo;
|
||||
|
|
|
@ -184,6 +184,4 @@ void TxConfAdvDialog::closeDialog() {
|
|||
QDialog::reject();
|
||||
}
|
||||
|
||||
TxConfAdvDialog::~TxConfAdvDialog() {
|
||||
delete ui;
|
||||
}
|
||||
TxConfAdvDialog::~TxConfAdvDialog() = default;
|
|
@ -42,7 +42,7 @@ private:
|
|||
void signedQrCode();
|
||||
void signedSaveFile();
|
||||
|
||||
Ui::TxConfAdvDialog *ui;
|
||||
QScopedPointer<Ui::TxConfAdvDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
PendingTransaction *m_tx = nullptr;
|
||||
UnsignedTransaction *m_utx = nullptr;
|
||||
|
|
|
@ -86,6 +86,4 @@ void TxConfDialog::setShowAdvanced() {
|
|||
QDialog::reject();
|
||||
}
|
||||
|
||||
TxConfDialog::~TxConfDialog() {
|
||||
delete ui;
|
||||
}
|
||||
TxConfDialog::~TxConfDialog() = default;
|
|
@ -26,7 +26,7 @@ public:
|
|||
private:
|
||||
void setShowAdvanced();
|
||||
|
||||
Ui::TxConfDialog *ui;
|
||||
QScopedPointer<Ui::TxConfDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
PendingTransaction *m_tx;
|
||||
QString m_address;
|
||||
|
|
|
@ -100,6 +100,4 @@ void TxImportDialog::onImport() {
|
|||
m_ctx->refreshModels();
|
||||
}
|
||||
|
||||
TxImportDialog::~TxImportDialog() {
|
||||
delete ui;
|
||||
}
|
||||
TxImportDialog::~TxImportDialog() = default;
|
||||
|
|
|
@ -26,7 +26,7 @@ private slots:
|
|||
void onApiResponse(const DaemonRpc::DaemonResponse &resp);
|
||||
|
||||
private:
|
||||
Ui::TxImportDialog *ui;
|
||||
QScopedPointer<Ui::TxImportDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
UtilsNetworking *m_network;
|
||||
|
|
|
@ -226,7 +226,5 @@ TxProof TxProofDialog::getProof() {
|
|||
return proof;
|
||||
}
|
||||
|
||||
TxProofDialog::~TxProofDialog() {
|
||||
delete ui;
|
||||
}
|
||||
TxProofDialog::~TxProofDialog() = default;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ private:
|
|||
Mode m_mode;
|
||||
TransactionInfo::Direction m_direction;
|
||||
|
||||
Ui::TxProofDialog *ui;
|
||||
QScopedPointer<Ui::TxProofDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
};
|
||||
|
||||
|
|
|
@ -223,6 +223,4 @@ void UpdateDialog::setStatus(const QString &msg, bool success) {
|
|||
ui->label_body->setStyleSheet("");
|
||||
}
|
||||
|
||||
UpdateDialog::~UpdateDialog() {
|
||||
delete ui;
|
||||
}
|
||||
UpdateDialog::~UpdateDialog() = default;
|
|
@ -34,7 +34,7 @@ signals:
|
|||
private:
|
||||
void setStatus(const QString &msg, bool success = false);
|
||||
|
||||
Ui::UpdateDialog *ui;
|
||||
QScopedPointer<Ui::UpdateDialog> ui;
|
||||
|
||||
QString m_version;
|
||||
QString m_downloadUrl;
|
||||
|
|
|
@ -53,10 +53,7 @@ VerifyProofDialog::VerifyProofDialog(Wallet *wallet, QWidget *parent)
|
|||
ui->input_formattedProof->setFont(ModelUtils::getMonospaceFont());
|
||||
}
|
||||
|
||||
VerifyProofDialog::~VerifyProofDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
VerifyProofDialog::~VerifyProofDialog() = default;
|
||||
|
||||
void VerifyProofDialog::checkProof() {
|
||||
switch (ui->tabWidget->currentIndex()) {
|
||||
|
|
|
@ -31,7 +31,7 @@ private:
|
|||
void checkFormattedProof();
|
||||
void proofStatus(bool success, const QString &message);
|
||||
|
||||
Ui::VerifyProofDialog *ui;
|
||||
QScopedPointer<Ui::VerifyProofDialog> ui;
|
||||
Wallet *m_wallet;
|
||||
|
||||
QPixmap m_success;
|
||||
|
|
|
@ -54,7 +54,4 @@ void ViewOnlyDialog::copyToClipboad() {
|
|||
Utils::copyToClipboard(text);
|
||||
}
|
||||
|
||||
ViewOnlyDialog::~ViewOnlyDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
ViewOnlyDialog::~ViewOnlyDialog() = default;
|
||||
|
|
|
@ -23,7 +23,7 @@ private slots:
|
|||
void onWriteViewOnlyWallet();
|
||||
|
||||
private:
|
||||
Ui::ViewOnlyDialog *ui;
|
||||
QScopedPointer<Ui::ViewOnlyDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
void copyToClipboad();
|
||||
};
|
||||
|
|
|
@ -91,7 +91,4 @@ void WalletCacheDebugDialog::setOutput(const QString &output) {
|
|||
ui->output->setPlainText(output);
|
||||
}
|
||||
|
||||
WalletCacheDebugDialog::~WalletCacheDebugDialog() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
WalletCacheDebugDialog::~WalletCacheDebugDialog() = default;
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
private:
|
||||
void setOutput(const QString &output);
|
||||
Ui::WalletCacheDebugDialog *ui;
|
||||
QScopedPointer<Ui::WalletCacheDebugDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,9 +27,7 @@ WalletInfoDialog::WalletInfoDialog(QSharedPointer<AppContext> ctx, QWidget *pare
|
|||
this->adjustSize();
|
||||
}
|
||||
|
||||
WalletInfoDialog::~WalletInfoDialog() {
|
||||
delete ui;
|
||||
}
|
||||
WalletInfoDialog::~WalletInfoDialog() = default;
|
||||
|
||||
void WalletInfoDialog::openWalletDir() {
|
||||
QFileInfo file(m_ctx->wallet->keysPath());
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
private:
|
||||
void openWalletDir();
|
||||
|
||||
Ui::WalletInfoDialog *ui;
|
||||
QScopedPointer<Ui::WalletInfoDialog> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
};
|
||||
|
||||
|
|
|
@ -181,6 +181,4 @@ void HistoryWidget::showSyncNoticeMsg() {
|
|||
"To update the history page during synchronization press Ctrl+R.");
|
||||
}
|
||||
|
||||
HistoryWidget::~HistoryWidget() {
|
||||
delete ui;
|
||||
}
|
||||
HistoryWidget::~HistoryWidget() = default;
|
|
@ -56,7 +56,7 @@ private:
|
|||
void showContextMenu(const QPoint &point);
|
||||
void showSyncNoticeMsg();
|
||||
|
||||
Ui::HistoryWidget *ui;
|
||||
QScopedPointer<Ui::HistoryWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
QMenu *m_contextMenu;
|
||||
QMenu *m_copyMenu;
|
||||
|
|
|
@ -1424,6 +1424,4 @@ void MainWindow::toggleSearchbar(bool visible) {
|
|||
m_receiveWidget->focusSearchbar();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
delete ui;
|
||||
}
|
||||
MainWindow::~MainWindow() = default;
|
|
@ -206,7 +206,7 @@ private:
|
|||
void updateRecentlyOpened(const QString &filename);
|
||||
void updateWidgetIcons();
|
||||
|
||||
Ui::MainWindow *ui;
|
||||
QScopedPointer<Ui::MainWindow> ui;
|
||||
WindowManager *m_windowManager;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
|
|
|
@ -119,5 +119,4 @@ QrCodeScanDialog::~QrCodeScanDialog()
|
|||
m_thread->terminate();
|
||||
m_thread->wait();
|
||||
}
|
||||
delete ui;
|
||||
}
|
|
@ -37,7 +37,7 @@ private:
|
|||
void displayCameraError();
|
||||
void takeImage();
|
||||
|
||||
Ui::QrCodeScanDialog *ui;
|
||||
QScopedPointer<Ui::QrCodeScanDialog> ui;
|
||||
|
||||
QScopedPointer<QCamera> m_camera;
|
||||
QScopedPointer<QCameraImageCapture> m_imageCapture;
|
||||
|
|
|
@ -243,6 +243,4 @@ Monero::SubaddressRow* ReceiveWidget::currentEntry() {
|
|||
}
|
||||
}
|
||||
|
||||
ReceiveWidget::~ReceiveWidget() {
|
||||
delete ui;
|
||||
}
|
||||
ReceiveWidget::~ReceiveWidget() = default;
|
|
@ -50,7 +50,7 @@ private slots:
|
|||
void generateSubaddress();
|
||||
|
||||
private:
|
||||
Ui::ReceiveWidget *ui;
|
||||
QScopedPointer<Ui::ReceiveWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
QMenu *m_headerMenu;
|
||||
QAction *m_showFullAddressesAction;
|
||||
|
|
|
@ -302,6 +302,4 @@ void SendWidget::skinChanged() {
|
|||
}
|
||||
}
|
||||
|
||||
SendWidget::~SendWidget() {
|
||||
delete ui;
|
||||
}
|
||||
SendWidget::~SendWidget() = default;
|
|
@ -48,7 +48,7 @@ private:
|
|||
void setupComboBox();
|
||||
double amountDouble();
|
||||
|
||||
Ui::SendWidget *ui;
|
||||
QScopedPointer<Ui::SendWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
quint64 amount();
|
||||
double conversionAmount();
|
||||
|
|
|
@ -194,6 +194,4 @@ void Settings::setupLocalMoneroFrontendCombobox() {
|
|||
ui->combo_localMoneroFrontend->setCurrentIndex(ui->combo_localMoneroFrontend->findData(config()->get(Config::localMoneroFrontend).toString()));
|
||||
}
|
||||
|
||||
Settings::~Settings() {
|
||||
delete ui;
|
||||
}
|
||||
Settings::~Settings() = default;
|
|
@ -50,7 +50,7 @@ private:
|
|||
void setupSkinCombobox();
|
||||
void setupLocalMoneroFrontendCombobox();
|
||||
|
||||
Ui::Settings *ui;
|
||||
QScopedPointer<Ui::Settings> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
QStringList m_skins{"Native", "QDarkStyle", "Breeze/Dark", "Breeze/Light"};
|
||||
|
|
|
@ -143,10 +143,6 @@ void LocalMoneroWidget::searchOffers(int page) {
|
|||
m_api->sellMoneroOnline(currencyCode, countryCode, paymentMethod, amount, page);
|
||||
}
|
||||
|
||||
LocalMoneroWidget::~LocalMoneroWidget() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void LocalMoneroWidget::showContextMenu(const QPoint &point) {
|
||||
QModelIndex index = ui->treeView->indexAt(point);
|
||||
if (!index.isValid()) {
|
||||
|
@ -207,4 +203,6 @@ void LocalMoneroWidget::updatePaymentMethods() {
|
|||
ui->combo_paymentMethod->addItem(name, payment_method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LocalMoneroWidget::~LocalMoneroWidget() = default;
|
|
@ -41,7 +41,7 @@ private:
|
|||
void viewOfferDetails();
|
||||
void updatePaymentMethods();
|
||||
|
||||
Ui::LocalMoneroWidget *ui;
|
||||
QScopedPointer<Ui::LocalMoneroWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
||||
int m_currentPage = 0;
|
||||
|
|
|
@ -56,6 +56,4 @@ void RestoreHeightWidget::onRestoreHeightChanged() {
|
|||
ui->line_creationDate->setText(date.toString("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
RestoreHeightWidget::~RestoreHeightWidget() {
|
||||
delete ui;
|
||||
}
|
||||
RestoreHeightWidget::~RestoreHeightWidget() = default;
|
|
@ -26,7 +26,7 @@ private slots:
|
|||
void onRestoreHeightChanged();
|
||||
|
||||
private:
|
||||
Ui::RestoreHeightWidget *ui;
|
||||
QScopedPointer<Ui::RestoreHeightWidget> ui;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@ TickerWidgetBase::TickerWidgetBase(QWidget *parent, QSharedPointer<AppContext> c
|
|||
ui->tickerFiat->setText("...");
|
||||
}
|
||||
|
||||
TickerWidgetBase::~TickerWidgetBase() {
|
||||
delete ui;
|
||||
}
|
||||
TickerWidgetBase::~TickerWidgetBase() = default;
|
||||
|
||||
void TickerWidgetBase::setTitle(const QString &title) {
|
||||
ui->tickerBox->setTitle(title);
|
||||
|
|
|
@ -30,7 +30,7 @@ public slots:
|
|||
virtual void updateDisplay() = 0;
|
||||
|
||||
private:
|
||||
Ui::TickerWidget *ui;
|
||||
QScopedPointer<Ui::TickerWidget> ui;
|
||||
|
||||
protected:
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
|
|
|
@ -69,6 +69,4 @@ void CCSWidget::showContextMenu(const QPoint &pos) {
|
|||
m_contextMenu->exec(ui->tableView->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
CCSWidget::~CCSWidget() {
|
||||
delete ui;
|
||||
}
|
||||
CCSWidget::~CCSWidget() = default;
|
|
@ -40,7 +40,7 @@ private:
|
|||
void setupTable();
|
||||
void showContextMenu(const QPoint &pos);
|
||||
|
||||
Ui::CSSWidget *ui;
|
||||
QScopedPointer<Ui::CSSWidget> ui;
|
||||
CCSModel *m_model;
|
||||
QMenu *m_contextMenu;
|
||||
};
|
||||
|
|
|
@ -188,6 +188,4 @@ NodeModel* NodeWidget::model() {
|
|||
return m_wsModel;
|
||||
}
|
||||
|
||||
NodeWidget::~NodeWidget() {
|
||||
delete ui;
|
||||
}
|
||||
NodeWidget::~NodeWidget() = default;
|
||||
|
|
|
@ -44,8 +44,8 @@ signals:
|
|||
void nodeSourceChanged(NodeSource nodeSource);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::NodeWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
Ui::NodeWidget *ui;
|
||||
NodeModel* m_customModel;
|
||||
NodeModel* m_wsModel;
|
||||
|
||||
|
|
|
@ -74,6 +74,4 @@ QString RedditWidget::getLink(const QString &permaLink) {
|
|||
return QString("https://%1%2").arg(redditFrontend, permaLink);
|
||||
}
|
||||
|
||||
RedditWidget::~RedditWidget() {
|
||||
delete ui;
|
||||
}
|
||||
RedditWidget::~RedditWidget() = default;
|
|
@ -35,7 +35,7 @@ private:
|
|||
void copyUrl();
|
||||
QString getLink(const QString &permaLink);
|
||||
|
||||
Ui::RedditWidget *ui;
|
||||
QScopedPointer<Ui::RedditWidget> ui;
|
||||
RedditModel* const m_model;
|
||||
QMenu *m_contextMenu;
|
||||
};
|
||||
|
|
|
@ -300,6 +300,4 @@ QStandardItemModel *XMRigWidget::model() {
|
|||
return m_model;
|
||||
}
|
||||
|
||||
XMRigWidget::~XMRigWidget() {
|
||||
delete ui;
|
||||
}
|
||||
XMRigWidget::~XMRigWidget() = default;
|
|
@ -51,7 +51,7 @@ signals:
|
|||
private:
|
||||
void showContextMenu(const QPoint &pos);
|
||||
|
||||
Ui::XMRigWidget *ui;
|
||||
QScopedPointer<Ui::XMRigWidget> ui;
|
||||
QSharedPointer<AppContext> m_ctx;
|
||||
XmRig * m_XMRig;
|
||||
QStandardItemModel *m_model;
|
||||
|
|
Loading…
Reference in a new issue