summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-06-06 20:03:49 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-06-06 20:03:49 +0200
commit410f6f0b3d70c4caa0a82d4d36eb02df3e2d628d (patch)
tree08c63574f9b15753a4d6215f68b5ba9f7fe5bd80 /src
parent7302615d35958b1b07293187281cb44d864663d2 (diff)
parentefac3cd245e2610924133e304d15bf726f5864f5 (diff)
downloadqtenginio-5.5.tar.gz
Merge remote-tracking branch 'origin/1.2' into dev5.51.3
Change-Id: I719253298a760e88a6ebab0cbf27e35cecc418a9
Diffstat (limited to 'src')
-rw-r--r--src/enginio_client/doc/qtenginio.qdocconf2
-rw-r--r--src/enginio_client/enginioidentity.cpp8
-rw-r--r--src/enginio_client/enginiomodel.cpp2
-rw-r--r--src/enginio_client/enginioreply.cpp8
-rw-r--r--src/enginio_plugin/enginioplugin.cpp57
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