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).
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.
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.
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);
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);
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);
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.
promag
MarcoFalke
laanwj
jonasschnelli
fanquake
DrahtBot
Sjors
Labels
GUI
Refactoring
Milestone
0.18.0