UI: use QScopedPointer

This commit is contained in:
tobtoht 2021-06-27 14:13:05 +02:00
parent 1afa06af91
commit bc21aed5af
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
92 changed files with 95 additions and 198 deletions

View file

@ -144,6 +144,4 @@ void CalcWidget::setupComboBox(QComboBox *comboBox, const QStringList &crypto, c
comboBox->addItems(fiat);
}
CalcWidget::~CalcWidget() {
delete ui;
}
CalcWidget::~CalcWidget() = default;

View file

@ -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;
};

View file

@ -23,6 +23,4 @@ void CalcWindow::closeEvent(QCloseEvent *foo) {
emit closed();
}
CalcWindow::~CalcWindow() {
delete ui;
}
CalcWindow::~CalcWindow() = default;

View file

@ -25,7 +25,7 @@ private:
void closeEvent(QCloseEvent *bar) override;
private:
Ui::CalcWindow *ui;
QScopedPointer<Ui::CalcWindow> ui;
};
#endif // CalcWindow_H

View file

@ -243,6 +243,4 @@ void CoinsWidget::thawCoins(const QVector<int> &indexes) {
m_ctx->updateBalance();
}
CoinsWidget::~CoinsWidget() {
delete ui;
}
CoinsWidget::~CoinsWidget() = default;

View file

@ -50,7 +50,7 @@ private:
Amount
};
Ui::CoinsWidget *ui;
QScopedPointer<Ui::CoinsWidget> ui;
QSharedPointer<AppContext> m_ctx;
QMenu *m_contextMenu;

View file

@ -150,7 +150,4 @@ void ContactsWidget::deleteContact()
m_model->deleteRow(m_proxyModel->mapToSource(index).row());
}
ContactsWidget::~ContactsWidget()
{
delete ui;
}
ContactsWidget::~ContactsWidget() = default;

View file

@ -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;

View file

@ -38,7 +38,5 @@ AboutDialog::AboutDialog(QWidget *parent)
this->adjustSize();
}
AboutDialog::~AboutDialog() {
delete ui;
}
AboutDialog::~AboutDialog() = default;

View file

@ -21,7 +21,7 @@ public:
~AboutDialog() override;
private:
Ui::AboutDialog *ui;
QScopedPointer<Ui::AboutDialog> ui;
QStringListModel *m_model;
};

View file

@ -103,6 +103,4 @@ Monero::SubaddressAccountRow* AccountSwitcherDialog::currentEntry() {
return m_ctx->wallet->subaddressAccountModel()->entryFromIndex(index);
}
AccountSwitcherDialog::~AccountSwitcherDialog() {
delete ui;
}
AccountSwitcherDialog::~AccountSwitcherDialog() = default;

View file

@ -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;

View file

@ -22,6 +22,4 @@ BalanceDialog::BalanceDialog(QWidget *parent, Wallet *wallet)
this->adjustSize();
}
BalanceDialog::~BalanceDialog() {
delete ui;
}
BalanceDialog::~BalanceDialog() = default;

View file

@ -21,7 +21,7 @@ public:
~BalanceDialog() override;
private:
Ui::BalanceDialog *ui;
QScopedPointer<Ui::BalanceDialog> ui;
};
#endif //FEATHER_BALANCEDIALOG_H

View file

@ -56,6 +56,4 @@ void BroadcastTxDialog::onApiResponse(const DaemonRpc::DaemonResponse &resp) {
}
}
BroadcastTxDialog::~BroadcastTxDialog() {
delete ui;
}
BroadcastTxDialog::~BroadcastTxDialog() = default;

View file

@ -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;

View file

@ -97,6 +97,4 @@ void CalcConfigDialog::fillListWidgets() {
setChecked(ui->list_fiat, checkedFiatCurrencies);
}
CalcConfigDialog::~CalcConfigDialog() {
delete ui;
}
CalcConfigDialog::~CalcConfigDialog() = default;

View file

@ -32,7 +32,7 @@ private:
void fillListWidgets();
QListWidget* getVisibleListWidget();
Ui::CalcConfigDialog *ui;
QScopedPointer<Ui::CalcConfigDialog> ui;
};

View file

@ -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;

View file

