aboutsummaryrefslogtreecommitdiff
path: root/settings.h
AgeCommit message (Collapse)Author
2016-09-06Relaxed VS version a bit.Kitsune Ral
2016-09-06Corrected the faulty VS versionKitsune Ral
2016-09-06Fix building with VS2013Kitsune Ral
VS2013 doesn't like 'using' statements if a base class has private constructors (as in QSettings - Q_DISABLE_COPY makes a copy constructor private and deleted). Hence a workaround.
2016-09-06Settings, SettingsGroup, AccountSettingsKitsune Ral
Settings is a trivial wrapper around QSettings that makes value() and setValue() available from QML (Tensor has the same class atm). SettingsGroup is a cleaner way to reach for sections inside QSettings. It doesn't refer to another QSettings class, rather derives from it and overrides functions that deal with groups. AccountSettings, contrary to the two above, is by no means generic: it serves the specific purpose of storing settings of a single account in a uniform way. Rationale of it is that key literals like "keep_logged_in" cannot be enforced, while function names can; and the same goes for QVariants stored inside - the class enforces specific types while allowing further extension by clients. Note that functions in QSettings are not virtual, so all these classes are not polymorphic.