diff options
author | Glenn Watson <glenn.watson@nokia.com> | 2012-07-24 11:41:50 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-08 07:55:19 +0200 |
commit | 6ebf215fdaf2d757ab90ae4d46c4b938e978e2dc (patch) | |
tree | 515da352f1cc4d5567b6d93f0b19952b2e27d705 /src/imports | |
parent | 92562eacbc3c614a83a734f1108ed7df02415eae (diff) |
Add type name to singleton (module api) implementations.
This change renames the previous module api implementation
to singleton types.
When a singleton type is registered, a type name must be provided
that is used when accessing the API from QML. This makes the
implementation more consistent with the rest of QML.
Task-number: QTBUG-26549
Change-Id: Iab0bb1ccf516bd3ae20aee562a64d22976e0aecd
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/localstorage/plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index bdb2f80bd8..a16b74a96b 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -454,9 +454,9 @@ through the data. /*! \qmlmodule QtQuick.LocalStorage 2 \title QML Module QtQuick.LocalStorage 2.0 - \brief Provides a JavaScript module API for accessing a local SQLite database + \brief Provides a JavaScript object singleton type for accessing a local SQLite database - This is a module API for reading and writing to SQLite databases. + This is a singleton type for reading and writing to SQLite databases. \section1 Methods @@ -699,7 +699,7 @@ public: void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == "QtQuick.LocalStorage"); - qmlRegisterModuleApi<QQuickLocalStorage>(uri, 2, 0, module_api_factory); + qmlRegisterSingletonType<QQuickLocalStorage>(uri, 2, 0, "LocalStorage", module_api_factory); } }; |