aboutsummaryrefslogtreecommitdiff
path: root/src/qt
AgeCommit message (Collapse)Author
2022-04-09qt: Remove `QApplication::globalStrut()` callHennadii Stepanov
This function has been deprecated in Qt 5.15.0, and has been removed in Qt 6 (see 033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b upstream commit).
2022-04-09qt: Update deprecated enum valueHennadii Stepanov
This change is preparation for Qt 6, and it fixes an experimental build with Qt 6.2.4. The `Qt::ItemIsTristate` value has been deprecated since 5.6.0 (see ae8406d82f541f6d9112bdac192e5e4e114d56aa upstream commit).
2022-04-09qt: Use `|` instead of `+` for key modifiersHennadii Stepanov
This change is preparation for Qt 6 where `+` has been deprecated, and it fixes an experimental build with Qt 6.2.4.
2022-04-09qt: Fix headersHennadii Stepanov
This change is preparation for Qt 6, and it fixes an experimental build with Qt 6.2.4.
2022-04-06gui, refactor: rename fInvalid to num_test_failures in test_main.cppJon Atack
2022-04-06gui: count test failures in test runner summaryJon Atack
2022-04-06gui: add test runner summaryJon Atack
2022-04-06lint: remove qt SIGNAL/SLOT lintfanquake
I think we are past the point where we need to lint for this, the CPU can probably be better utilized.
2022-04-06doc: Convert remaining comments to clang-tidy formatMarcoFalke
2022-04-04Merge bitcoin-core/gui#569: test: add regression test for #567Hennadii Stepanov
4d4dca43fc591bf8fae7af74670f6e96650ef34b test: add regression test for bitcoin-core/gui/issues/567 (Vasil Dimov) 3b82608dd11d35fa393ee0501c206d74c748248a options: add a comment for -listenonion and dedup a long expression (Vasil Dimov) Pull request description: Add a test that would fail, should https://github.com/bitcoin-core/gui/issues/567 resurface. Also, add a comment and dedup a long expression. ACKs for top commit: jarolrod: reACK 4d4dca43fc jonatack: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b hebasto: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b, tested with reverting changes from bitcoin-core/gui#568, and getting an expected test failure. shaavan: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b Tree-SHA512: 59f069bdaa84586bb599e9372f89e4e66a3cafcbf58677fdf913d685c17dfa9c3d5b118829d81021a9a33b4fd8e46d4c7eb68c1dd902cf1c44a41b8e66e2967b
2022-04-04refactor: fix clang-tidy named args usagefanquake
2022-04-03Merge bitcoin-core/gui#557: Revert "qt: Do not use QObject::tr plural syntax ↵Hennadii Stepanov
for numbers with a unit symbol" 0c64401324b03f5576149bf27138cdb103dae934 Revert "qt: Do not use QObject::tr plural syntax for numbers with a unit symbol" (Luke Dashjr) Pull request description: Apparently this got forgotten. Maybe too late for 23.x (it's a bugfix, but changes translation strings). This reverts commit 3adde72bc99215062c8dabd38f8c34ad093452b5 (#296) per [GChuf](https://github.com/bitcoin-core/gui/pull/296#issuecomment-962516055) >I can confirm for slovenian and other slavic languages that we do have 3 or 4 different ways of saying "%n GB needed%, depending on the actual number of gigabytes. Similar to english "is/are". There's no way to cover all cases ... this is exactly why transifex allows you to have more than 2 options. ACKs for top commit: hebasto: ACK 0c64401324b03f5576149bf27138cdb103dae934, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: c01bae44a32b3ec324f2f9b8e4923bbb2e83bbd1460b745c5c911b98a9b2806fcbf815cfb19a1f1a7038c5c14312e102e7df8744c9002ef784b36d158e08eb14
2022-04-01test: add regression test for bitcoin-core/gui/issues/567Vasil Dimov
2022-03-31options: add a comment for -listenonion and dedup a long expressionVasil Dimov
A followup to https://github.com/bitcoin-core/gui/pull/568 Co-authored-by: Jon Atack <jon@atack.com>
2022-03-25Merge bitcoin/bitcoin#24494: wallet: generate random change target for each ↵fanquake
tx for better privacy 9053f64fcbd26d87c26ae6b982d17756a6ea0896 [doc] release notes for random change target (glozow) 46f2fed6c5e0fa623bfeabf61ba4811d5cf8f47c [wallet] remove MIN_CHANGE (glozow) a44236addd01cff4e4d751e0f379d399fbfc8eae [wallet] randomly generate change targets (glozow) 1e52e6bd0a8888efb4ed247d74ec7ca9dfc2e002 refactor coin selection for parameterizable change target (glozow) Pull request description: Closes #24458 - the wallet always chooses 1 million sats as its change target, making it easier to fingerprint transactions created by the Core wallet. Instead of using a fixed value, choose one randomly each time (within a range). Using 50ksat (around $20) as the lower bound and `min(1 million sat, 2 * average payment value)` as the upper bound. RFC: If the payment is <25ksat, this doesn't work, so we're using the range (payment amount, 50ksat) instead. ACKs for top commit: achow101: ACK 9053f64fcbd26d87c26ae6b982d17756a6ea0896 Xekyo: reACK 9053f64fcbd26d87c26ae6b982d17756a6ea0896 Tree-SHA512: 45ce5d064697065549473347648e29935733f3deffc71a6ab995449431f60302d1f9911a0994dfdb960b48c48b5d8859f168b396ff2a62db67d535a7db041d35
2022-03-25Merge bitcoin/bitcoin#24666: refactor: Fix coinselection.h include, Make ↵fanquake
COutput a struct fab287cedde85b21622d767d3ece65291e18b0bf Clarify that COutput is a struct, not a class (MarcoFalke) fa61cdf464381dddd9da076b1a1cab95ff5b3baf wallet: Fix coinselection include (MarcoFalke) Pull request description: * Fix include (see commit message) * `{}`-init, see https://github.com/bitcoin/bitcoin/pull/24091#discussion_r831193284 * `struct`, see https://github.com/bitcoin/bitcoin/pull/24091#discussion_r831192702 ACKs for top commit: theStack: Code-review ACK fab287cedde85b21622d767d3ece65291e18b0bf Tree-SHA512: dd2cfb9c06a92295dbd8fbb6d56afcf00ebda2a0440e301d392cd183d1b9cd87626311d539e302a9e6c6521d69d6183c74a51934e3fc16e64a5dcaba60c7e3ce
2022-03-25Merge bitcoin/bitcoin#21160: net/net processing: Move tx inventory into ↵fanquake
net_processing 1066d10f71e6800c78012d789ff6ae19df0243fe scripted-diff: rename TxRelay members (John Newbery) 575bbd0dea6d12510fdf3220d0f0e47d969da6e9 [net processing] Move tx relay data to Peer (John Newbery) 785f55f7eeab0dedbeb8e0d0b459f3bdc538b621 [net processing] Move m_wtxid_relay to Peer (John Newbery) 36346703f8558d6781c079c29ddece5a97477beb [net] Add CNode.m_relays_txs and CNode.m_bloom_filter_loaded (John Newbery) Pull request description: This continues the work of moving application layer data into net_processing, by moving all tx data into the new Peer object added in #19607. For motivation, see #19398. ACKs for top commit: dergoegge: ACK 1066d10f71e6800c78012d789ff6ae19df0243fe - This is a good layer separation improvement with no behavior changes. glozow: utACK 1066d10f71e6800c78012d789ff6ae19df0243fe Tree-SHA512: 0c9d6b8a0a05e2d816b6d6588b7df133842ec960ae67667813422aa7bd8eb5308599c714f3822a98ddbdf364ffab9050b055079277ba4aff24092557ff99ebcc
2022-03-25[wallet] remove MIN_CHANGEglozow
2022-03-25wallet: Fix coinselection includeMarcoFalke
coinselection.h is not used by wallet.h but by qt/coincontroldialog.cpp
2022-03-23options: flip listenonion to false if not listeningVasil Dimov
If the user has unchecked "Allow incoming connections" in `Settings->Options...->Network` then `fListen=false` is saved in `~/.config/Bitcoin/Bitcoin-Qt.conf`. This flips `-listen` to `false` during startup, but leaves `-listenonion` to `true`. This flipping of `-listen` is done in `OptionsModel::Init()` after `InitParameterInteraction()` has been executed which would have flipped `-listenonion`, should it have seen `-listen` being `false` (this is a difference between `bitcoind` and `bitcoin-qt`). Fixes: https://github.com/bitcoin-core/gui/issues/567
2022-03-22qt: Avoid potential -Wdeprecated-enum-enum-conversion warningHennadii Stepanov
2022-03-22qt: Use human-readable strings in preference to hard-coded integersHennadii Stepanov
This is recommended by Qt docs. See: https://doc.qt.io/qt-5/qkeysequence.html#details Also this change avoids -Wdeprecated-enum-enum-conversion warnings.
2022-03-20Merge bitcoin-core/gui#554: Add and improve translator comments and tooltips ↵Hennadii Stepanov
for peers tab address fields 4d2b503d6cbb593cf75cf053fd480de64b3f4fc0 gui: improve "Addresses Rate-Limited" translator comments and tooltip in peers tab (Jon Atack) 81ef1f7ef182050efaed7ab40b1b159a8ada3739 gui: improve "Addresses Processed" translator comments and tooltip in peers tab (Jon Atack) 77f24aac52288532f2a818e49482b0d4761dff27 gui: improve "Address Relay" translator comments and tooltip in peers tab (Jon Atack) Pull request description: Per translator feedback in this thread: https://github.com/bitcoin-core/gui/pull/526#discussion_r809237830 *"The lack of string context in Transifex is a real problem for this project, as proper context (dev notes and/or screenshots) are essential to achieve quality translations."* This pull adds developer notes for transifex translators via `extracomment` tags, and it improves the existing ones and their tooltips with more context, clarity and completeness for the following peer tab fields as a follow-up to bitcoin-core/gui#526: - address relay - addresses processed - addressed rate-limited It looks like only six lines of diff, but they are loooong lines. If this is the right direction, the same can be done for other fields in follow-ups. ACKs for top commit: jarolrod: re-ACK [4d2b503](https://github.com/bitcoin-core/gui/commit/4d2b503d6cbb593cf75cf053fd480de64b3f4fc0) hebasto: ACK 4d2b503d6cbb593cf75cf053fd480de64b3f4fc0, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: a185f46a66375a5fd6854640745b7d1d00740cf7be58db03256f44d71acc351e1770de137cb3bc9c1f0ea3cabd7cfa1cb1ccb87ec0df222680924ca3dab6c8bf
2022-03-18scripted-diff: rename TxRelay membersJohn Newbery
-BEGIN VERIFY SCRIPT- ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); } ren cs_filter m_bloom_filter_mutex ren fRelayTxes m_relay_txs ren pfilter m_bloom_filter ren cs_tx_inventory m_tx_inventory_mutex ren filterInventoryKnown m_tx_inventory_known_filter ren setInventoryTxToSend m_tx_inventory_to_send ren fSendMempool m_send_mempool ren nNextInvSend m_next_inv_send_time ren minFeeFilter m_fee_filter_received ren lastSentFeeFilter m_fee_filter_sent -END VERIFY SCRIPT-
2022-03-18[net processing] Move tx relay data to PeerJohn Newbery
2022-03-17Merge bitcoin-core/gui#555: Restore Send button when using external signerHennadii Stepanov
2efdfb88aab6496dcf2b98e0de30635bc6bade85 gui: restore Send for external signer (Sjors Provoost) 4b5a6cd14967b8ec3cb525e4cb18628de6c15091 refactor: helper function signWithExternalSigner() (Sjors Provoost) 026b5b4523317fdefc69cf5cec55f76f18ad0c0a move-only: helper function to present PSBT (Sjors Provoost) Pull request description: Fixes #551 For the simplest use case of a wallet with one external signer and "PSBT Controls" disabled in settings (the default), the send dialog will behave the same as when using a wallet with private keys. I.e. there's no "Create Unsigned" button. When PSBT controls are turned on, you can now actually make a PSBT with signing it; before this PR that button would trigger a sign event and would broadcast the transaction. In case a multisig, the Send button will sign on the device, and then fall back to presenting a PSBT (same behavior as before #441). This PR starts with two refactoring commits to move some stuff into a helper function for improved readability in general, and to make the main commit easier to review. ACKs for top commit: jonatack: utACK 2efdfb88aab6496dcf2b98e0de30635bc6bade85 diff review since my last review, code re-review, rebased to current master, verified clean debug build of each commit luke-jr: utACK 2efdfb88aab6496dcf2b98e0de30635bc6bade85 Tree-SHA512: e8731a0ef9e87564b2676c7b022b742d9621bba964c19dba9fd9f6961eb608737a9e1a22c0a3c8b2f2f6d583bba067606ee8392422e82082deefb20ea7b88c7c
2022-03-16gui: restore Send for external signerSjors Provoost
Before this change the send confirmation dialog would keep the Send option disabled. The Create Unsigned choice would actually send. This is potentially confusing. With this change the Create Unsigned button will not attempt to sign and always produce a PSBT. The Send button will attempt to sign, and only return a PSBT if more signatures are needed. When using an external signer, the Create Unsigned option only appears when PSBT controls are enabled in the wallet settings. This commit maintains the pre-existing behavior of filling the PSBT (without signing) even when not using an external signer. Closes #551 Co-authored-by: Jon Atack <jon@atack.com>
2022-03-16refactor: helper function signWithExternalSigner()Sjors Provoost
Does not change behavior. Review hint: git show --color-moved --color-moved-ws=allow-indentation-change
2022-03-16gui: peersWidget - ResizeToContents Age and IP/Netmask columnsrandymcmillan
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-03-16gui: add Age column to peers tabrandymcmillan
Co-authored-by: Jon Atack <jon@atack.com>
2022-03-16gui: add FormatPeerAge() utility helperJon Atack
Co-authored-by: randymcmillan <randy.lee.mcmillan@gmail.com>
2022-03-10Merge bitcoin-core/gui#563: qt: Remove network detection based on address in ↵Hennadii Stepanov
BIP21 b7dbc83f23f67048cd6f66f5587381d73fad4894 qt: Remove network detection based on address in BIP21 (laanwj) Pull request description: This is removes some ugly and brittle code that switches the global network to testnet based on a provided address. I think in practice it's very unlikely for testnet BIP21 payment URIs to be used, and if so it's for testing so it's easy enough to manually copy it. Or to specify `-testnet` explicitly. There is already no such case for `-regtest` or `-signet`. After this change it will only accept addresses for the explicitly selected network. Others will result in a "wrong network" popup. There is also a possibility for refactor after this as the initialization order of `PaymentServer::ipcParseCommandLine` isn't important anymore (well, it still has to be before `PaymentServer::ipcSendCommandLine`, maybe even merged with it), but I have not done so here. ACKs for top commit: jonatack: ACK b7dbc83f23f67048cd6f66f5587381d73fad4894 achow101: ACK b7dbc83f23f67048cd6f66f5587381d73fad4894 Tree-SHA512: ebc77c0e5c98f53fe254bcd0f94c9d1c06937b794346e95b14158860d5c607515e71d73b782d2726674dce86d6d4001085d473c6d1bc11c5e6c25ff3fb3cfa22
2022-03-10qt: Remove network detection based on address in BIP21laanwj
This is some very ugly and brittle code that switches the global network based on a provided address, remove it. I think in practice it's very unlikely for testnet BIP21 payment URIs to be used, and if so it's for testing so it's easy enough to manually copy it. Or to specify `-testnet` explicitly. There is already no case for `-regtest` or `-signet`.
2022-03-07qt: Avoid crash on startup if int specified in settings.jsonRyan Ofsky
Fix GUI startup crash reported by Rspigler in https://github.com/bitcoin/bitcoin/issues/24457 that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune). Fix is a one-line change in ArgsManager::GetArg.
2022-03-07test: Add tests for GetArg methods / settings.json type coercionRyan Ofsky
Just add tests. No changes to application behavior. Tests will be updated in the next commit changing & improving current behavior. Include a Qt test for GUI startup crash reported by Rspigler in https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg behavior that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07Merge bitcoin/bitcoin#24132: build: Bump minimum Qt version to 5.11.3fanquake
956f7322f60db7b8be551c9074b4c633e514079d build: Bump minimum Qt version to 5.11.3 (Hennadii Stepanov) e22d10b936eb7563b2b6611332d9e4c73a2f59d4 ci: Switch from bionic to buster (Hennadii Stepanov) Pull request description: The current minimum Qt version is 5.9.5 which has been set in bitcoin/bitcoin#21286. Distro support: - centos 7 -- unsupported since bitcoin/bitcoin#23511 - centos 8 -- [5.15.2](http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/qt5-qtbase-5.15.2-3.el8.x86_64.rpm) - buster -- [5.11.3](https://packages.debian.org/buster/libqt5core5a) - bullseye -- [5.15.2](https://packages.debian.org/bullseye/libqt5core5a) - _bionic_ -- [5.9.5](https://packages.ubuntu.com/bionic/libqt5core5a) - focal -- [5.12.8](https://packages.ubuntu.com/focal/libqt5core5a) As another Ubuntu LTS is coming soon, it seems unreasonable to stick to Qt 5.9 which support [ended](https://www.qt.io/blog/2017/06/07/renewed-qt-support-services) on 2020-05-31. Anyway, it's still possible to build Bitcoin Core GUI with depends on bionic system. Bumping the minimum Qt version allows to make code safer and more reliable, e.g.: - functor-parameter overload of [`QMetaObject::invokeMethod`](https://doc.qt.io/qt-5/qmetaobject.html#invokeMethod-4) - fixed https://bugreports.qt.io/browse/QTBUG-10907 An example of the patch using the functor-overload of `QMetaObject::invokeMethod`: ```diff --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -349,7 +349,7 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri static void NotifyUnload(WalletModel* walletModel) { qDebug() << "NotifyUnload"; - bool invoked = QMetaObject::invokeMethod(walletModel, "unload"); + bool invoked = QMetaObject::invokeMethod(walletModel, &WalletModel::unload); assert(invoked); } ``` It uses the same new syntax as signal-slot connection with compile-time check. Also see bitcoin/bitcoin#16348. This PR is intended to be merged early [after](https://github.com/bitcoin/bitcoin/issues/22969) branching `23.x` off. ACKs for top commit: MarcoFalke: cr ACK 956f7322f60db7b8be551c9074b4c633e514079d fanquake: ACK 956f7322f60db7b8be551c9074b4c633e514079d Tree-SHA512: 3d652bcdcd990ce785ad412ed70234d4f27743895e535a53ed44b35d4afc3052e066c4c84f417e30bc53d0a3dd9ebed62444c57b7c765cb1e9aa687fbf866877
2022-03-06gui: improve "Addresses Rate-Limited" translator comments and tooltip in ↵Jon Atack
peers tab
2022-03-06gui: improve "Addresses Processed" translator comments and tooltip in peers tabJon Atack
2022-03-06gui: improve "Address Relay" translator comments and tooltip in peers tabJon Atack
2022-03-05Merge bitcoin-core/gui#549: refactor: use std::chrono for ↵Hennadii Stepanov
formatDurationStr() helper 6f2593dc23565abaa3d176595cba6e07883f512e gui, refactor: use std::chrono for formatDurationStr() helper (Jon Atack) Pull request description: Updates `formatDurationStr()` to use the `chrono` standard lib. No change in behavior. ACKs for top commit: RandyMcMillan: tACK 6f2593dc23565abaa3d176595cba6e07883f512e shaavan: ACK 6f2593dc23565abaa3d176595cba6e07883f512e w0xlt: tACK 6f2593d on Ubuntu 21.10 Qt 5.15.2 promag: Code review ACK 6f2593dc23565abaa3d176595cba6e07883f512e. Tree-SHA512: 61e9afdb1db779150df338e6af08727c34f69639add465c2f7003ff775d97dce3e78e78d325bc6dea5bc13f0fce9ef1c3506d13f1661a5e083e52bba8a32ba44
2022-03-01Merge bitcoin/bitcoin#22834: net: respect -onlynet= when making outbound ↵laanwj
connections 0eea83a85ec6b215d44facc2b16ee1b035275a6b scripted-diff: rename `proxyType` to `Proxy` (Vasil Dimov) e53a8505dbb6f9deaae8ac82793a4fb760a1e0a6 net: respect -onlynet= when making outbound connections (Vasil Dimov) Pull request description: Do not make outbound connections to hosts which belong to a network which is restricted by `-onlynet`. This applies to hosts that are automatically chosen to connect to and to anchors. This does not apply to hosts given to `-connect`, `-addnode`, `addnode` RPC, dns seeds, `-seednode`. Fixes https://github.com/bitcoin/bitcoin/issues/13378 Fixes https://github.com/bitcoin/bitcoin/issues/22647 Supersedes https://github.com/bitcoin/bitcoin/pull/22651 ACKs for top commit: naumenkogs: utACK 0eea83a85ec6b215d44facc2b16ee1b035275a6b prayank23: reACK https://github.com/bitcoin/bitcoin/pull/22834/commits/0eea83a85ec6b215d44facc2b16ee1b035275a6b jonatack: ACK 0eea83a85ec6b215d44facc2b16ee1b035275a6b code review, rebased to master, debug built, and did some manual testing with various config options on signet Tree-SHA512: 37d68b449dd6d2715843fc84d85f48fa2508be40ea105a7f4a28443b318d0b6bd39e3b2ca2a6186f2913836adf08d91038a8b142928e1282130f39ac81aa741b
2022-02-28qt: Pre-branch translation updates for 23.xlaanwj
Pull the translations from transifex once before the 23.x branch-off, so that master has at least somewhat-relevant translations.
2022-02-24qt, refactor: remove unused parameters in `TransactionDesc::FormatTxStatus()`w0xlt
2022-02-24scripted-diff: rename nDepth -> depthw0xlt
-BEGIN VERIFY SCRIPT- s() { sed -i -e 's/nDepth/depth/g' $(git grep -l 'nDepth' $1); } s src/qt/transactiondesc.cpp -END VERIFY SCRIPT-
2022-02-24qt, refactor: remove redundant scope in `TransactionDesc::FormatTxStatus()`w0xlt
2022-02-24move-only: helper function to present PSBTSjors Provoost
This commit does not change behavior. Review hint: git show --color-moved --color-moved-ws=allow-indentation-change
2022-02-24qt: English (source) translations updatelaanwj
Last-minute update for bitcoin/bitcoin#24434 and bitcoin/bitcoin#24401.
2022-02-22Revert "qt: Do not use QObject::tr plural syntax for numbers with a unit symbol"Luke Dashjr
This reverts commit 3adde72bc99215062c8dabd38f8c34ad093452b5.
2022-02-22qt/wallettests: sort includesWilliam Casarin
I split this out from an earlier commit to make it a bit less noisy. Signed-off-by: William Casarin <jb55@jb55.com>
2022-02-22qt: Skip displayUnitChanged signal if unit is not actually changedHennadii Stepanov
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>