Hennadii Stepanov
e638acf697
Merge bitcoin-core/gui#164 : Handle peer addition/removal in a right way
...
ecbd911538
qt: Handle peer addition/removal in a right way (Hennadii Stepanov)
1b66f6e556
qt: Drop PeerTablePriv class (Hennadii Stepanov)
efb7e5aa96
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 ecbd911538
just improvements to the comment since last review.
Tree-SHA512: 074935d67f78561724218e8b33822e2de16749f873c29054926b720ffcd642f08249a222b563983cf65a9b716290aa14e2372c47fc04e5f401f759db25ca710f
2021-06-07 22:13:05 +03:00
Hennadii Stepanov
ecbd911538
qt: Handle peer addition/removal in a right way
...
This change fixes a bug when a multiple rows selection gets inconsistent
after a peer addition/removal.
2021-06-07 17:37:40 +03:00
Hennadii Stepanov
38ab7d0765
Merge bitcoin-core/gui#325 : Align numbers in the "Peer Id" column to the right
...
69b8b5d72c
qt: Align numbers in the "Peer Id" column to the right (Hennadii Stepanov)
Pull request description:
On master (6b49d88a5d
):
![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 69b8b5d72c
jonatack:
ACK 69b8b5d72c
happy to re-ack with more separation or center-aligned
kristapsk:
ACK 69b8b5d72c
Tree-SHA512: 3279522745a0fe6db1ec9be723a2640a37983947ed1af4aad56f22ce4780cc943a25b2d774529a9eeb3b00309f0204cfbc3f38b7db2c52865d05bf6a7c87e747
2021-06-05 15:29:15 +03:00
Hennadii Stepanov
1b66f6e556
qt: Drop PeerTablePriv class
...
This commit does not change behavior.
2021-05-27 22:34:02 +03:00
Hennadii Stepanov
efb7e5aa96
qt, refactor: Use default arguments for overridden functions
...
See Qt docs for QAbstractTableModel and QAbstractItemModel classes.
2021-05-27 22:33:04 +03:00
Hennadii Stepanov
3fd3a0fc87
qt, build: Optimize string concatenation
...
The defined QT_USE_QSTRINGBUILDER macro means using the QStringBuilder
for efficient string concatenation in all Qt code by default.
2021-05-15 19:10:38 +03:00
Hennadii Stepanov
69b8b5d72c
qt: Align numbers in the "Peer Id" column to the right
2021-05-12 22:05:25 +03:00
Hennadii Stepanov
5a4a15d2b4
qt, refactor: Drop no longer used PeerTableModel::getRowByNodeId func
2021-03-07 16:58:11 +02:00
Hennadii Stepanov
9a9f180df0
qt, refactor: Drop no longer used PeerTableModel::sort function
2021-03-07 16:58:11 +02:00
Hennadii Stepanov
778a64af20
qt: Use PeerTableSortProxy for sorting peer table
2021-03-07 16:57:17 +02:00
MarcoFalke
8c21562180
Merge bitcoin-core/gui#166 : refactor: Use enum type as switch argument in *TableModel
...
1d5d832d5c
qt, refactor: Use enum type as switch argument in TransactionTableModel (Hennadii Stepanov)
52f122c11f
qt, refactor: Use enum type as switch argument in PeerTableModel (Hennadii Stepanov)
a35223f1cd
qt, refactor: Use enum type as switch argument in BanTableModel (Hennadii Stepanov)
ab8a747d1c
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., 1d5d832d5c
, not ab8a747d1ced9f20ca32f9898418be70670da71a?
jarolrod:
ACK 1d5d832d5c
, tested on macOS 11.1 Qt 5.15.2
leonardojobim:
ACK 1d5d832d5c
, tested on Ubuntu 20.04 Qt 5.12.8
promag:
Code review ACK 1d5d832d5c
.
Tree-SHA512: 0d474d226a2fa0069495d1aa5ec13b2470708ec7b8a6ab35402236c7bf57cb9939577677a30dfa54f5e3bc0477c6cfffd20ed6f19e4eb394a938569cc9347851
2021-03-07 13:04:30 +01:00
Pieter Wuille
4d98b401fb
Change all ping times to std::chrono types
2021-03-03 09:48:07 -08:00
Hennadii Stepanov
52f122c11f
qt, refactor: Use enum type as switch argument in PeerTableModel
2021-02-22 09:36:48 +02:00
Jon Atack
151888383a
gui: add "Type" column to Peers main window
2021-02-06 22:59:54 +01:00
Jonas Schnelli
616eace02a
Merge bitcoin-core/gui#161 : Add PeerTableModel::StatsRole to prevent data layer violation
...
b3e9bcaac8
qt, refactor: Drop no longer used PeerTableModel::getNodeStats function (Hennadii Stepanov)
49c604077c
qt: Use PeerTableModel::StatsRole (Hennadii Stepanov)
35007edf9c
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 b3e9bcaac8
per `git range-diff ae8f797
4c05fe0 b3e9bca`
promag:
Code review ACK b3e9bcaac8
.
jonasschnelli:
utACK b3e9bcaac8
Tree-SHA512: 6ba50d5dd2c0373655d491ce8b130c47d598da2db5ff4b00633f447404c7e70f8562ead53ddf166e851384d9632ff9146a770c99845c2cdd3ff7250677e4c130
2021-01-11 09:06:21 +01:00
Hennadii Stepanov
195fcb53a0
qt: Follow Qt docs when implementing rowCount and columnCount
2021-01-02 21:40:53 +02:00
Hennadii Stepanov
b3e9bcaac8
qt, refactor: Drop no longer used PeerTableModel::getNodeStats function
2020-12-30 21:01:20 +02:00
Hennadii Stepanov
35007edf9c
qt: Add PeerTableModel::StatsRole
...
This change allows access to CNodeCombinedStats instance directly from
any view object.
2020-12-30 20:54:47 +02:00
Hennadii Stepanov
9136953073
gui: rename peer tab column headers, initialize in .h
2020-12-27 14:30:33 +01:00
Jon Atack
05c08c696a
gui: add network column in peers tab/window
2020-12-27 14:30:24 +01:00
MarcoFalke
fa488f131f
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-04-16 13:33:09 -04:00
Ben Woosley
e6fc63ec7e
refactor: Convert min ping time from double to int64_t
2020-03-04 13:44:57 -05:00
João Barbosa
ff59bcd321
gui: Drop PeerTableModel dependency to ClientModel
2020-02-03 14:48:40 +00:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
Hennadii Stepanov
98fbd1cdff
Use correct C++11 header for std::swap()
2019-11-29 21:23:25 +02:00
practicalswift
084e17cebd
Remove unused includes
2019-10-15 22:56:43 +00:00
fanquake
fea33cbbdf
refactor: replace qStableSort with std::stable_sort
2019-08-22 13:40:51 +08:00
practicalswift
eca9767673
Make reasoning about dependencies easier by not including unused dependencies
2019-06-02 17:15:23 +02:00
Ben Woosley
3a0e76fc12
Replace remaining 0 with nullptr in Qt code
...
Also used type-appropriate enum values such as Qt::NoItemFlags in
some cases.
All cases identified via -Wzero-as-null-pointer-constant
2019-01-13 03:25:14 -08:00
MarcoFalke
fa2510d5c1
Use C++11 default member initializers
2019-01-05 16:16:37 +01:00
practicalswift
f34c8c466a
Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
2018-08-27 18:19:33 +02:00
João Barbosa
f78558f1e3
qt: Use new Qt5 connect syntax
2018-08-21 09:43:54 +01:00
DrahtBot
eb7daf4d60
Update copyright headers to 2018
2018-07-27 07:15:02 -04:00
Jonas Schnelli
10ffca7429
Merge #13537 : GUI: Peer table: Visualize inbound/outbound state for every row
...
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-07-01 10:27:43 +02:00
wodry
4132ad3bfa
Show symbol for inbound/outbound in peer table
2018-06-26 19:39:12 +02:00
Wladimir J. van der Laan
907f73bbc5
gui: Remove QT_VERSION fallbacks for Qt < 5
...
There were surprisingly many `#ifdef` fallbacks for Qt 4.
Remiving them simplifies maintenance, as well as adding new GUI
functionality.
2018-06-18 12:22:11 +02:00
Russell Yanofsky
17780d6f35
scripted-diff: Avoid interface
keyword to fix windows gitian build
...
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-07 03:42:02 -04:00
Russell Yanofsky
e0b66a3b7c
Remove direct bitcoin calls from qt/peertablemodel.cpp
2018-04-04 16:52:40 -04:00
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
2018-01-03 02:26:56 +09:00
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-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-11-16 08:23:01 +13:00
Aaron Golliver
6b1891e2c0
Add Sent and Received information to the debug menu peer list
2017-10-16 20:58:23 -07:00
Jorge Timón
18dc3c3962
scripted-diff: Remove Q_FOREACH
...
-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-05 20:11:01 +02:00
Jorge Timón
7c00c26726
scripted-diff: Fully remove BOOST_FOREACH
...
-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-06-05 20:10:50 +02:00
Cory Fields
c851be4b25
net: define NodeId as an int64_t
...
This should make occurances of NodeId wrapping essentially impossible for
real-world usage.
2017-04-12 13:42:02 -04:00
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Matt Corallo
76faa3cdfe
Rename the remaining main.{h,cpp} to validation.{h,cpp}
2016-12-02 09:42:51 -08:00
Matt Corallo
e736772c56
Move network-msg-processing code out of main to its own file
2016-12-02 09:42:51 -08:00
Wladimir J. van der Laan
47db075377
qt: Plug many memory leaks
...
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-11-23 12:33:35 +01:00
R E Broadley
1724a405c9
Display minimum ping in debug window.
2016-10-15 20:43:11 +07:00
Cory Fields
c0569c7fa1
net: Add most functions needed for vNodes to CConnman
2016-09-08 12:12:58 -04:00