@ -22,7 +22,7 @@ public:
QString getName();
private:
Ui::ContactsDialog *ui;
QScopedPointer<Ui::ContactsDialog> ui;
QString m_address;
QString m_name;

View file

@ -146,6 +146,4 @@ void DebugInfoDialog::copyToClipboad() {
Utils::copyToClipboard(text);
}
DebugInfoDialog::~DebugInfoDialog() {
delete ui;
}
DebugInfoDialog::~DebugInfoDialog() = default;

View file

@ -25,7 +25,7 @@ private:
void copyToClipboad();
void updateInfo();
Ui::DebugInfoDialog *ui;
QScopedPointer<Ui::DebugInfoDialog> ui;
QSharedPointer<AppContext> m_ctx;
QTimer m_updateTimer;

View file

@ -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;

View file

@ -19,7 +19,7 @@ public:
~InfoDialog() override;
private:
Ui::InfoDialog *ui;
QScopedPointer<Ui::InfoDialog> ui;
};

View file

@ -22,7 +22,4 @@ KeysDialog::KeysDialog(QSharedPointer<AppContext> ctx, QWidget *parent)
this->adjustSize();
}
KeysDialog::~KeysDialog()
{
delete ui;
}
KeysDialog::~KeysDialog() = default;

View file

@ -20,7 +20,7 @@ public:
~KeysDialog() override;
private:
Ui::KeysDialog *ui;
QScopedPointer<Ui::KeysDialog> ui;
};

View file

@ -46,6 +46,4 @@ void LocalMoneroInfoDialog::onGoToOffer() {
Utils::externalLinkWarning(this, offerUrl);
}
LocalMoneroInfoDialog::~LocalMoneroInfoDialog() {
delete ui;
}
LocalMoneroInfoDialog::~LocalMoneroInfoDialog() = default;

View file

@ -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;
};

View file

@ -37,6 +37,4 @@ OutputInfoDialog::OutputInfoDialog(CoinsInfo *cInfo, QWidget *parent)
this->adjustSize();
}
OutputInfoDialog::~OutputInfoDialog() {
delete ui;
}
OutputInfoDialog::~OutputInfoDialog() = default;

View file

@ -21,7 +21,7 @@ public:
~OutputInfoDialog() override;
private:
Ui::OutputInfoDialog *ui;
QScopedPointer<Ui::OutputInfoDialog> ui;
};

View file

@ -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;

View file

@ -24,7 +24,7 @@ public:
int outputs() const;
private:
Ui::OutputSweepDialog *ui;
QScopedPointer<Ui::OutputSweepDialog> ui;
uint64_t m_amount;

View file

@ -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();

View file

@ -20,7 +20,7 @@ public:
~PasswordChangeDialog() override;
private:
Ui::PasswordChangeDialog *ui;
QScopedPointer<Ui::PasswordChangeDialog> ui;
Wallet *m_wallet;
void passwordsMatch();

View file

@ -22,7 +22,4 @@ PasswordDialog::PasswordDialog(const QString &walletName, bool incorrectPassword
this->adjustSize();
}
PasswordDialog::~PasswordDialog()
{
delete ui;
}
PasswordDialog::~PasswordDialog() = default;

View file

@ -21,7 +21,7 @@ public:
QString password = "";
private:
Ui::PasswordDialog *ui;
QScopedPointer<Ui::PasswordDialog> ui;
};
#endif //FEATHER_PASSWORDDIALOG_H

View file

@ -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);

View file

@ -24,7 +24,7 @@ private:
void copyImage();
void saveImage();
Ui::QrCodeDialog *ui;
QScopedPointer<Ui::QrCodeDialog> ui;
QPixmap m_pixmap;
};

View file

@ -62,7 +62,4 @@ void SeedDialog::setSeed(const QString &seed) {
"</ul>").arg(words));
}
SeedDialog::~SeedDialog()
{
delete ui;
}
SeedDialog::~SeedDialog() = default;

View file

@ -22,7 +22,7 @@ public:
private:
void setSeed(const QString &seed);
Ui::SeedDialog *ui;
QScopedPointer<Ui::SeedDialog> ui;
QSharedPointer<AppContext> m_ctx;
};

View file

