- add qSort() for cachedAddressTable, as qLowerBound() and qUpperBound() require the list to be in ascending order (see http://harmattan-dev.nokia.com/docs/library/html/qt4/qtalgorithms.html#qLowerBound)
- add a new check in AddressTableModel::setData() to just return, when no changes were made to a label or an address (prevents entry duplication issue)
- remove "rec->label = value.toString();" from AddressTableModel::setData() as the label gets updated by AddressTablePriv::updateEntry() anyway (seems @sipa added this line via https://github.com/bitcoin/bitcoin/commit/1025440184ef100a22d07c7bb543ee45cf169d64#L6R225)
- add another new check in AddressTableModel::setData() to just return, if a duplicate address was found (prevents address overwrite)
- add a new check to EditAddressDialog::setModel() to prevent setting an invalid model
- re-work the switch-case statement in AddressTableModel::accept() to always break (as return get's called anyway) and order the list to match the enum definition
- make accept() in editaddressdialog.h a public slot, which it should be
- misc small coding style changes
Bitcoin-Qt: fix known addressbook bugs #2157
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:Qt_addrlist changing 4 files +64 −33-
Diapolo commented at 1:39 PM on January 8, 2013: none
-
BitcoinPullTester commented at 1:53 PM on January 8, 2013: none
Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/ae1c11d44a4ea90001ea777883cc2cef8a60c846 for binaries and test log.
This could happen for one of several reasons:
- It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts
- It does not build on either Linux i386 or Win32 (via MinGW cross compile)
- The test suite fails on either Linux i386 or Win32
- The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)
-
Diapolo commented at 2:44 PM on January 8, 2013: none
@TheBlueMatt Can you fix @BitcoinPullTester?
fatal error: error writing to /tmp/ccBCY0YL.s: No space left on device -
laanwj commented at 4:23 PM on January 8, 2013: member
Cool
btw:
add qSort() for cachedAddressTable, as qLowerBound() and qUpperBound() require the list to be in ascending order (see http://harmattan-dev.nokia.com/docs/library/html/qt4/qtalgorithms.html#qLowerBound)Are you sure this is needed? It should already stay in sorted order by picking the insertion positions carefully
-
BitcoinPullTester commented at 7:31 PM on January 8, 2013: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/ae1c11d44a4ea90001ea777883cc2cef8a60c846 for binaries and test log.
-
Diapolo commented at 1:12 PM on January 9, 2013: none
I consider this a rather important bugfix and would love to see it in 0.8. I'll try to get some bug-reporters, to test this.
-
e6d2300562
Bitcoin-Qt: fix known addressbook bugs
- add qSort() for cachedAddressTable, as qLowerBound() and qUpperBound() require the list to be in ascending order (see http://harmattan-dev.nokia.com/docs/library/html/qt4/qtalgorithms.html#qLowerBound) - add a new check in AddressTableModel::setData() to just return, when no changes were made to a label or an address (prevents entry duplication issue) - remove "rec->label = value.toString();" from AddressTableModel::setData() as the label gets updated by AddressTablePriv::updateEntry() anyway (seems @sipa added this line via https://github.com/bitcoin/bitcoin/commit/1025440184ef100a22d07c7bb543ee45cf169d64#L6R225) - add another new check in AddressTableModel::setData() to just return, if a duplicate address was found (prevents address overwrite) - add a new check to EditAddressDialog::setModel() to prevent setting an invalid model - re-work the switch-case statement in AddressTableModel::accept() to always break (as return get's called anyway) and order the list to match the enum definition - make accept() in editaddressdialog.h a public slot, which it should be - misc small coding style changes
-
in src/qt/addresstablemodel.cpp:None in ae1c11d44a outdated
360 | @@ -342,9 +361,8 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con 361 | strAddress = CBitcoinAddress(newKey.GetID()).ToString(); 362 | } 363 | else 364 | - {
laanwj commented at 3:46 PM on January 9, 2013:Please don't do this. I prefer explicit {} around blocks, as it prevents a class of bugs when a statement is added.
Diapolo commented at 3:56 PM on January 9, 2013:You are right, I reverted this one.
Edit: Do you have any clue, why my Firefox refuses to display
CommitsandFiles Changedon Github? I'm getting crazy because of this...Edit 2: Crazy, I had dom.storage.enabled set to false, which prevents Github page from working correctly!
laanwj commented at 3:58 PM on January 9, 2013: memberCode changes are OK, but if some people can confirm that this solves their bug that'd be great :)
BitcoinPullTester commented at 4:17 PM on January 9, 2013: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/e6d230056202b05a27f187dff2648eb5c76fcfee for binaries and test log.
laanwj referenced this in commit bd85cf3df7 on Jan 19, 2013laanwj merged this on Jan 19, 2013laanwj closed this on Jan 19, 2013laudney referenced this in commit b7b2be0c1c on Mar 19, 2014HashUnlimited referenced this in commit fe38bf1c00 on Jul 2, 2018HashUnlimited referenced this in commit 0328610d23 on Jul 2, 2018HashUnlimited referenced this in commit a5846a858d on Jul 3, 2018sidhujag referenced this in commit e92249e738 on Jul 6, 2018owlhooter referenced this in commit fda74b4a8c on Oct 11, 2018guruvan referenced this in commit 2ccfffc87d on Nov 8, 2018DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 03:16 UTC
More mirrored repositories can be found on mirror.b10c.me
