aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
AgeCommit message (Collapse)Author
2022-05-17refactor: use C++11 default initializersfanquake
2022-04-13Merge bitcoin-core/gui#543: peers-tab: add connection duration column to ↵Hennadii Stepanov
tableview 51708c4516cb9d52e84dc8850d93f556dda1a75b gui: peersWidget - ResizeToContents Age and IP/Netmask columns (randymcmillan) 209301a442512579d57f79c82417dc7c496248b6 gui: add Age column to peers tab (randymcmillan) 127de22c5fb396e1670d2a911faf7a9adc9241e2 gui: add FormatPeerAge() utility helper (Jon Atack) Pull request description: This change adds an "Age" column to the peers table view, which displays the duration of each peer's connection. ACKs for top commit: jonatack: re-ACK 51708c4516cb9d52e84dc8850d93f556dda1a75b Jamewood: > re-ACK 51708c4 shaavan: reACK 51708c4516cb9d52e84dc8850d93f556dda1a75b hebasto: ACK 51708c4516cb9d52e84dc8850d93f556dda1a75b, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 27323f7080ec0d3fcdbf1b190fba1cd2d7406840ab6607c221cf8af950db9134e22721cc5a88f4fc4f390d8b05e98bc4b7521661a31fadad9e2c6c6390e71788
2022-04-04refactor: fix clang-tidy named args usagefanquake
2022-03-16gui: add Age column to peers tabrandymcmillan
Co-authored-by: Jon Atack <jon@atack.com>
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-08-26Remove GetAddrNameMarcoFalke
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#c131-avoid-trivial-getters-and-setters
2021-08-11Merge bitcoin-core/gui#317: Add Direction column to Peers TabHennadii Stepanov
6971e790c32253ecddb6108e796afd3892ced7fe gui: add Direction column to peers tab (Jon Atack) Pull request description: Picking up #289 This adds a `Direction column`, making the peers tab the same as the `Direction/Type` row in the peer details and the direction and type columns in our other user-facing peer connections table in `-netinfo`. Users can now sort the peers table by direction. The default sort is set to inbound, then outbound. | Master | PR | | ----------- | ----------- | | ![Screen Shot 2021-05-05 at 3 51 09 AM](https://user-images.githubusercontent.com/23396902/117111864-38ff9a00-ad56-11eb-889d-f1c838c845e6.png) | ![Screen Shot 2021-05-05 at 3 35 40 AM](https://user-images.githubusercontent.com/23396902/117111892-4157d500-ad56-11eb-82b1-5bd3e88a4cff.png) | ACKs for top commit: jonatack: Tested ACK 6971e790c32253ecddb6108e796afd3892ced7fe ShaMan239: tACK 6971e790c32253ecddb6108e796afd3892ced7fe hebasto: ACK 6971e790c32253ecddb6108e796afd3892ced7fe, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: 9716cdedd435f88245a097fed6d4b2b486104d0dd09df739bdb4f2bfad709cbd9c9a231168cc3326e94fa5fddc77dd68f992f20417d04d94930db9fccdbb7de1
2021-06-28qt: Emit dataChanged signal to dynamically re-sort Peers tableHennadii Stepanov
2021-06-07Merge bitcoin-core/gui#164: Handle peer addition/removal in a right wayHennadii Stepanov
ecbd91153875c8cdd5b92b840afc116f65e457fb qt: Handle peer addition/removal in a right way (Hennadii Stepanov) 1b66f6e556631a1a2d89aefba70a79894bd14fcd qt: Drop PeerTablePriv class (Hennadii Stepanov) efb7e5aa962d4a4047061996bbb50b6da4592cbc qt, refactor: Use default arguments for overridden functions (Hennadii Stepanov) Pull request description: This PR makes `PeerTableModel` handle a peer addition/removal in a right way. See: - https://doc.qt.io/qt-5/model-view-programming.html#inserting-and-removing-rows - https://doc.qt.io/qt-5/model-view-programming.html#resizable-models Fixes #160. Fixes #191. ACKs for top commit: jarolrod: re-ACK ecbd911 promag: reACK ecbd91153875c8cdd5b92b840afc116f65e457fb just improvements to the comment since last review. Tree-SHA512: 074935d67f78561724218e8b33822e2de16749f873c29054926b720ffcd642f08249a222b563983cf65a9b716290aa14e2372c47fc04e5f401f759db25ca710f
2021-06-07qt: Handle peer addition/removal in a right wayHennadii Stepanov
This change fixes a bug when a multiple rows selection gets inconsistent after a peer addition/removal.
2021-06-05Merge bitcoin-core/gui#325: Align numbers in the "Peer Id" column to the rightHennadii Stepanov
69b8b5d72c47d42a9e69e6666af89606057be15b qt: Align numbers in the "Peer Id" column to the right (Hennadii Stepanov) Pull request description: On master (6b49d88a5dda97fdbabe363fd7d3c4f1ce29082a): ![Screenshot from 2021-05-12 21-53-52](https://user-images.githubusercontent.com/32963518/118029170-9013f900-b36c-11eb-9e27-36140cbd618e.png) With this PR: ![Screenshot from 2021-05-12 21-48-19](https://user-images.githubusercontent.com/32963518/118028803-2a277180-b36c-11eb-83ae-77d3e8cdd343.png) ACKs for top commit: jarolrod: ACK 69b8b5d72c47d42a9e69e6666af89606057be15b jonatack: ACK 69b8b5d72c47d42a9e69e6666af89606057be15b happy to re-ack with more separation or center-aligned kristapsk: ACK 69b8b5d72c47d42a9e69e6666af89606057be15b Tree-SHA512: 3279522745a0fe6db1ec9be723a2640a37983947ed1af4aad56f22ce4780cc943a25b2d774529a9eeb3b00309f0204cfbc3f38b7db2c52865d05bf6a7c87e747
2021-05-27qt: Drop PeerTablePriv classHennadii Stepanov
This commit does not change behavior.
2021-05-27qt, refactor: Use default arguments for overridden functionsHennadii Stepanov
See Qt docs for QAbstractTableModel and QAbstractItemModel classes.
2021-05-26gui: add Direction column to peers tabJon Atack
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
2021-05-15qt, build: Optimize string concatenationHennadii Stepanov
The defined QT_USE_QSTRINGBUILDER macro means using the QStringBuilder for efficient string concatenation in all Qt code by default.
2021-05-12qt: Align numbers in the "Peer Id" column to the rightHennadii Stepanov
2021-03-07qt, refactor: Drop no longer used PeerTableModel::getRowByNodeId funcHennadii Stepanov
2021-03-07qt, refactor: Drop no longer used PeerTableModel::sort functionHennadii Stepanov
2021-03-07qt: Use PeerTableSortProxy for sorting peer tableHennadii Stepanov
2021-03-07Merge bitcoin-core/gui#166: refactor: Use enum type as switch argument in ↵MarcoFalke
*TableModel 1d5d832d5c045cbbe3a0f4aa8fc29e52ecadc182 qt, refactor: Use enum type as switch argument in TransactionTableModel (Hennadii Stepanov) 52f122c11f5ac40bc2f7e31cb4da0a79c842f08e qt, refactor: Use enum type as switch argument in PeerTableModel (Hennadii Stepanov) a35223f1cdaf6918501faccac1ff94ebfd38c6f6 qt, refactor: Use enum type as switch argument in BanTableModel (Hennadii Stepanov) ab8a747d1ced9f20ca32f9898418be70670da71a qt, refactor: Use enum type as switch argument in AddressTableModel (Hennadii Stepanov) Pull request description: This PR makes code more maintainable by leveraging `-Wswitch` compiler warnings. Only the `RecentRequestsTableModel` is not refactored, because its `enum ColumnIndex` contains additional `NUMBER_OF_COLUMNS` value. No behavior change. ACKs for top commit: hebasto: Do you mind mentioning the _top_ pr commit with your ACK, i.e., 1d5d832d5c045cbbe3a0f4aa8fc29e52ecadc182, not ab8a747d1ced9f20ca32f9898418be70670da71a? jarolrod: ACK 1d5d832d5c045cbbe3a0f4aa8fc29e52ecadc182, tested on macOS 11.1 Qt 5.15.2 leonardojobim: ACK https://github.com/bitcoin-core/gui/pull/166/commits/1d5d832d5c045cbbe3a0f4aa8fc29e52ecadc182, tested on Ubuntu 20.04 Qt 5.12.8 promag: Code review ACK 1d5d832d5c045cbbe3a0f4aa8fc29e52ecadc182. Tree-SHA512: 0d474d226a2fa0069495d1aa5ec13b2470708ec7b8a6ab35402236c7bf57cb9939577677a30dfa54f5e3bc0477c6cfffd20ed6f19e4eb394a938569cc9347851
2021-03-03Change all ping times to std::chrono typesPieter Wuille
2021-02-22qt, refactor: Use enum type as switch argument in PeerTableModelHennadii Stepanov
2021-02-06gui: add "Type" column to Peers main windowJon Atack
2021-01-11Merge bitcoin-core/gui#161: Add PeerTableModel::StatsRole to prevent data ↵Jonas Schnelli
layer violation b3e9bcaac85a64a1b41d534b28c8cfb1f08e14e5 qt, refactor: Drop no longer used PeerTableModel::getNodeStats function (Hennadii Stepanov) 49c604077c572fcdea8739eb3383467dbbbc5f52 qt: Use PeerTableModel::StatsRole (Hennadii Stepanov) 35007edf9c0f592303f0cbda3ade776c87fd80b1 qt: Add PeerTableModel::StatsRole (Hennadii Stepanov) Pull request description: This PR allows to access to the `CNodeCombinedStats` instance directly from any view object. The `PeerTableModel::getNodeStats` member function removed as a kind of layer violation. No behavior changes. Also other pulls (bugfixes) are based on this one: #18 and #164. ACKs for top commit: jonatack: Tested re-ACK b3e9bcaac85a64a1b41d534b28c8cfb1f08e14e5 per `git range-diff ae8f797 4c05fe0 b3e9bca` promag: Code review ACK b3e9bcaac85a64a1b41d534b28c8cfb1f08e14e5. jonasschnelli: utACK b3e9bcaac85a64a1b41d534b28c8cfb1f08e14e5 Tree-SHA512: 6ba50d5dd2c0373655d491ce8b130c47d598da2db5ff4b00633f447404c7e70f8562ead53ddf166e851384d9632ff9146a770c99845c2cdd3ff7250677e4c130
2021-01-02qt: Follow Qt docs when implementing rowCount and columnCountHennadii Stepanov
2020-12-30qt, refactor: Drop no longer used PeerTableModel::getNodeStats functionHennadii Stepanov
2020-12-30qt: Add PeerTableModel::StatsRoleHennadii Stepanov
This change allows access to CNodeCombinedStats instance directly from any view object.
2020-12-27gui: rename peer tab column headers, initialize in .hHennadii Stepanov
2020-12-27gui: add network column in peers tab/windowJon Atack
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-03-04refactor: Convert min ping time from double to int64_tBen Woosley
2020-02-03gui: Drop PeerTableModel dependency to ClientModelJoão Barbosa
2019-12-30scripted-diff: Bump copyright of files changed in 2019MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2019-11-29Use correct C++11 header for std::swap()Hennadii Stepanov
2019-10-15Remove unused includespracticalswift
2019-08-22refactor: replace qStableSort with std::stable_sortfanquake
2019-06-02Make reasoning about dependencies easier by not including unused dependenciespracticalswift
2019-01-13Replace remaining 0 with nullptr in Qt codeBen Woosley
Also used type-appropriate enum values such as Qt::NoItemFlags in some cases. All cases identified via -Wzero-as-null-pointer-constant
2019-01-05Use C++11 default member initializersMarcoFalke
2018-08-27Make objects in range declarations immutable by default. Avoid unnecessary ↵practicalswift
copying of objects in range declarations.
2018-08-21qt: Use new Qt5 connect syntaxJoão Barbosa
2018-07-27Update copyright headers to 2018DrahtBot
2018-07-01Merge #13537: GUI: Peer table: Visualize inbound/outbound state for every rowJonas Schnelli
4132ad3bf Show symbol for inbound/outbound in peer table (wodry) Pull request description: Fixes #13483 The address in the network peer table is prefixed with an up-arrow symbolizing an outbound connection, or an down-array symbolizing an inbound connection. See screenshot. The user has an easy visual confirmation about the connection direction state. I really like it :) Impact to columns sorting is grouping by inbound/outbound first, which in my opinion is an advantage, too. ![bildschirmfoto](https://user-images.githubusercontent.com/8447873/41862752-13803eb2-78a5-11e8-9126-a52385f5ec19.png) Tree-SHA512: d355f679d34c3006743c06750be5f36a083c1a8376da8f5f35045fcd9df964153409946fdde5007734f23bd692c91355962dc42df31122cdcf88e4affce8bc0e
2018-06-26Show symbol for inbound/outbound in peer tablewodry
2018-06-18gui: Remove QT_VERSION fallbacks for Qt < 5Wladimir J. van der Laan
There were surprisingly many `#ifdef` fallbacks for Qt 4. Remiving them simplifies maintenance, as well as adding new GUI functionality.
2018-04-07scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky
Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <ken2812221@gmail.com> https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 -BEGIN VERIFY SCRIPT- git mv src/interface src/interfaces ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; } ren interface/ interfaces/ ren interface:: interfaces:: ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_ ren "namespace interface" "namespace interfaces" -END VERIFY SCRIPT-
2018-04-04Remove direct bitcoin calls from qt/peertablemodel.cppRussell Yanofsky
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-10-16Add Sent and Received information to the debug menu peer listAaron Golliver