diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-11-21 13:46:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-21 17:05:06 +0100 |
commit | b706dfb290dc41d0b958e25ffbdd5f2fd51c08a2 (patch) | |
tree | d8c6f11d1b045f63f1d7c1cb0ef48f4dc45f833e | |
parent | 46471dc0b15c39809ce4dc06203b776c41cc7ac8 (diff) | |
download | qtenginio-b706dfb290dc41d0b958e25ffbdd5f2fd51c08a2.tar.gz |
API: Rename ObjectAclOperation to AccessControlOperation
[ChangeLog][API] Renamed ObjectAclOperation to AccessControlOperation
Change-Id: I5490bae6790e69384d2a3de60962071525630ffe
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
-rw-r--r-- | examples/quick/socialtodos/ShareDialog.qml | 4 | ||||
-rw-r--r-- | src/enginio_client/enginioclient.cpp | 2 | ||||
-rw-r--r-- | src/enginio_client/enginioclient_p.h | 6 | ||||
-rw-r--r-- | src/enginio_client/enginioclientbase.h | 2 | ||||
-rw-r--r-- | src/enginio_plugin/plugins.qmltypes | 2 | ||||
-rw-r--r-- | tests/auto/enginioclient/tst_enginioclient.cpp | 20 | ||||
-rw-r--r-- | tests/auto/enginiomodel/tst_enginiomodel.cpp | 2 | ||||
-rw-r--r-- | tests/auto/identity/common/identitycommon.h | 2 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_enginioclient.qml | 12 | ||||
-rw-r--r-- | tests/auto/qmltests/tst_model.qml | 4 |
10 files changed, 28 insertions, 28 deletions
diff --git a/examples/quick/socialtodos/ShareDialog.qml b/examples/quick/socialtodos/ShareDialog.qml index 0f0d3f1..d9daa07 100644 --- a/examples/quick/socialtodos/ShareDialog.qml +++ b/examples/quick/socialtodos/ShareDialog.qml @@ -51,7 +51,7 @@ Rectangle { property var userData: new Object Component.onCompleted: { - var aclQuery = enginioClient.query({ "objectType": "objects.todoLists", "id": listId }, Enginio.ObjectAclOperation) + var aclQuery = enginioClient.query({ "objectType": "objects.todoLists", "id": listId }, Enginio.AccessControlOperation) aclQuery.finished.connect(function() { aclData = aclQuery.data } ) var usersQuery = enginioClient.query({ "objectType": "users", }, Enginio.UsersOperation) @@ -122,7 +122,7 @@ Rectangle { console.log("\nUpdated JSON:", JSON.stringify(aclData)) enginioClient.update( { "id": listId, "objectType": "objects.todoLists", "access": aclData }, - Enginio.ObjectAclOperation + Enginio.AccessControlOperation ) // changing the contents of a JSON object does not emit diff --git a/src/enginio_client/enginioclient.cpp b/src/enginio_client/enginioclient.cpp index 45cd85f..3c60b8c 100644 --- a/src/enginio_client/enginioclient.cpp +++ b/src/enginio_client/enginioclient.cpp @@ -152,7 +152,7 @@ QT_BEGIN_NAMESPACE users. \value ObjectOperation Operate on objects - \value ObjectAclOperation Operate on the ACL + \value AccessControlOperation Operate on the ACL \value FileOperation Operate with files \value UserOperation Operate on users \value UsergroupOperation Operate on groups diff --git a/src/enginio_client/enginioclient_p.h b/src/enginio_client/enginioclient_p.h index c4e2bb3..75783f2 100644 --- a/src/enginio_client/enginioclient_p.h +++ b/src/enginio_client/enginioclient_p.h @@ -124,7 +124,7 @@ class ENGINIOCLIENT_EXPORT EnginioClientBasePrivate : public QObjectPrivate result.append(objectType.replace('.', '/')); break; } - case ObjectAclOperation: + case AccessControlOperation: { QString objectType = object[EnginioString::objectType].toString(); if (objectType.isEmpty()) { @@ -283,7 +283,7 @@ public: enum Operation { // Do not forget to keep in sync with EnginioClientBase::Operation! ObjectOperation = EnginioClientBase::ObjectOperation, - ObjectAclOperation = EnginioClientBase::ObjectAclOperation, + AccessControlOperation = EnginioClientBase::AccessControlOperation, UserOperation = EnginioClientBase::UserOperation, UsergroupOperation = EnginioClientBase::UsergroupOperation, UsergroupMemberOperation = EnginioClientBase::UsergroupMembersOperation, @@ -463,7 +463,7 @@ public: QNetworkReply *reply = 0; QByteArray data; #if 1 // QT_VERSION < QT_VERSION_CHECK(5, 4, 0) ? - if (operation != EnginioClientBase::ObjectAclOperation) + if (operation != EnginioClientBase::AccessControlOperation) reply = networkManager()->deleteResource(req); else { data = object[dataPropertyName].toJson(); diff --git a/src/enginio_client/enginioclientbase.h b/src/enginio_client/enginioclientbase.h index 552e26a..d62a716 100644 --- a/src/enginio_client/enginioclientbase.h +++ b/src/enginio_client/enginioclientbase.h @@ -70,7 +70,7 @@ public: enum Operation { // Do not forget to keep in sync with EnginioClientPrivate::Operation! ObjectOperation, - ObjectAclOperation, + AccessControlOperation, UserOperation, UsergroupOperation, UsergroupMembersOperation, diff --git a/src/enginio_plugin/plugins.qmltypes b/src/enginio_plugin/plugins.qmltypes index 17838c4..ffe79bf 100644 --- a/src/enginio_plugin/plugins.qmltypes +++ b/src/enginio_plugin/plugins.qmltypes @@ -119,7 +119,7 @@ Module { name: "Operation" values: { "ObjectOperation": 0, - "ObjectAclOperation": 1, + "AccessControlOperation": 1, "UserOperation": 2, "UsergroupOperation": 3, "UsergroupMembersOperation": 4, diff --git a/tests/auto/enginioclient/tst_enginioclient.cpp b/tests/auto/enginioclient/tst_enginioclient.cpp index 5223bcb..fbfe21d 100644 --- a/tests/auto/enginioclient/tst_enginioclient.cpp +++ b/tests/auto/enginioclient/tst_enginioclient.cpp @@ -1167,20 +1167,20 @@ void tst_EnginioClient::backendFakeReply() objectWithObjectTypes["objectTypes"] = objectTypes; QVERIFY(client.query(empty, EnginioClient::ObjectOperation)); - QVERIFY(client.query(empty, EnginioClient::ObjectAclOperation)); - QVERIFY(client.query(objectTypeOnly, EnginioClient::ObjectAclOperation)); + QVERIFY(client.query(empty, EnginioClient::AccessControlOperation)); + QVERIFY(client.query(objectTypeOnly, EnginioClient::AccessControlOperation)); QVERIFY(client.query(empty, EnginioClient::UsergroupMembersOperation)); QVERIFY(client.update(empty, EnginioClient::ObjectOperation)); - QVERIFY(client.update(empty, EnginioClient::ObjectAclOperation)); + QVERIFY(client.update(empty, EnginioClient::AccessControlOperation)); QVERIFY(client.update(objectTypeOnly, EnginioClient::ObjectOperation)); - QVERIFY(client.update(objectTypeOnly, EnginioClient::ObjectAclOperation)); + QVERIFY(client.update(objectTypeOnly, EnginioClient::AccessControlOperation)); QVERIFY(client.update(empty, EnginioClient::UsergroupMembersOperation)); QVERIFY(client.remove(empty, EnginioClient::ObjectOperation)); - QVERIFY(client.remove(empty, EnginioClient::ObjectAclOperation)); + QVERIFY(client.remove(empty, EnginioClient::AccessControlOperation)); QVERIFY(client.remove(objectTypeOnly, EnginioClient::ObjectOperation)); - QVERIFY(client.remove(objectTypeOnly, EnginioClient::ObjectAclOperation)); + QVERIFY(client.remove(objectTypeOnly, EnginioClient::AccessControlOperation)); QVERIFY(client.remove(empty, EnginioClient::UsergroupMembersOperation)); QVERIFY(client.search(empty)); @@ -1273,7 +1273,7 @@ void tst_EnginioClient::acl() obj = response->data(); // so obj contains valid id // view acl of the object - reqId = client.query(obj, EnginioClient::ObjectAclOperation); + reqId = client.query(obj, EnginioClient::AccessControlOperation); QVERIFY(reqId); QTRY_COMPARE(spy.count(), 2); response = spy[1][0].value<EnginioReply*>(); @@ -1299,7 +1299,7 @@ void tst_EnginioClient::acl() json = json.arg(id1, id2, id3); aclUpdate["access"] = QJsonDocument::fromJson(json.toUtf8()).object(); - reqId = client.update(aclUpdate, EnginioClient::ObjectAclOperation); + reqId = client.update(aclUpdate, EnginioClient::AccessControlOperation); //![update-access] QVERIFY(reqId); @@ -1344,7 +1344,7 @@ void tst_EnginioClient::acl() QVERIFY(valid); // view acl again to confirm the change on the server side - reqId = client.query(obj, EnginioClient::ObjectAclOperation); + reqId = client.query(obj, EnginioClient::AccessControlOperation); QVERIFY(reqId); QTRY_COMPARE(spy.count(), 4); QCOMPARE(spyError.count(), 0); @@ -1384,7 +1384,7 @@ void tst_EnginioClient::acl() } QVERIFY(valid); // it seems to work fine, let's delete the acl we created - reqId = client.remove(aclUpdate, EnginioClient::ObjectAclOperation); + reqId = client.remove(aclUpdate, EnginioClient::AccessControlOperation); QVERIFY(reqId); QTRY_COMPARE(spy.count(), 5); QCOMPARE(spyError.count(), 0); diff --git a/tests/auto/enginiomodel/tst_enginiomodel.cpp b/tests/auto/enginiomodel/tst_enginiomodel.cpp index 68db94e..1200052 100644 --- a/tests/auto/enginiomodel/tst_enginiomodel.cpp +++ b/tests/auto/enginiomodel/tst_enginiomodel.cpp @@ -578,7 +578,7 @@ void tst_EnginioModel::multpleConnections() for (int i = 0; i < 20; ++i) { model.setOperation(EnginioClient::ObjectOperation); - model.setOperation(EnginioClient::ObjectAclOperation); + model.setOperation(EnginioClient::AccessControlOperation); } // The values here are not strict. Use qDebug() << model.counter; to see what diff --git a/tests/auto/identity/common/identitycommon.h b/tests/auto/identity/common/identitycommon.h index 5870ec3..a711c46 100644 --- a/tests/auto/identity/common/identitycommon.h +++ b/tests/auto/identity/common/identitycommon.h @@ -552,7 +552,7 @@ void IdentityCommonTest<Derived, Identity>::queryRestrictedObject() // json = json.arg(userId); // aclUpdate["access"] = QJsonDocument::fromJson(json.toUtf8()).object(); // qDebug() << aclUpdate; -// EnginioReply *reply = client.update(aclUpdate, EnginioClient::ObjectAclOperation); +// EnginioReply *reply = client.update(aclUpdate, EnginioClient::AccessControlOperation); // QTRY_VERIFY(reply->isFinished()); // qDebug() << reply; // CHECK_NO_ERROR(reply); diff --git a/tests/auto/qmltests/tst_enginioclient.qml b/tests/auto/qmltests/tst_enginioclient.qml index 28f98c8..b1337ca 100644 --- a/tests/auto/qmltests/tst_enginioclient.qml +++ b/tests/auto/qmltests/tst_enginioclient.qml @@ -108,18 +108,18 @@ Item { var empty = {} var objectTypeOnly = {"objectType" : "objects.todos"} var replies = [ fake.query(empty, Enginio.ObjectOperation), - fake.query(empty, Enginio.ObjectAclOperation), - fake.query(objectTypeOnly, Enginio.ObjectAclOperation), + fake.query(empty, Enginio.AccessControlOperation), + fake.query(objectTypeOnly, Enginio.AccessControlOperation), fake.query(empty, Enginio.UsergroupMembersOperation), fake.update(empty, Enginio.ObjectOperation), - fake.update(empty, Enginio.ObjectAclOperation), - fake.update(objectTypeOnly, Enginio.ObjectAclOperation), + fake.update(empty, Enginio.AccessControlOperation), + fake.update(objectTypeOnly, Enginio.AccessControlOperation), fake.update(empty, Enginio.UsergroupMembersOperation), fake.remove(empty, Enginio.ObjectOperation), - fake.remove(empty, Enginio.ObjectAclOperation), - fake.remove(objectTypeOnly, Enginio.ObjectAclOperation), + fake.remove(empty, Enginio.AccessControlOperation), + fake.remove(objectTypeOnly, Enginio.AccessControlOperation), fake.remove(empty, Enginio.UsergroupMembersOperation), fake.search(empty), diff --git a/tests/auto/qmltests/tst_model.qml b/tests/auto/qmltests/tst_model.qml index 185b81b..de4ccb1 100644 --- a/tests/auto/qmltests/tst_model.qml +++ b/tests/auto/qmltests/tst_model.qml @@ -198,8 +198,8 @@ Item { modelCreate.operation = Enginio.ObjectOperation verify(modelCreate.operation === Enginio.ObjectOperation) - modelCreate.operation = Enginio.ObjectAclOperation - verify(modelCreate.operation === Enginio.ObjectAclOperation) + modelCreate.operation = Enginio.AccessControlOperation + verify(modelCreate.operation === Enginio.AccessControlOperation) } } |