diff --git a/scripting/dataenginescript.cpp b/scripting/dataenginescript.cpp index 2297ffeb1..616dd202d 100644 --- a/scripting/dataenginescript.cpp +++ b/scripting/dataenginescript.cpp @@ -109,6 +109,13 @@ void DataEngineScript::setData(const QString &source, const QVariant &value) } } +void DataEngineScript::setData(const QString &source, const DataEngine::Data &values) +{ + if (d->dataEngine) { + d->dataEngine->setData(source, values); + } +} + void DataEngineScript::removeAllData(const QString &source) { if (d->dataEngine) { diff --git a/scripting/dataenginescript.h b/scripting/dataenginescript.h index edb05c972..b5ed3ec45 100644 --- a/scripting/dataenginescript.h +++ b/scripting/dataenginescript.h @@ -119,6 +119,15 @@ protected: void setData(const QString &source, const QString &key, const QVariant &value); void setData(const QString &source, const QVariant &value); + + /** + * Adds a set of values to a source + * @param source the name of the source to set the data on + * @values a key/value collection to add to the source + * @since 4.5 + */ + void setData(const QString &source, const DataEngine::Data &values); + void removeAllData(const QString &source); void removeData(const QString &source, const QString &key); void setMaxSourceCount(uint limit);