-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #367 #374
Fix #367 #374
Conversation
Please explain the change and remove the unscoped GitHub attribute. The unscoped link will mess with all monotree repos, not just this one. |
@MarcoFalke what is an "unscoped GitHub attribute" please? This change just reverts two lines from ecbd911 which seems to fix the issue it introduced. I've not fully tested whether it causes the issues that #164 fixed to be reintroduced - ideally some tests ought to have been created with #164 that would be failing now if it re-broke things. |
|
A pull/issue always defaults to the same project that it's in - it's only necessary to add the project if it's a different project to that which the pull/issue is in. |
How do I change this to a draft pull request? I think there may be a chance of Segmentation fault in this code. |
This is a monotree project. Meaning that different project will have the same tree and share the (merge) commits. So without a scope it won't be trivially possible to recover the metadata. |
Rather than arguing the point, how about just updating the link. As mentioned, having an unscoped link will mess with our merge process / resultant commit messages.
Click the button that says "Convert to draft" You do realise you could read the GitHub documentation, or use any search engine to also find the answer to that question? Rather than posting another comment here? I'd suggest you spend some time reading this projects developer docs and contributing guide. Opening a PR with no title, no explanation of the change, a useless commit message, and no commit body is not the standard that is expected here. I'm also almost certain you are aware of that, given you've been around the project for many years now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested 0d41edb on Linux Mint 20.1 (Qt 5.12.8) -- works as intended.
The change is correct (UPDATE: see #374 (comment)), and Qt docs clearly states:
For more complex changes to the model's structure, perhaps involving internal reorganization, sorting of data or any other structural change, it is necessary to perform the following sequence:
- Emit the layoutAboutToBeChanged() signal
- Update internal data which represents the structure of the model.
- Update persistent indexes using changePersistentIndexList()
- Emit the layoutChanged() signal.
UPDATE 2: see #374 (comment)
Also this signal seems redundant now:
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -73,9 +73,6 @@ public:
public Q_SLOTS:
void refresh();
-Q_SIGNALS:
- void changed();
-
private:
//! Internal peer data structure.
QList<CNodeCombinedStats> m_peers_data{};
Hope that aforementioned comments will be addressed as well.
OTOH, this change re-introduces #191 bug. |
I'm trying to understand the issue. I can't fix something when I'm not aware of the problem.
Thank you.
If it was that simple, I'd have done it. I always go for the simplest solution possible (the KISS rule).
I thought I'd read those docs, and was not aware that I had deviated from any documented practices. I believed the explanation provided was sufficient. I would appreciate it if you could point me towards the relevant documentation that you're thinking of. |
Out of the two bugs #191 or #367 - I'd rather have former than the latter. At the moment, this small patch causes bitcoin-qt to segmentation fault, so I'm thinking a complete revert of #164 might be the better solution for now until an improved #164 can be produced. |
There are two issues with the commit message:
You can read our contributing guide to learn on how to create patches: https://github.com/bitcoin-core/gui/blob/master/CONTRIBUTING.md#committing-patches . It also links to a guide on how to write commit messages. |
I still don't understand why this does not work:
And we have |
Ah, I understand now - you're implying that it will also get pushed to https://github.com/bitcoin/bitcoin, yes?
"Fixes #367" is an explanation. so I would disagree with your statement, but if it gets pushed to another repository then I can understand how it could point people to the wrong information. I'm not really understanding why we have two repositories with duplicate code though. Is there an explanation for this somewhere?
Thanks. I shall read it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -154,30 +154,7 @@ void PeerTableModel::refresh() | |||
new_peers_data.append(stats); | |||
} | |||
|
|||
// Handle peer addition or removal as suggested in Qt Docs. See: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this reintroduces #160 as described here: #160 (comment)
986bf78 qt: Emit dataChanged signal to dynamically re-sort Peers table (Hennadii Stepanov) Pull request description: [By default](https://doc.qt.io/qt-5/qsortfilterproxymodel.html#details), the `PeerTableSortProxy` > dynamically re-sorts ... data whenever the original model changes. That is not the case on master (8cdf917) as in ecbd911 (#164) no signals are emitted to notify about model changes. This PR uses a dedicated [`dataChanged`](https://doc.qt.io/qt-5/qabstractitemmodel.html#dataChanged) signal. Fixes #367. An alternative to #374. ACKs for top commit: jarolrod: ACK 986bf78 Tree-SHA512: dcb92c2f9a2c632880429e9528007db426d2ad938c64dfa1f1538c03e4b62620df52ad7daf33b582976c67b472ff76bc0dae707049f4bbbd4941232cee9ce3d4
Closing due to the #375 is merged. |
Attempting to fix issue #367