Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13710979
D4346.id13848.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Subscribers
None
D4346.id13848.diff
View Options
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -69,30 +69,28 @@
// Clicking on a transaction on the overview pre-selects the transaction on
// the transaction history page
- connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)),
- transactionView, SLOT(focusTransaction(QModelIndex)));
- connect(overviewPage, SIGNAL(outOfSyncWarningClicked()), this,
- SLOT(requestedSyncWarningInfo()));
+ connect(overviewPage, &OverviewPage::transactionClicked, transactionView,
+ static_cast<void (TransactionView::*)(const QModelIndex &)>(
+ &TransactionView::focusTransaction));
- // Highlight transaction after send
- connect(sendCoinsPage, SIGNAL(coinsSent(uint256)), transactionView,
- SLOT(focusTransaction(uint256)));
+ connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this,
+ &WalletView::requestedSyncWarningInfo);
- // Double-clicking on a transaction on the transaction history page shows
- // details
- connect(transactionView, SIGNAL(doubleClicked(QModelIndex)),
- transactionView, SLOT(showDetails()));
+ // Highlight transaction after send
+ connect(sendCoinsPage, &SendCoinsDialog::coinsSent, transactionView,
+ static_cast<void (TransactionView::*)(const uint256 &)>(
+ &TransactionView::focusTransaction));
// Clicking on "Export" allows to export the transaction list
- connect(exportButton, SIGNAL(clicked()), transactionView,
- SLOT(exportClicked()));
+ connect(exportButton, &QPushButton::clicked, transactionView,
+ &TransactionView::exportClicked);
// Pass through messages from sendCoinsPage
- connect(sendCoinsPage, SIGNAL(message(QString, QString, unsigned int)),
- this, SIGNAL(message(QString, QString, unsigned int)));
+ connect(sendCoinsPage, &SendCoinsDialog::message, this,
+ &WalletView::message);
// Pass through messages from transactionView
- connect(transactionView, SIGNAL(message(QString, QString, unsigned int)),
- this, SIGNAL(message(QString, QString, unsigned int)));
+ connect(transactionView, &TransactionView::message, this,
+ &WalletView::message);
// Set the model properly.
setWalletModel(walletModel);
@@ -104,32 +102,30 @@
if (gui) {
// Clicking on a transaction on the overview page simply sends you to
// transaction history page
- connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), gui,
- SLOT(gotoHistoryPage()));
+ connect(overviewPage, &OverviewPage::transactionClicked, gui,
+ &BitcoinGUI::gotoHistoryPage);
// Navigate to transaction history page after send
- connect(sendCoinsPage, SIGNAL(coinsSent(uint256)), gui,
- SLOT(gotoHistoryPage()));
+ connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui,
+ &BitcoinGUI::gotoHistoryPage);
// Receive and report messages
- connect(this, SIGNAL(message(QString, QString, unsigned int)), gui,
- SLOT(message(QString, QString, unsigned int)));
+ connect(
+ this, &WalletView::message,
+ [gui](const QString &title, const QString &message,
+ unsigned int style) { gui->message(title, message, style); });
// Pass through encryption status changed signals
- connect(this, SIGNAL(encryptionStatusChanged()), gui,
- SLOT(updateWalletStatus()));
+ connect(this, &WalletView::encryptionStatusChanged, gui,
+ &BitcoinGUI::updateWalletStatus);
// Pass through transaction notifications
- connect(this,
- SIGNAL(incomingTransaction(QString, int, Amount, QString,
- QString, QString, QString)),
- gui,
- SLOT(incomingTransaction(QString, int, Amount, QString, QString,
- QString, QString)));
+ connect(this, &WalletView::incomingTransaction, gui,
+ &BitcoinGUI::incomingTransaction);
// Connect HD enabled state signal
- connect(this, SIGNAL(hdEnabledStatusChanged()), gui,
- SLOT(updateWalletStatus()));
+ connect(this, &WalletView::hdEnabledStatusChanged, gui,
+ &BitcoinGUI::updateWalletStatus);
}
}
@@ -155,12 +151,12 @@
if (_walletModel) {
// Receive and pass through messages from wallet model
- connect(_walletModel, SIGNAL(message(QString, QString, unsigned int)),
- this, SIGNAL(message(QString, QString, unsigned int)));
+ connect(_walletModel, &WalletModel::message, this,
+ &WalletView::message);
// Handle changes in encryption status
- connect(_walletModel, SIGNAL(encryptionStatusChanged()), this,
- SIGNAL(encryptionStatusChanged()));
+ connect(_walletModel, &WalletModel::encryptionStatusChanged, this,
+ &WalletView::encryptionStatusChanged);
updateEncryptionStatus();
// update HD status
@@ -168,16 +164,16 @@
// Balloon pop-up for new transaction
connect(_walletModel->getTransactionTableModel(),
- SIGNAL(rowsInserted(QModelIndex, int, int)), this,
- SLOT(processNewTransaction(QModelIndex, int, int)));
+ &TransactionTableModel::rowsInserted, this,
+ &WalletView::processNewTransaction);
// Ask for passphrase if needed
- connect(_walletModel, SIGNAL(requireUnlock()), this,
- SLOT(unlockWallet()));
+ connect(_walletModel, &WalletModel::requireUnlock, this,
+ &WalletView::unlockWallet);
// Show progress dialog
- connect(_walletModel, SIGNAL(showProgress(QString, int)), this,
- SLOT(showProgress(QString, int)));
+ connect(_walletModel, &WalletModel::showProgress, this,
+ &WalletView::showProgress);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 09:57 (1 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5573177
Default Alt Text
D4346.id13848.diff (6 KB)
Attached To
D4346: Update qt/walletview.cpp with Qt5 syntax
Event Timeline
Log In to Comment