Commit graph

6 commits

Author SHA1 Message Date
Dag Henning Liodden Sørbø
2b6cb8b432 Change to new preferences model
The old Preferences struct holding all preferences are removed in favor of a
new Preferences class which acts as a proxy for QSettings. The settings stored
in QSettings are accessed directly through access methods like getBool(key),
getInt(key), etc. and changed with setPreference(key, value).

Since we are using QSettings directly the preferences are stored automatically
without the need for a custom write() and read() method like before.

The preferences.cpp/.h and prefdialog.cpp/h are refactored to have fewer
responsibilities than before. The Preferences class are all about storing and
retrieving preferences - it should not contain any code to handle any other
aspect of MuseScore.

Testing:
The Preferences class can be used in tests. All preferences are initialized with
default values in mtest. If a test requires that a preference has a specific
value it can be changed using setPreference() for that single test. In the tests
the preferences are stored in memory only.

The Preference class is supposed to be used as a singleton. In preferences.h an
'extern Preferences preferences' is set and it is defined in preferences.cpp. All
files which includes preferences.h have access to the 'preferences' singleton
and should use this to get and set preferences.
2018-02-08 16:59:10 +01:00
lasconic
f5d98bb0b5 experiment with Fusion Theme to replace Oxygen 2016-09-29 22:27:31 +02:00
lasconic
46c91573de fix #116881: dynamic translation 2016-07-01 15:28:35 +02:00
Joachim Schmitz
6f439106c0 various i18n text improvements 2016-06-06 11:35:54 +02:00
ws
9ebabcc2e5 add namespace Ms 2013-05-13 19:43:59 +02:00
ws
1e355d7bcf fixes for workspace; some palette tweaking 2013-03-15 17:52:58 +01:00