@ -52,7 +52,4 @@ void SignVerifyDialog::copyToClipboard() {
Utils::copyToClipboard(sig.join("\n"));
}
SignVerifyDialog::~SignVerifyDialog()
{
delete ui;
}
SignVerifyDialog::~SignVerifyDialog() = default;

View file

@ -20,7 +20,7 @@ public:
~SignVerifyDialog() override;
private:
Ui::SignVerifyDialog *ui;
QScopedPointer<Ui::SignVerifyDialog> ui;
Wallet *m_wallet;
private slots:

View file

@ -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;

View file

@ -22,7 +22,7 @@ public:
void setIcon(const QPixmap &icon);
private:
Ui::SplashDialog *ui;
QScopedPointer<Ui::SplashDialog> ui;
};
#endif //FEATHER_SPLASHDIALOG_H

View file

@ -165,6 +165,4 @@ void TorInfoDialog::onShowInitSyncConfigDialog() {
}
}
TorInfoDialog::~TorInfoDialog() {
delete ui;
}
TorInfoDialog::~TorInfoDialog() = default;

View file

@ -38,7 +38,7 @@ private:
void initConnectionSettings();
void initPrivacyLevel();
Ui::TorInfoDialog *ui;
QScopedPointer<Ui::TorInfoDialog> ui;
QSharedPointer<AppContext> m_ctx;
};

View file

@ -134,6 +134,4 @@ void TransactionInfoDialog::createTxProof() {
m_txProofDialog->show();
}
TransactionInfoDialog::~TransactionInfoDialog() {
delete ui;
}
TransactionInfoDialog::~TransactionInfoDialog() = default;

View file

@ -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;

View file

@ -184,6 +184,4 @@ void TxConfAdvDialog::closeDialog() {
QDialog::reject();
}
TxConfAdvDialog::~TxConfAdvDialog() {
delete ui;
}
TxConfAdvDialog::~TxConfAdvDialog() = default;

View file

@ -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;

View file

@ -86,6 +86,4 @@ void TxConfDialog::setShowAdvanced() {
QDialog::reject();
}
TxConfDialog::~TxConfDialog() {
delete ui;
}
TxConfDialog::~TxConfDialog() = default;

View file

@ -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;

View file

@ -100,6 +100,4 @@ void TxImportDialog::onImport() {
m_ctx->refreshModels();
}
TxImportDialog::~TxImportDialog() {
delete ui;
}
TxImportDialog::~TxImportDialog() = default;

View file

@ -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;

View file

@ -226,7 +226,5 @@ TxProof TxProofDialog::getProof() {
return proof;
}
TxProofDialog::~TxProofDialog() {
delete ui;
}
TxProofDialog::~TxProofDialog() = default;

View file

@ -49,7 +49,7 @@ private:
Mode m_mode;
TransactionInfo::Direction m_direction;
Ui::TxProofDialog *ui;
QScopedPointer<Ui::TxProofDialog> ui;
QSharedPointer<AppContext> m_ctx;
};

View file

@ -223,6 +223,4 @@ void UpdateDialog::setStatus(const QString &msg, bool success) {
ui->label_body->setStyleSheet("");
}
UpdateDialog::~UpdateDialog() {
delete ui;
}
UpdateDialog::~UpdateDialog() = default;

View file

@ -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;

View file

@ -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()) {

View file

@ -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;

View file

@ -54,7 +54,4 @@ void ViewOnlyDialog::copyToClipboad() {
Utils::copyToClipboard(text);
}
ViewOnlyDialog::~ViewOnlyDialog()
{
delete ui;
}
ViewOnlyDialog::~ViewOnlyDialog() = default;

View file

@ -23,7 +23,7 @@ private slots:
void onWriteViewOnlyWallet();
private:
Ui::ViewOnlyDialog *ui;
QScopedPointer<Ui::ViewOnlyDialog> ui;
QSharedPointer<AppContext> m_ctx;
void copyToClipboad();
};

View file

@ -91,7 +91,4 @@ void WalletCacheDebugDialog::setOutput(const QString &output) {
ui->output->setPlainText(output);
}
WalletCacheDebugDialog::~WalletCacheDebugDialog() {
delete ui;
}
WalletCacheDebugDialog::~WalletCacheDebugDialog() = default;

View file

