Commit d40a41a3 authored by Karel Slaný's avatar Karel Slaný

Implemented saveAllSettings() which takes a QVariant argument.

parent 8b8868ff
......@@ -291,6 +291,11 @@ void GlobalSettingsQmlWrapper::setLastUpdateToNow(void)
globSet.setLastUpdate(Settings::nowStr());
}
void GlobalSettingsQmlWrapper::saveAllSettings(const QVariant &acntModelVariant)
{
saveAllSettings(AccountListModel::fromVariant(acntModelVariant));
}
void GlobalSettingsQmlWrapper::saveAllSettings(
const AccountListModel *accountModel)
{
......
......@@ -165,9 +165,23 @@ public:
/*!
* @brief Gathers all settings and stores them into configuration file.
*
* @param[in] accountModel Account model to take data from.
* @note QML is bitching about unknown method parameter type
* const AccountListModel* when passing a model via multiple
* variables. That's why there is a method that directly accepts
* a variant.
*
* @param[in,out] acntModelVariant QVariant holding account model
* to be read.
*/
Q_INVOKABLE static
void saveAllSettings(const QVariant &acntModelVariant);
/*!
* @brief Gathers all settings and stores them into configuration file.
*
* @param[in] accountModel Account model to take data from.
*/
static
void saveAllSettings(const AccountListModel *accountModel);
signals:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment