[Qt] fix coincontrol sort issue#9185
Merged
jonasschnelli merged 2 commits intobitcoin:masterfrom Nov 22, 2016
Merged
Conversation
laanwj
requested changes
Nov 18, 2016
src/qt/coincontroldialog.cpp
Outdated
| // amount | ||
| itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); | ||
| itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly | ||
| itemOutput->setData(COLUMN_AMOUNT_INT64, Qt::DisplayRole, QVariant((qlonglong)out.tx->vout[out.i].nValue)); // padding so that sorting works correctly |
Member
There was a problem hiding this comment.
Let's get rid of the hidden _INT64 columns completely, they should no longer be necessary.
Member
There was a problem hiding this comment.
Also: function strPad can go after this.
Member
|
Working on a patch |
Member
|
Please cherry-pick the top commit from: https://github.com/laanwj/bitcoin/tree/2016_11_trol_cleanup into this. I've done some further cleanups and fixes:
|
- Do sorting for date, amount and confirmations column as longlong, not unsigned longlong. - Use `UserRole` to store our own data. This makes it treated as ancillary data prevents it from being displayed. - Get rid of `getMappedColumn` `strPad` - these are no longer necessary. - Get rid of hidden `_INT64` columns. - Start enumeration from 0 (otherwise values are undefined).
Contributor
Author
laanwj
approved these changes
Nov 21, 2016
Member
|
@gmaxwell Can you please test this in your environment and confirm whether the problem is fixed? |
Contributor
Author
|
Tested ACK (Ubuntu) after @laanwj commit. Waiting for @gmaxwell's re-test |
Contributor
|
tested ACK! |
jonasschnelli
added a commit
that referenced
this pull request
Nov 22, 2016
luke-jr
pushed a commit
to luke-jr/bitcoin
that referenced
this pull request
Dec 2, 2016
Github-Pull: bitcoin#9185 Rebased-From: 76af4eb
luke-jr
pushed a commit
to luke-jr/bitcoin
that referenced
this pull request
Dec 2, 2016
- Do sorting for date, amount and confirmations column as longlong, not unsigned longlong. - Use `UserRole` to store our own data. This makes it treated as ancillary data prevents it from being displayed. - Get rid of `getMappedColumn` `strPad` - these are no longer necessary. - Get rid of hidden `_INT64` columns. - Start enumeration from 0 (otherwise values are undefined). Github-Pull: bitcoin#9185 Rebased-From: 4231032
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Jan 6, 2019
CryptoCentric
pushed a commit
to absolute-community/absolute
that referenced
this pull request
Feb 24, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Reported by @gmaxwell
The sort order for the amount column is lexicographical resulting in a order like "1 10 2 20 200 3 ...".
The attempts of this PR is to fix this.