diff options
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 086465d..6e0c8ac 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 |