diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-31 10:19:05 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-31 10:20:34 +0200 |
commit | efac3cd245e2610924133e304d15bf726f5864f5 (patch) | |
tree | c872124a0ea7c40056b69babaf14478f0cb02ce4 /src | |
parent | 99c09ff33b7516a568455c6980f0f81c59a4fb3a (diff) | |
parent | 30ee95cd19f9a435ce337b4f651175ed2e8ba2e5 (diff) |
Merge remote-tracking branch 'origin/1.1' into '1.2'v1.2.0-beta1v1.2.0
Conflicts:
.qmake.conf
LICENSE.LGPLv21
LICENSE.LGPLv3
src/enginio_client/chunkdevice_p.h
src/enginio_client/enginio.h
src/enginio_client/enginiobackendconnection.cpp
src/enginio_client/enginiobackendconnection_p.h
src/enginio_client/enginiobasemodel.h
src/enginio_client/enginiobasemodel_p.h
src/enginio_client/enginioclient.cpp
src/enginio_client/enginioclient.h
src/enginio_client/enginioclient_global.h
src/enginio_client/enginioclient_p.h
src/enginio_client/enginioclientconnection.h
src/enginio_client/enginiodummyreply.cpp
src/enginio_client/enginiodummyreply_p.h
src/enginio_client/enginiofakereply.cpp
src/enginio_client/enginiofakereply_p.h
src/enginio_client/enginioidentity.cpp
src/enginio_client/enginioidentity.h
src/enginio_client/enginiomodel.cpp
src/enginio_client/enginiomodel.h
src/enginio_client/enginiooauth2authentication.h
src/enginio_client/enginioobjectadaptor_p.h
src/enginio_client/enginioreply.cpp
src/enginio_client/enginioreply.h
src/enginio_client/enginioreply_p.h
src/enginio_client/enginioreplystate.h
src/enginio_client/enginiostring.cpp
src/enginio_client/enginiostring_p.h
src/enginio_plugin/enginioplugin.cpp
src/enginio_plugin/enginioplugin_p.h
src/enginio_plugin/enginioqmlclient.cpp
src/enginio_plugin/enginioqmlclient_p.h
src/enginio_plugin/enginioqmlclient_p_p.h
src/enginio_plugin/enginioqmlmodel.cpp
src/enginio_plugin/enginioqmlmodel_p.h
src/enginio_plugin/enginioqmlobjectadaptor_p.h
src/enginio_plugin/enginioqmlreply.cpp
src/enginio_plugin/enginioqmlreply_p.h
tests/auto/common/common.cpp
tests/auto/common/common.h
tests/auto/enginioclient/tst_enginioclient.cpp
tests/auto/enginiomodel/tst_enginiomodel.cpp
tests/auto/files/tst_files.cpp
tests/auto/identity/common/identitycommon.h
tests/auto/identity/oauth2authentication/tst_oauth2authentication.cpp
tests/auto/notifications/tst_notifications.cpp
tests/auto/qmltests/tst_enginioclient.qml
tests/auto/qmltests/tst_enginioreply.qml
tests/auto/qmltests/tst_files.qml
tests/auto/qmltests/tst_identity.qml
tests/auto/qmltests/tst_model.qml
tests/auto/qmltests/tst_qmltest.cpp
tests/auto/qmltests/tst_query.qml
Change-Id: Icb6a167ba58b41e1a8e4d2c8f78213eae9472864
Diffstat (limited to 'src')
-rw-r--r-- | src/enginio_client/doc/qtenginio.qdocconf | 2 | ||||
-rw-r--r-- | src/enginio_client/enginioidentity.cpp | 8 | ||||
-rw-r--r-- | src/enginio_client/enginiomodel.cpp | 2 | ||||
-rw-r--r-- | src/enginio_client/enginioreply.cpp | 8 | ||||
-rw-r--r-- | src/enginio_plugin/enginioplugin.cpp | 57 |
5 files changed, 60 insertions, 17 deletions
diff --git a/src/enginio_client/doc/qtenginio.qdocconf b/src/enginio_client/doc/qtenginio.qdocconf index ca1385c..c9037be 100644 --- a/src/enginio_client/doc/qtenginio.qdocconf +++ b/src/enginio_client/doc/qtenginio.qdocconf @@ -23,7 +23,7 @@ exampledirs += \ # Specify example install dir under QT_INSTALL_EXAMPLES examplesinstallpath = enginio/widgets -depends += qtcore qtgui qtwidgets qtnetwork qtenginiooverview +depends += qtcore qtgui qtwidgets qtnetwork qtquick qtenginioqml qtenginiooverview qhp.projects = QtEnginio diff --git a/src/enginio_client/enginioidentity.cpp b/src/enginio_client/enginioidentity.cpp index 4bbf4fe..910b9b3 100644 --- a/src/enginio_client/enginioidentity.cpp +++ b/src/enginio_client/enginioidentity.cpp @@ -216,11 +216,11 @@ public: To authenticate an instance of EnginioClient called \a client such code may be used: \code - EnginioOAuth2Authentication identity; - identity.setUser(_user); - identity.setPassword(_user); + EnginioOAuth2Authentication *identity = new EnginioOAuth2Authentication(client); + identity->setUser(_user); + identity->setPassword(_password); - client.setIdentity(&identity); + client->setIdentity(identity); \endcode Setting the identity will trigger an asynchronous request, resulting in EnginioClient::authenticationState() diff --git a/src/enginio_client/enginiomodel.cpp b/src/enginio_client/enginiomodel.cpp index 214725a..1a0fef1 100644 --- a/src/enginio_client/enginiomodel.cpp +++ b/src/enginio_client/enginiomodel.cpp @@ -406,7 +406,7 @@ EnginioBaseModel::~EnginioBaseModel() \note Some objects may not contain value for a static role, it may happen for example when an item is not in sync with the backend. - \sa EnginioBaseModel::roleNames() + \sa QAbstractItemModel::roleNames() */ /*! diff --git a/src/enginio_client/enginioreply.cpp b/src/enginio_client/enginioreply.cpp index 4ae204d..60a15fa 100644 --- a/src/enginio_client/enginioreply.cpp +++ b/src/enginio_client/enginioreply.cpp @@ -270,8 +270,8 @@ bool EnginioReplyState::delayFinishedSignal() /*! \fn bool EnginioReply::isError() const - \brief EnginioReplyState::isError returns whether this reply was unsuccessful - \return true if the reply did not succeed + Returns whether this reply was unsuccessful. + Returns true if the reply did not succeed. */ bool EnginioReplyState::isError() const @@ -282,8 +282,8 @@ bool EnginioReplyState::isError() const /*! \fn bool EnginioReply::isFinished() const - \brief Returns whether this reply was finished or not - \return true if the reply was finished, false otherwise. + Returns whether this reply was finished or not. + Returns true if the reply was finished. */ bool EnginioReplyState::isFinished() const diff --git a/src/enginio_plugin/enginioplugin.cpp b/src/enginio_plugin/enginioplugin.cpp index 4d98e8f..1fd2b7f 100644 --- a/src/enginio_plugin/enginioplugin.cpp +++ b/src/enginio_plugin/enginioplugin.cpp @@ -48,11 +48,11 @@ QT_BEGIN_NAMESPACE /*! - * \qmlmodule Enginio 1.0 - * \title Enginio QML Plugin - * - * The Enginio QML plugin provides access to the Enginio service through a set of - * QML types. + \qmlmodule Enginio 1.0 + \title Enginio QML Plugin + + The Enginio QML plugin provides access to the Enginio service through a set of + QML types. */ class EnginioNetworkAccessManagerFactory: public QQmlNetworkAccessManagerFactory @@ -77,11 +77,54 @@ void EnginioPlugin::initializeEngine(QQmlEngine *engine, const char *uri) engine->setNetworkAccessManagerFactory(&factory); } else { qWarning() << "Enginio client failed to install QQmlNetworkAccessManagerFactory" - "on QML engine because a differnt factory is already attached, It" - " is recomanded to use QNetworkAccessManager delivered by Enginio"; + "on QML engine because a different factory is already attached, it" + " is recommended to use QNetworkAccessManager delivered by Enginio"; } } +/*! + \qmltype EnginioOAuth2Authentication + \since 5.3 + \instantiates EnginioOAuth2Authentication + \inqmlmodule Enginio + \ingroup engino-qml + \target EnginioOAuth2AuthenticationQml + \brief Represents a user that is authenticated directly by the backend using OAuth2 standard. + + This component can authenticate a user by verifying the user's login and password. + The user has to exist in the backend already. + + To authenticate an instance of EnginioClient called \a client such code may be used: + \code + EnginioClient { + ... + identity: oauth2 + } + EnginioOAuth2Authentication { + id: oauth2 + user: "userName" + password: "userPassword" + } + \endcode + + Setting the identity on the EnginioClient will trigger an asynchronous request, resulting in + EnginioClient::authenticationState changing. + + \sa EnginioClient::authenticationState EnginioClient::identity EnginioClient::sessionAuthenticated + \sa EnginioClient::sessionAuthenticationError() EnginioClient::sessionTerminated() +*/ + +/*! + \qmlproperty string EnginioOAuth2Authentication::user + This property contains the user name used for authentication. +*/ + +/*! + \qmlproperty string EnginioOAuth2Authentication::password + This property contains the password used for authentication. +*/ + + void EnginioPlugin::registerTypes(const char *uri) { // @uri Enginio |