Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax.
Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664).
Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax.
Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664).
Concept ACK. The new syntax has compile time checks, removing the need to debug impossible to find syntax errors during run time.
Concept ACK (because of @MarcoFalke's reasoning) Would make sense to change all of these at once.
Thanks, I'll complete it then.
@MarcoFalke @laanwj see new lint script, it can be improved later with other checks related to Qt. I don't know of a Qt way to prevent the old syntax.
Concept ACK
Concept ACK
see new lint script, it can be improved later with other checks related to Qt
LGTM
- found a connection to a private slot that doesn't work with the new syntax.
- connection to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664)
does this mean it's better to postpone this to a (far) future in which we can drop pre-5.7 support?
does this mean it's better to postpone this to a (far) future in which we can drop pre-5.7 support?
Not really, until now just a couple of these where I have to cast the slot.
oh if it can be worked around and is just a couple of cases, I agree it's not a big issue, just need to be careful to test all behavior afterwards.
<!--e57a25ab6845829454e8d69fc972939a-->Note to reviewers: This pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase
Rebased.
275 | - connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); 276 | - connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); 277 | - connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); 278 | - connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); 279 | - connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); 280 | + connect(overviewAction, &QAction::triggered, this, &BitcoinGUI::showNormalIfMinimized);
I don't think you can actually reach this when the application is hidden, but that can be addressed another time.
139 | // start with displaying the "out of sync" warnings 140 | showOutOfSyncWarning(true); 141 | - connect(ui->labelWalletStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks())); 142 | - connect(ui->labelTransactionsStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks())); 143 | + connect(ui->labelWalletStatus, &QPushButton::clicked, this, &OverviewPage::handleOutOfSyncWarningClicks); 144 | + connect(ui->labelWalletStatus, &QPushButton::clicked, this, &OverviewPage::handleOutOfSyncWarningClicks);
Duplicate line
Removed.
220 | + connect(copyTxHexAction, &QAction::triggered, this, &TransactionView::copyTxHex); 221 | + connect(copyTxPlainText, &QAction::triggered, this, &TransactionView::copyTxPlainText); 222 | + connect(editLabelAction, &QAction::triggered, this, &TransactionView::editLabel); 223 | + connect(showDetailsAction, &QAction::triggered, this, &TransactionView::showDetails); 224 | + // Double-clicking on a transaction on the transaction history page shows details 225 | + connect(this, &TransactionView::doubleClicked, this, &TransactionView::showDetails);
Note for other reviewers: this was moved from src/qt/walletview.cpp
Concept ACK. I'm a big fan of compile time checks. The new syntax also helps readability because you no longer have to guess the class name (e.g. QTableView) from the the variable name (e.g. ui->tableView).
Found a few problems with ba34538 on macOS 10.13.6 though (Qt 5.11.1 and 5.9.6):
Other than that I tested most connect instances and they all seem to work.
I ran into a bunch of existing issues, none of which are end of the world, but they're a distraction when reviewing if you don't know about them.
all console window commands cause a segfault, so much for compile time checks :-( @Sjors fixed in 5261ab0.
application hides when I navigate to a new tab (e.g. from Overview to Transactions); maybe some event needs to be not propagated?
Fixed in ac8661e.
Can confirm these issues are fixed in ac8661e.
<!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase
ehm... sorry, needs rebase again, if the remaining issues are solved we should merge this
Milestone
0.18.0