@ -21,7 +21,7 @@ public:
private:
void setOutput(const QString &output);
Ui::WalletCacheDebugDialog *ui;
QScopedPointer<Ui::WalletCacheDebugDialog> ui;
QSharedPointer<AppContext> m_ctx;
};

View file

@ -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());

View file

@ -23,7 +23,7 @@ public:
private:
void openWalletDir();
Ui::WalletInfoDialog *ui;
QScopedPointer<Ui::WalletInfoDialog> ui;
QSharedPointer<AppContext> m_ctx;
};

View file

@ -181,6 +181,4 @@ void HistoryWidget::showSyncNoticeMsg() {
"To update the history page during synchronization press Ctrl+R.");
}
HistoryWidget::~HistoryWidget() {
delete ui;
}
HistoryWidget::~HistoryWidget() = default;

View file

@ -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;

View file

@ -1424,6 +1424,4 @@ void MainWindow::toggleSearchbar(bool visible) {
m_receiveWidget->focusSearchbar();
}
MainWindow::~MainWindow() {
delete ui;
}
MainWindow::~MainWindow() = default;

View file

@ -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;

View file

@ -119,5 +119,4 @@ QrCodeScanDialog::~QrCodeScanDialog()
m_thread->terminate();
m_thread->wait();
}
delete ui;
}

View file

@ -37,7 +37,7 @@ private:
void displayCameraError();
void takeImage();
Ui::QrCodeScanDialog *ui;
QScopedPointer<Ui::QrCodeScanDialog> ui;
QScopedPointer<QCamera> m_camera;
QScopedPointer<QCameraImageCapture> m_imageCapture;

View file

@ -243,6 +243,4 @@ Monero::SubaddressRow* ReceiveWidget::currentEntry() {
}
}
ReceiveWidget::~ReceiveWidget() {
delete ui;
}
ReceiveWidget::~ReceiveWidget() = default;

View file

@ -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;

View file

@ -302,6 +302,4 @@ void SendWidget::skinChanged() {
}
}
SendWidget::~SendWidget() {
delete ui;
}
SendWidget::~SendWidget() = default;

View file

@ -48,7 +48,7 @@ private:
void setupComboBox();
double amountDouble();
Ui::SendWidget *ui;
QScopedPointer<Ui::SendWidget> ui;
QSharedPointer<AppContext> m_ctx;
quint64 amount();
double conversionAmount();

View file

@ -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;

View file

@ -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"};

View file

@ -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;

View file

@ -41,7 +41,7 @@ private:
void viewOfferDetails();
void updatePaymentMethods();
Ui::LocalMoneroWidget *ui;
QScopedPointer<Ui::LocalMoneroWidget> ui;
QSharedPointer<AppContext> m_ctx;
int m_currentPage = 0;

View file

@ -56,6 +56,4 @@ void RestoreHeightWidget::onRestoreHeightChanged() {
ui->line_creationDate->setText(date.toString("yyyy-MM-dd"));
}
RestoreHeightWidget::~RestoreHeightWidget() {
delete ui;
}
RestoreHeightWidget::~RestoreHeightWidget() = default;

View file

@ -26,7 +26,7 @@ private slots:
void onRestoreHeightChanged();
private:
Ui::RestoreHeightWidget *ui;
QScopedPointer<Ui::RestoreHeightWidget> ui;
};

View file

@ -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);

View file

@ -30,7 +30,7 @@ public slots:
virtual void updateDisplay() = 0;
private:
Ui::TickerWidget *ui;
QScopedPointer<Ui::TickerWidget> ui;
protected:
QSharedPointer<AppContext> m_ctx;

View file

@ -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;

View file

@ -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;
};

View file

@ -188,6 +188,4 @@ NodeModel* NodeWidget::model() {
return m_wsModel;
}
NodeWidget::~NodeWidget() {
delete ui;
}
NodeWidget::~NodeWidget() = default;

View file

@ -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;

View file

@ -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;

View file

@ -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;
};

View file

@ -300,6 +300,4 @@ QStandardItemModel *XMRigWidget::model() {
return m_model;
}
XMRigWidget::~XMRigWidget() {
delete ui;
}
XMRigWidget::~XMRigWidget() = default;

View file

@ -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;