diff options
-rw-r--r-- | doc/snippets/models.qml | 2 | ||||
-rw-r--r-- | doc/snippets/simple.qml | 6 | ||||
-rw-r--r-- | examples/quick/image-gallery/image-gallery.qml | 2 | ||||
-rw-r--r-- | examples/quick/socialtodos/socialtodos.qml | 2 | ||||
-rw-r--r-- | examples/quick/todos/todo.qml | 2 | ||||
-rw-r--r-- | examples/quick/users/users.qml | 2 | ||||
-rw-r--r-- | src/enginio_plugin/enginioplugin.cpp | 2 | ||||
-rw-r--r-- | src/enginio_plugin/enginioqmlclient.cpp | 30 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_enginioclient.qml | 4 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_enginioreply.qml | 2 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_files.qml | 2 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_identity.qml | 2 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_model.qml | 14 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_query.qml | 2 |
14 files changed, 37 insertions, 37 deletions
diff --git a/doc/snippets/models.qml b/doc/snippets/models.qml index f801696..5e5dcfb 100644 --- a/doc/snippets/models.qml +++ b/doc/snippets/models.qml @@ -46,7 +46,7 @@ Rectangle { width: 400 height: 400 - Enginio { + EnginioClient { id: client backendId: Config.id onFinished: console.log("Engino request finished." + reply.data) diff --git a/doc/snippets/simple.qml b/doc/snippets/simple.qml index 6bf3f7a..89b1b4d 100644 --- a/doc/snippets/simple.qml +++ b/doc/snippets/simple.qml @@ -45,21 +45,21 @@ import Enginio 1.0 Rectangle { //! [client] - Enginio { + EnginioClient { id: client backendId: "YOUR_BACKEND_ID" // from Enginio Dashboard } //! [client] //! [client-signals] - Enginio { + EnginioClient { onFinished: console.log("Engino request finished." + reply.data) onError: console.log("Enginio error " + reply.errorCode + ": " + reply.errorString) } //! [client-signals] //! [client-query] - Enginio { + EnginioClient { Component.onCompleted: query({"objectType": "objects.image"}) } //! [client-query] diff --git a/examples/quick/image-gallery/image-gallery.qml b/examples/quick/image-gallery/image-gallery.qml index 9c2425e..a4c2237 100644 --- a/examples/quick/image-gallery/image-gallery.qml +++ b/examples/quick/image-gallery/image-gallery.qml @@ -69,7 +69,7 @@ Rectangle { // Enginio client specifies the backend to be used //! [client] - Enginio { + EnginioClient { id: client backendId: enginioBackendId onError: console.log("Enginio error: " + reply.errorCode + ": " + reply.errorString) diff --git a/examples/quick/socialtodos/socialtodos.qml b/examples/quick/socialtodos/socialtodos.qml index 09ce7c2..4e0e2ad 100644 --- a/examples/quick/socialtodos/socialtodos.qml +++ b/examples/quick/socialtodos/socialtodos.qml @@ -58,7 +58,7 @@ Rectangle { TodoLists{} } - Enginio { + EnginioClient { id: enginioClient backendId: enginioBackendId diff --git a/examples/quick/todos/todo.qml b/examples/quick/todos/todo.qml index 23ad46e..3eaf775 100644 --- a/examples/quick/todos/todo.qml +++ b/examples/quick/todos/todo.qml @@ -52,7 +52,7 @@ Rectangle { //![model] EnginioModel { id: enginioModel - client: Enginio { + client: EnginioClient { backendId: enginioBackendId onError: console.log("Enginio error:", JSON.stringify(reply.data)) } diff --git a/examples/quick/users/users.qml b/examples/quick/users/users.qml index e8c3b0c..7b47483 100644 --- a/examples/quick/users/users.qml +++ b/examples/quick/users/users.qml @@ -50,7 +50,7 @@ Rectangle { color: "#f4f4f4" //![client] - Enginio { + EnginioClient { id: enginioClient backendId: enginioBackendId diff --git a/src/enginio_plugin/enginioplugin.cpp b/src/enginio_plugin/enginioplugin.cpp index 7e764ae..0a0d5c8 100644 --- a/src/enginio_plugin/enginioplugin.cpp +++ b/src/enginio_plugin/enginioplugin.cpp @@ -92,7 +92,7 @@ void EnginioPlugin::initializeEngine(QQmlEngine *engine, const char *uri) void EnginioPlugin::registerTypes(const char *uri) { // @uri Enginio - qmlRegisterType<EnginioQmlClient>(uri, 1, 0, "Enginio"); + qmlRegisterType<EnginioQmlClient>(uri, 1, 0, "EnginioClient"); qmlRegisterUncreatableType<EnginioClient>(uri, 1, 0, "__Enginio", "__Enginio should not be instantiated from QML directly."); qmlRegisterType<EnginioQmlModel>(uri, 1, 0, "EnginioModel"); qmlRegisterUncreatableType<EnginioReply>(uri, 1, 0, "__EnginioReply", "__EnginioReply cannot be instantiated."); diff --git a/src/enginio_plugin/enginioqmlclient.cpp b/src/enginio_plugin/enginioqmlclient.cpp index 6eb3707..336c2c2 100644 --- a/src/enginio_plugin/enginioqmlclient.cpp +++ b/src/enginio_plugin/enginioqmlclient.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE /*! - \qmltype Enginio + \qmltype EnginioClient \instantiates EnginioQmlClient \inqmlmodule Enginio 1 \ingroup engino-qml @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE \brief client interface to access Enginio \snippet simple.qml import - Enginio is the heart of the QML API for Enginio. + EnginioClient is the heart of the QML API for Enginio. It is used for all communication with the Enginio backend. \l EnginioModel compliments it to make handling of multiple objects simple. @@ -71,21 +71,21 @@ QT_BEGIN_NAMESPACE \snippet simple.qml client Once the backend is configured, it is possible to run queries by calling query on - Enginio. + EnginioClient. For example to get all objects stored with the type "objects.image" run this query: \snippet simple.qml client-query - Enginio gives you a convenient way to handle the responses to your queryies as well: + EnginioClient gives you a convenient way to handle the responses to your queryies as well: \snippet simple.qml client-signals */ /*! - \qmlproperty string Enginio1::Enginio::backendId + \qmlproperty string Enginio1::EnginioClient::backendId Enginio backend ID. This can be obtained from the Enginio dashboard. */ /*! - \qmlproperty url Enginio1::Enginio::serviceUrl + \qmlproperty url Enginio1::EnginioClient::serviceUrl \internal Enginio backend URL. @@ -93,29 +93,29 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::fullTextSearch(QJSValue query) + \qmlmethod EnginioReply Enginio1::EnginioClient::fullTextSearch(QJSValue query) \brief Perform a full text search on the database */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::query(QJSValue query, Operation operation) + \qmlmethod EnginioReply Enginio1::EnginioClient::query(QJSValue query, Operation operation) \brief Query the database. */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::create(QJSValue query, Operation operation) + \qmlmethod EnginioReply Enginio1::EnginioClient::create(QJSValue query, Operation operation) \brief Create an object in the database. */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::update(QJSValue query, Operation operation) + \qmlmethod EnginioReply Enginio1::EnginioClient::update(QJSValue query, Operation operation) \brief Update an object in the database. */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::remove(QJSValue query, Operation operation) + \qmlmethod EnginioReply Enginio1::EnginioClient::remove(QJSValue query, Operation operation) \brief Remove an object from the database. */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::uploadFile(QJSValue object, QUrl file) + \qmlmethod EnginioReply Enginio1::EnginioClient::uploadFile(QJSValue object, QUrl file) \brief Stores a \a file attached to an \a object in Enginio Each uploaded file needs to be associated with an object in the database. @@ -136,7 +136,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod EnginioReply Enginio1::Enginio::downloadUrl(QJSValue object) + \qmlmethod EnginioReply Enginio1::EnginioClient::downloadUrl(QJSValue object) \brief Get the download URL for a file \snippet qmltests/tst_files.qml download @@ -151,7 +151,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlsignal Enginio1::Enginio::finished(QJSValue reply) + \qmlsignal Enginio1::EnginioClient::finished(QJSValue reply) This signal is emitted when a \a reply finishes. \note that this signal is alwasy emitted, independent of whether @@ -159,7 +159,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlsignal Enginio1::Enginio::error(QJSValue reply) + \qmlsignal Enginio1::EnginioClient::error(QJSValue reply) This signal is emitted when a \a reply finishes and contains an error. */ diff --git a/tests/auto/qmltests/tst_enginioclient.qml b/tests/auto/qmltests/tst_enginioclient.qml index b64c394..30c8bc9 100644 --- a/tests/auto/qmltests/tst_enginioclient.qml +++ b/tests/auto/qmltests/tst_enginioclient.qml @@ -47,7 +47,7 @@ import "config.js" as AppConfig Item { id: root - Enginio { + EnginioClient { id: enginio backendId: AppConfig.backendData.id serviceUrl: AppConfig.backendData.serviceUrl @@ -84,7 +84,7 @@ Item { TestCase { name: "EnginioClient: MostlyFakeReplies" - Enginio { + EnginioClient { id: fake backendId: AppConfig.backendData.id serviceUrl: AppConfig.backendData.serviceUrl diff --git a/tests/auto/qmltests/tst_enginioreply.qml b/tests/auto/qmltests/tst_enginioreply.qml index 075c26c..48f1dde 100644 --- a/tests/auto/qmltests/tst_enginioreply.qml +++ b/tests/auto/qmltests/tst_enginioreply.qml @@ -47,7 +47,7 @@ import "config.js" as AppConfig Item { id: root - Enginio { + EnginioClient { id: enginio backendId: AppConfig.backendData.id serviceUrl: AppConfig.backendData.serviceUrl diff --git a/tests/auto/qmltests/tst_files.qml b/tests/auto/qmltests/tst_files.qml index 4ab405b..039e1ad 100644 --- a/tests/auto/qmltests/tst_files.qml +++ b/tests/auto/qmltests/tst_files.qml @@ -52,7 +52,7 @@ import "config.js" as AppConfig Item { id: root - Enginio { + EnginioClient { id: enginio backendId: AppConfig.backendData.id serviceUrl: AppConfig.backendData.serviceUrl diff --git a/tests/auto/qmltests/tst_identity.qml b/tests/auto/qmltests/tst_identity.qml index 945d7d5..10baffd 100644 --- a/tests/auto/qmltests/tst_identity.qml +++ b/tests/auto/qmltests/tst_identity.qml @@ -47,7 +47,7 @@ import "config.js" as AppConfig Item { id: root - Enginio { + EnginioClient { id: enginio backendId: AppConfig.backendData.id serviceUrl: AppConfig.backendData.serviceUrl diff --git a/tests/auto/qmltests/tst_model.qml b/tests/auto/qmltests/tst_model.qml index 0262300..e98b41a 100644 --- a/tests/auto/qmltests/tst_model.qml +++ b/tests/auto/qmltests/tst_model.qml @@ -87,7 +87,7 @@ Item { EnginioModel { id: modelInvalidRow - client: Enginio { + client: EnginioClient { serviceUrl: AppConfig.backendData.serviceUrl backendId: AppConfig.backendData.id } @@ -119,7 +119,7 @@ Item { TestCase { name: "EnginioModel: create" - Enginio { + EnginioClient { id: enginioClientCreate serviceUrl: AppConfig.backendData.serviceUrl @@ -208,7 +208,7 @@ Item { EnginioModel { id: modelQuery - client: Enginio { + client: EnginioClient { id: enginioClientQuery serviceUrl: AppConfig.backendData.serviceUrl @@ -270,7 +270,7 @@ Item { EnginioModel { id: modelModify - client: Enginio { + client: EnginioClient { id: enginioClientModify serviceUrl: AppConfig.backendData.serviceUrl @@ -331,7 +331,7 @@ Item { EnginioModel { id: modelModifyUndblocked - client: Enginio { + client: EnginioClient { id: enginioClientModifyUndblocked serviceUrl: AppConfig.backendData.serviceUrl @@ -391,7 +391,7 @@ Item { EnginioModel { id: modelModifyChaos - client: Enginio { + client: EnginioClient { id: enginioClientModifyChaos serviceUrl: AppConfig.backendData.serviceUrl @@ -452,7 +452,7 @@ Item { EnginioModel { id: modelRowCount - client: Enginio { + client: EnginioClient { serviceUrl: AppConfig.backendData.serviceUrl property int errorCount: 0 diff --git a/tests/auto/qmltests/tst_query.qml b/tests/auto/qmltests/tst_query.qml index 92e8fe9..1005092 100644 --- a/tests/auto/qmltests/tst_query.qml +++ b/tests/auto/qmltests/tst_query.qml @@ -47,7 +47,7 @@ import "config.js" as AppConfig Item { id: root - Enginio { + EnginioClient { id: enginio backendId: AppConfig.backendData.id serviceUrl: AppConfig.backendData.serviceUrl |