Migration of QtlMovie settings from old to new format. More...
Public Member Functions | |
QtlMovieSettingsMigration (QtlMovieSettings *settings, QtlLogger *log) | |
Constructor If an old-style XML configuration file exists, the configuration is loaded into the new format and the old file is renamed with an old prefix. More... | |
Private Member Functions | |
bool | getBool (const QString &name, void(QtlMovieSettings::*setter)(bool)) |
Decode an XML element with a "value" boolean attribute. More... | |
bool | getGeometry (const QString &name, void(QtlMovieSettings::*setter)(const QWidget *)) |
Decode an XML element with geometry attributes. More... | |
template<typename INT > | |
bool | getInt (const QString &name, void(QtlMovieSettings::*setter)(INT)) |
Decode an XML element with a "value" integer or enum attribute. More... | |
bool | getList (const QString &name, void(QtlMovieSettings::*setter)(const QStringList &)) |
Decode an XML element with a "value" comma-separated string list attribute. More... | |
bool | getString (const QString &name, void(QtlMovieSettings::*setter)(const QString &)) |
XML reader for the old-style configuration file. More... | |
bool | getString2 (const QString &name, void(QtlMovieSettings::*setter)(const QString &type, const QString &value)) |
Decode an XML element with "type" and "value" string attributes. More... | |
Private Attributes | |
QtlMovieSettings * | _settings |
QXmlStreamReader | _xml |
The settings to fill from an old-style configuration file. More... | |
Migration of QtlMovie settings from old to new format.
The old format used an XML-file to store the settings. The new format is based QSettings and uses a platform-dependent backing store.
This class manipulates legacy data and shall not be modified.
QtlMovieSettingsMigration::QtlMovieSettingsMigration | ( | QtlMovieSettings * | settings, |
QtlLogger * | log | ||
) |
Constructor If an old-style XML configuration file exists, the configuration is loaded into the new format and the old file is renamed with an old prefix.
[in,out] | settings | Where to store the converted old configuration. |
[in] | log | Where to log errors. |
|
private |
XML reader for the old-style configuration file.
Decode an XML element with a "value" string attribute.
[in] | name | Expected element name. |
[in] | setter | The setter method to invoke with the decoded value. |
|
private |
Decode an XML element with "type" and "value" string attributes.
[in] | name | Expected element name. |
[in] | setter | The setter method to invoke with the decoded type and value. |
|
private |
Decode an XML element with a "value" comma-separated string list attribute.
[in] | name | Expected element name. |
[in] | setter | The setter method to invoke with the decoded value. |
|
private |
Decode an XML element with a "value" boolean attribute.
[in] | name | Expected element name. |
[in] | setter | The setter method to invoke with the decoded value. |
|
inlineprivate |
Decode an XML element with a "value" integer or enum attribute.
INT | An integer or enum type. |
[in] | name | Expected element name. |
[in] | setter | The setter method to invoke with the decoded value. |
|
private |
Decode an XML element with geometry attributes.
[in] | name | Expected element name. |
[in] | setter | The setter method to invoke with a widget of the decoded geometry. |
|
private |
|
private |
The settings to fill from an old-style configuration file.