Registered Member
|
Currently looking at importing some old QIF files ( see viewtopic.php?f=69&t=170819 ). In the past I used to be able to:
1. * Backup KMM file 2. * Import QIF data 3. * Backup KMM file 4. * Compare the uncompressed KMM data from steps 1 and 3 (Beyond Compare) However, due to some sort of 'security' feature, the KMM data is not stored in strict sequential order. At least that is how I remember the (new) format. So, have done a "save as" of format XML and then opened with Kate. It seems to be in date/time sequence. Is it only the .KMY data that can be in random order, and the XML data will stay in strict date/time sequence please ?
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
So, I added only one transaction that had 2 splits, saved that as XML, and comparing the 2 files there are no less than 24,798 differences. There is therefore NO way I'm going to be able to reconcile as I used to.
Is there a setting in the config for KMyMoney to make this so called 'security" feature an OPTION ? Thereby keeping the transaction sequence in order, not just line by line, but for every component of the XML structure.
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
KDE Developer
|
In fact what you experience is caused by a security feature of the underlying Qt framework. What happens is that the order of the XML attributes is random, hence the many differences in your file when saving it.
See the Qt documentation on how you can possibly turn off the randomization for your purpose. I have not verified that method, though.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Great, thank you for that link. I see ..
I see I'm using
in KMyMoney version 5.1.2 As to how/where to specify the correct QT variable , it seems this is a good start - https://forum.qt.io/search?term=QT_HASH ... itlesposts
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
It seems all I had to do was to set the environment variable QT_HASH_SEED to zero. Used https://linuxconfig.org/how-to-set-and- ... s-on-linux as a guide.
$ printenv QT_HASH_SEED $ $ export QT_HASH_SEED="0" $ printenv QT_HASH_SEED 0 So, now that is setup. In KMM, did the 'save as XML', then added a transaction, did the 'save as XML' again , different file of course. Checked in Beyond Compare and the randomisation is still happening. Maybe KMM wasn't picking up the temporary environment variable ? Later, .. reading up a bit and that does seem to be the case, so I need to modify /etc/environment and test again.
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
KDE Developer
|
Did you save it once after you have setup the env var or twice and compared the two versions after you have set it up? Turning off the randomization in the first step will of course bring a different result as the seed for the hash is different. Only two versions after the env var is set will use the same seed (if that feature works as expected).
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Thanks for your reply. I decided to do it all (properly) again, as follows:
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
This was a success, adding the environment variable caused the XML data to be in strict order, before and after a QIF import, or any sort of transaction modification.
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell