qterminal icon indicating copy to clipboard operation
qterminal copied to clipboard

[req] stop QSettings storing window geometry in human not readable ByteArrays

Open ljrk0 opened this issue 10 years ago • 8 comments

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?

ljrk0 avatar Mar 07 '15 13:03 ljrk0

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.

pvanek avatar Mar 07 '15 19:03 pvanek

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 ;-)

ljrk0 avatar Mar 07 '15 19:03 ljrk0

well, the change is very easy. Just read QSettings class docs. But it would require settings migration in Properties::migrate_settings()

pvanek avatar Mar 07 '15 19:03 pvanek

Sure 'nogh, but I'm just full in my final exams, so I don't have too much of time :/

ljrk0 avatar Mar 07 '15 20:03 ljrk0

+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.

worblehat avatar Mar 08 '15 03:03 worblehat

PR wanted.

jleclanche avatar Jun 12 '15 15:06 jleclanche

+1

steve-lorimer avatar Oct 26 '15 20:10 steve-lorimer

@pvanek I don't think this needs settings migration code, it's very minor.

jleclanche avatar Oct 26 '15 21:10 jleclanche