qterminal
qterminal copied to clipboard
[req] stop QSettings storing window geometry in human not readable ByteArrays
Hello,
I've just read up about it. It theoretically is possible to, instead of using toByteArray() to save window geometry, one can "store both pos() and size() and to restore the geometry using QWidget::resize() and move() before calling show(), as demonstrated in the Application example." (http://doc.qt.io/qt-5/restoring-geometry.html) The application example is this one: http://doc.qt.io/qt-5/qtwidgets-mainwindows-application-example.html
I prefer numbers over bytearrays when it comes to actually saving the data into a settings file :-)
Is that possible to do?
yes, it is possible to do.
But for me it has almost minimal priority as I don't see real profit from this change. Please do not take it too personally, but you should provide a patch or the change won't happen ;)
Just because I see it as a change for a change only.
Sure, I understand that it has minimal priority ;-)
Maybe I can further look into this later this year, but I don't have more experience with Qt than translations and what I just researched ;-)
well, the change is very easy. Just read QSettings class docs. But it would require settings migration in Properties::migrate_settings()
Sure 'nogh, but I'm just full in my final exams, so I don't have too much of time :/
+1
The font setting is also stored as binary array. I think it would definitely be an improvement to store it in human readable form, too. Maybe I'll take a look at it sometime.
PR wanted.
+1
@pvanek I don't think this needs settings migration code, it's very minor.