Code review comment for lp://qastaging/~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-app-remember-last-formula

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Hi Bartosz,
thanks for working on this.

Unfortunately, I don't think this is the right way to fix the problem: Qt.labs.settings writes on a file the setting, so you add a very big overhead: every time user presses a button there is an I/O operation, that is very expensive.

IMO the right direction to fix this bug is saving the actual formula only when app is closed (using Component.onDestruction) and when it losts focus (creating a bind on Qt.application.state[0]).

Let me know what you think.

[0]: http://doc.qt.io/qt-5/qml-qtqml-qt.html#application-prop

« Back to merge proposal