-
Notifications
You must be signed in to change notification settings - Fork 40
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
Random order of XML attributes when saving #73
Comments
Hmm, interesting. I haven't seen this behavior myself, so I wonder if this is dependent on Qt versions... I also wasn't aware that QtXML is deprecated, which I think is a strong argument to rewrite the code to use |
This behavior started in Qt5.6. The automated windows build (which is what I use) use Qt5.5. This explains why I haven't seen this behavior. Thanks for reporting. I think a quick fix should be easy to do, like you suggest. |
Hmm, I just tried to reproduce this on Qt 5.11 on Ubuntu, and I seem to get consistent behavior... @mgunyho: What environment do you trigger this under? |
OK, never mind. I managed to trigger it after some more tries. I had to restart the editor in between, I guess the hash stays constant. |
Seems to work, thanks! |
If I open a syncdata file and save it, the attributes in the XML
row
,value
andinterpolation
are shuffled each time, and git thinks all keys in the file have been rewritten. This makes merging files a headache. Apparently, this is caused byQDomElement.setAttribute
(here) storing the keys in a hashmap, which shuffles the keys on purpose (see here). This could be fixed by seeding the hash as suggested in the SO thread.The text was updated successfully, but these errors were encountered: