Merge lp://qastaging/~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-app-remember-last-formula into lp://qastaging/ubuntu-calculator-app

Proposed by Bartosz Kosiorek
Status: Needs review
Proposed branch: lp://qastaging/~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-app-remember-last-formula
Merge into: lp://qastaging/ubuntu-calculator-app
Diff against target: 233 lines (+50/-46)
2 files modified
app/ubuntu-calculator-app.qml (+49/-46)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp://qastaging/~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-app-remember-last-formula
Reviewer Review Type Date Requested Status
Bartosz Kosiorek Needs Information
Jenkins Bot continuous-integration Approve
Review via email: mp+278900@code.qastaging.launchpad.net

Commit message

Remember formula from InputField after application close (LP: #1520508)

Description of the change

Remember formula from InputField after application close (LP: #1520508)

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
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

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

From user point of view it will be great to save progress every change.

I will check the impact on performance and give you performance comparison.

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

I checked that and saving is very fast, so from user perspective there is more benefits of savings formula every change (due to out of memory, which happens when you will open too many tabs in webbrowser).

Could you please double check that issue with profiler?

review: Needs Information
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

I checked that and saving is very fast, so from user perspective there is more benefits of savings formula every change (due to out of memory, which happens when you will open too many tabs in webbrowser).

Could you please double check that issue with profiler?

review: Needs Information

Unmerged revisions

247. By Bartosz Kosiorek

Remember formula from InputField after application close (LP: #1520508)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches