aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
AgeCommit message (Collapse)Author
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-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
2017-06-05scripted-diff: Remove Q_FOREACHJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/Q_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-04-12net: define NodeId as an int64_tCory Fields
This should make occurances of NodeId wrapping essentially impossible for real-world usage.
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-02Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo
2016-12-02Move network-msg-processing code out of main to its own fileMatt Corallo
2016-11-23qt: Plug many memory leaksWladimir J. van der Laan
None of these are very serious, and are leaks in objects that are created at most one time. In most cases this means properly using the QObject parent hierarchy, except for BanTablePriv/PeerTablePriv which are not QObject, so use a std::unique_ptr instead.
2016-10-15Display minimum ping in debug window.R E Broadley
2016-09-08net: Add most functions needed for vNodes to CConnmanCory Fields