Refactor file menu

Authored by wojnilowicz on Jun 2 2018, 12:57 PM.

Description

Refactor file menu

The purpose of this patch is to make file opening transparent. Changes:

  1. no wild attaching and detaching storage

That was cause of a memory leak. Now a storage is created and attached only after successful opening of a file.

  1. new KMyMoneyApp::Private::fileAction

It's central place for gathering all actions, app needs to undertake after a change in load state of a file.

  1. user can choose to save newly created file as sql

Previously only xml was possible. Now user can even choose to not save it at all, which makes app independent from any storage plugin.

  1. app doesn't crash if no storage plugin is loaded
  1. no unnecessary update of actions which depend on load state of file

Differential Revision: https://phabricator.kde.org/D13408

Details

Committed
wojnilowiczJun 10 2018, 3:23 PM
Differential Revision
D13408: Refactor file menu
Parents
R261:7a3aba071f63: Remove redundant CMake statements
Branches
Unknown
Tags
Unknown