From 651901e63578ae721e7332e6bbd5680624a61e18 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Fri, 23 Sep 2016 21:05:58 -0400 Subject: [PATCH] fixed serialize of unions bug (missing data on input) --- src/dropbox/async/AsyncLaunchEmptyResult.cpp | 2 + src/dropbox/async/AsyncLaunchResultBase.cpp | 1 + src/dropbox/async/AsyncPollEmptyResult.cpp | 2 + src/dropbox/async/AsyncPollError.cpp | 7 +++- src/dropbox/async/AsyncPollResultBase.cpp | 1 + src/dropbox/auth/AuthAuthError.cpp | 10 +++-- src/dropbox/auth/AuthRateLimitReason.cpp | 7 +++- src/dropbox/files/FilesAddPropertiesError.cpp | 13 +++++-- .../files/FilesAlphaGetMetadataError.cpp | 2 + src/dropbox/files/FilesCreateFolderError.cpp | 1 + src/dropbox/files/FilesDeleteError.cpp | 7 +++- src/dropbox/files/FilesDownloadError.cpp | 4 +- .../files/FilesGetCopyReferenceError.cpp | 4 +- src/dropbox/files/FilesGetMetadataError.cpp | 1 + .../files/FilesGetTemporaryLinkError.cpp | 4 +- .../files/FilesInvalidPropertyGroupError.cpp | 12 ++++-- .../files/FilesListFolderContinueError.cpp | 7 +++- src/dropbox/files/FilesListFolderError.cpp | 4 +- .../files/FilesListFolderLongpollError.cpp | 4 +- src/dropbox/files/FilesListRevisionsError.cpp | 4 +- .../files/FilesLookUpPropertiesError.cpp | 1 + src/dropbox/files/FilesLookupError.cpp | 16 +++++--- src/dropbox/files/FilesMediaInfo.cpp | 4 +- src/dropbox/files/FilesPreviewError.cpp | 10 +++-- src/dropbox/files/FilesPropertiesError.cpp | 8 +++- src/dropbox/files/FilesRelocationError.cpp | 22 +++++++---- .../files/FilesRemovePropertiesError.cpp | 9 ++++- src/dropbox/files/FilesRestoreError.cpp | 10 +++-- .../files/FilesSaveCopyReferenceError.cpp | 16 +++++--- src/dropbox/files/FilesSaveUrlError.cpp | 13 +++++-- src/dropbox/files/FilesSaveUrlJobStatus.cpp | 5 ++- src/dropbox/files/FilesSaveUrlResult.cpp | 2 + src/dropbox/files/FilesSearchError.cpp | 4 +- src/dropbox/files/FilesSearchMatchType.cpp | 7 +++- src/dropbox/files/FilesSearchMode.cpp | 7 +++- src/dropbox/files/FilesThumbnailError.cpp | 10 +++-- src/dropbox/files/FilesThumbnailFormat.cpp | 4 +- src/dropbox/files/FilesThumbnailSize.cpp | 13 +++++-- .../files/FilesUpdatePropertiesError.cpp | 13 +++++-- src/dropbox/files/FilesUploadError.cpp | 4 +- .../files/FilesUploadErrorWithProperties.cpp | 5 ++- ...FilesUploadSessionFinishBatchJobStatus.cpp | 2 + ...lesUploadSessionFinishBatchResultEntry.cpp | 4 +- .../files/FilesUploadSessionFinishError.cpp | 10 +++-- .../files/FilesUploadSessionLookupError.cpp | 13 +++++-- src/dropbox/files/FilesWriteConflictError.cpp | 10 +++-- src/dropbox/files/FilesWriteError.cpp | 16 +++++--- src/dropbox/files/FilesWriteMode.cpp | 7 +++- .../PropertiesModifyPropertyTemplateError.cpp | 17 +++++--- .../PropertiesPropertyTemplateError.cpp | 7 +++- .../properties/PropertiesPropertyType.cpp | 4 +- src/dropbox/sharing/SharingAccessLevel.cpp | 13 +++++-- .../sharing/SharingAclUpdatePolicy.cpp | 7 +++- .../sharing/SharingAddFileMemberError.cpp | 13 +++++-- .../sharing/SharingAddFolderMemberError.cpp | 34 ++++++++++------ .../sharing/SharingAddMemberSelectorError.cpp | 19 ++++++--- .../sharing/SharingCreateSharedLinkError.cpp | 4 +- ...aringCreateSharedLinkWithSettingsError.cpp | 13 +++++-- src/dropbox/sharing/SharingFileAction.cpp | 22 +++++++---- .../sharing/SharingFileErrorResult.cpp | 10 +++-- .../sharing/SharingFileMemberActionError.cpp | 10 +++-- ...haringFileMemberActionIndividualResult.cpp | 4 +- .../SharingFileMemberRemoveActionResult.cpp | 7 +++- src/dropbox/sharing/SharingFolderAction.cpp | 34 ++++++++++------ .../sharing/SharingGetFileMetadataError.cpp | 7 +++- ...SharingGetFileMetadataIndividualResult.cpp | 7 +++- .../sharing/SharingGetSharedLinkFileError.cpp | 8 +++- .../sharing/SharingGetSharedLinksError.cpp | 4 +- src/dropbox/sharing/SharingInviteeInfo.cpp | 4 +- src/dropbox/sharing/SharingJobError.cpp | 10 +++-- src/dropbox/sharing/SharingJobStatus.cpp | 5 ++- .../SharingListFileMembersContinueError.cpp | 10 +++-- .../sharing/SharingListFileMembersError.cpp | 7 +++- ...SharingListFileMembersIndividualResult.cpp | 7 +++- .../sharing/SharingListFilesContinueError.cpp | 7 +++- .../SharingListFolderMembersContinueError.cpp | 7 +++- .../SharingListFoldersContinueError.cpp | 4 +- .../sharing/SharingListSharedLinksError.cpp | 7 +++- src/dropbox/sharing/SharingMemberAction.cpp | 19 ++++++--- src/dropbox/sharing/SharingMemberPolicy.cpp | 7 +++- src/dropbox/sharing/SharingMemberSelector.cpp | 7 +++- .../SharingModifySharedLinkSettingsError.cpp | 11 ++++-- .../sharing/SharingMountFolderError.cpp | 19 ++++++--- .../sharing/SharingPendingUploadMode.cpp | 4 +- .../sharing/SharingPermissionDeniedReason.cpp | 22 +++++++---- .../SharingRelinquishFileMembershipError.cpp | 10 +++-- ...SharingRelinquishFolderMembershipError.cpp | 19 ++++++--- .../sharing/SharingRemoveFileMemberError.cpp | 10 +++-- .../SharingRemoveFolderMemberError.cpp | 19 ++++++--- .../sharing/SharingRemoveMemberJobStatus.cpp | 5 ++- .../sharing/SharingRequestedVisibility.cpp | 7 +++- .../sharing/SharingResolvedVisibility.cpp | 14 +++++-- .../sharing/SharingRevokeSharedLinkError.cpp | 8 +++- .../sharing/SharingShareFolderError.cpp | 14 +++++-- .../sharing/SharingShareFolderErrorBase.cpp | 13 +++++-- .../sharing/SharingShareFolderJobStatus.cpp | 5 ++- .../sharing/SharingShareFolderLaunch.cpp | 2 + src/dropbox/sharing/SharingSharePathError.cpp | 34 ++++++++++------ .../SharingSharedFolderAccessError.cpp | 13 +++++-- .../SharingSharedFolderMemberError.cpp | 10 +++-- .../SharingSharedLinkAccessFailureReason.cpp | 16 +++++--- .../sharing/SharingSharedLinkError.cpp | 7 +++- .../sharing/SharingSharedLinkPolicy.cpp | 7 +++- .../SharingSharedLinkSettingsError.cpp | 4 +- .../sharing/SharingSharingFileAccessError.cpp | 16 +++++--- .../sharing/SharingSharingUserError.cpp | 4 +- .../sharing/SharingTransferFolderError.cpp | 22 +++++++---- .../sharing/SharingUnmountFolderError.cpp | 10 +++-- .../sharing/SharingUnshareFileError.cpp | 7 +++- .../sharing/SharingUnshareFolderError.cpp | 10 +++-- .../SharingUpdateFolderMemberError.cpp | 16 +++++--- .../SharingUpdateFolderPolicyError.cpp | 16 +++++--- src/dropbox/sharing/SharingVisibility.cpp | 16 +++++--- src/dropbox/team/TeamAdminTier.cpp | 10 +++-- src/dropbox/team/TeamDateRangeError.cpp | 1 + src/dropbox/team/TeamDesktopPlatform.cpp | 10 +++-- src/dropbox/team/TeamGroupAccessType.cpp | 4 +- src/dropbox/team/TeamGroupCreateError.cpp | 10 +++-- src/dropbox/team/TeamGroupDeleteError.cpp | 5 ++- .../team/TeamGroupMemberSelectorError.cpp | 5 ++- .../TeamGroupMemberSetAccessTypeError.cpp | 6 ++- src/dropbox/team/TeamGroupMembersAddError.cpp | 20 +++++++--- .../team/TeamGroupMembersRemoveError.cpp | 6 ++- .../team/TeamGroupMembersSelectorError.cpp | 5 ++- src/dropbox/team/TeamGroupSelector.cpp | 4 +- src/dropbox/team/TeamGroupSelectorError.cpp | 4 +- src/dropbox/team/TeamGroupUpdateError.cpp | 5 ++- src/dropbox/team/TeamGroupsGetInfoError.cpp | 4 +- src/dropbox/team/TeamGroupsGetInfoItem.cpp | 4 +- .../team/TeamGroupsListContinueError.cpp | 4 +- .../TeamGroupsMembersListContinueError.cpp | 4 +- src/dropbox/team/TeamGroupsPollError.cpp | 8 +++- src/dropbox/team/TeamGroupsSelector.cpp | 4 +- src/dropbox/team/TeamListMemberAppsError.cpp | 4 +- .../team/TeamListMemberDevicesError.cpp | 4 +- src/dropbox/team/TeamListMembersAppsError.cpp | 4 +- .../team/TeamListMembersDevicesError.cpp | 4 +- src/dropbox/team/TeamListTeamAppsError.cpp | 4 +- src/dropbox/team/TeamListTeamDevicesError.cpp | 4 +- src/dropbox/team/TeamMemberAddResult.cpp | 25 ++++++++---- src/dropbox/team/TeamMemberSelectorError.cpp | 2 + src/dropbox/team/TeamMembersAddJobStatus.cpp | 5 ++- src/dropbox/team/TeamMembersAddLaunch.cpp | 2 + .../team/TeamMembersDeactivateError.cpp | 5 ++- src/dropbox/team/TeamMembersGetInfoError.cpp | 1 + src/dropbox/team/TeamMembersGetInfoItem.cpp | 4 +- .../team/TeamMembersListContinueError.cpp | 4 +- src/dropbox/team/TeamMembersListError.cpp | 1 + src/dropbox/team/TeamMembersRecoverError.cpp | 8 +++- src/dropbox/team/TeamMembersRemoveError.cpp | 39 +++++++++++++------ .../team/TeamMembersSendWelcomeError.cpp | 3 ++ .../team/TeamMembersSetPermissionsError.cpp | 14 +++++-- .../team/TeamMembersSetProfileError.cpp | 21 +++++++--- src/dropbox/team/TeamMembersSuspendError.cpp | 12 ++++-- .../team/TeamMembersUnsuspendError.cpp | 9 ++++- src/dropbox/team/TeamMobileClientPlatform.cpp | 16 +++++--- .../team/TeamRevokeDeviceSessionArg.cpp | 7 +++- .../TeamRevokeDeviceSessionBatchError.cpp | 1 + .../team/TeamRevokeDeviceSessionError.cpp | 7 +++- .../team/TeamRevokeLinkedAppBatchError.cpp | 1 + src/dropbox/team/TeamRevokeLinkedAppError.cpp | 7 +++- src/dropbox/team/TeamTeamMemberStatus.cpp | 10 +++-- src/dropbox/team/TeamTeamMembershipType.cpp | 4 +- src/dropbox/team/TeamUserSelectorArg.cpp | 7 +++- src/dropbox/team/TeamUserSelectorError.cpp | 1 + src/dropbox/team/TeamUsersSelectorArg.cpp | 7 +++- .../TeamCommonGroupManagementType.cpp | 7 +++- .../team_common/TeamCommonGroupType.cpp | 7 +++- .../team_policies/TeamPoliciesEmmState.cpp | 10 +++-- .../TeamPoliciesSharedFolderJoinPolicy.cpp | 7 +++- .../TeamPoliciesSharedFolderMemberPolicy.cpp | 7 +++- .../TeamPoliciesSharedLinkCreatePolicy.cpp | 10 +++-- src/dropbox/users/UsersAccountType.cpp | 7 +++- .../users/UsersGetAccountBatchError.cpp | 4 +- src/dropbox/users/UsersGetAccountError.cpp | 4 +- src/dropbox/users/UsersSpaceAllocation.cpp | 7 +++- 176 files changed, 1088 insertions(+), 429 deletions(-) diff --git a/src/dropbox/async/AsyncLaunchEmptyResult.cpp b/src/dropbox/async/AsyncLaunchEmptyResult.cpp index 49c2585..8cad2e0 100644 --- a/src/dropbox/async/AsyncLaunchEmptyResult.cpp +++ b/src/dropbox/async/AsyncLaunchEmptyResult.cpp @@ -38,9 +38,11 @@ void LaunchEmptyResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("async_job_id") == 0){ m_tag = LaunchResultBase_ASYNC_JOB_ID; + m_async_job_id = js["async_job_id"].toString(); } if(s.compare("complete") == 0){ m_tag = LaunchEmptyResult_COMPLETE; + } } diff --git a/src/dropbox/async/AsyncLaunchResultBase.cpp b/src/dropbox/async/AsyncLaunchResultBase.cpp index dccae2c..98eee4f 100644 --- a/src/dropbox/async/AsyncLaunchResultBase.cpp +++ b/src/dropbox/async/AsyncLaunchResultBase.cpp @@ -34,6 +34,7 @@ void LaunchResultBase::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("async_job_id") == 0){ m_tag = LaunchResultBase_ASYNC_JOB_ID; + m_async_job_id = js["async_job_id"].toString(); } } diff --git a/src/dropbox/async/AsyncPollEmptyResult.cpp b/src/dropbox/async/AsyncPollEmptyResult.cpp index 44d96a7..5cdb438 100644 --- a/src/dropbox/async/AsyncPollEmptyResult.cpp +++ b/src/dropbox/async/AsyncPollEmptyResult.cpp @@ -36,9 +36,11 @@ void PollEmptyResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = PollEmptyResult_COMPLETE; + } } diff --git a/src/dropbox/async/AsyncPollError.cpp b/src/dropbox/async/AsyncPollError.cpp index 637694f..dad429e 100644 --- a/src/dropbox/async/AsyncPollError.cpp +++ b/src/dropbox/async/AsyncPollError.cpp @@ -40,12 +40,15 @@ void PollError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_async_job_id") == 0){ m_tag = PollError_INVALID_ASYNC_JOB_ID; + } - if(s.compare("internal_error") == 0){ + else if(s.compare("internal_error") == 0){ m_tag = PollError_INTERNAL_ERROR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PollError_OTHER; + } } diff --git a/src/dropbox/async/AsyncPollResultBase.cpp b/src/dropbox/async/AsyncPollResultBase.cpp index a381d59..844d98c 100644 --- a/src/dropbox/async/AsyncPollResultBase.cpp +++ b/src/dropbox/async/AsyncPollResultBase.cpp @@ -32,6 +32,7 @@ void PollResultBase::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } } diff --git a/src/dropbox/auth/AuthAuthError.cpp b/src/dropbox/auth/AuthAuthError.cpp index f9dc83f..0e49c41 100644 --- a/src/dropbox/auth/AuthAuthError.cpp +++ b/src/dropbox/auth/AuthAuthError.cpp @@ -44,15 +44,19 @@ void AuthError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_access_token") == 0){ m_tag = AuthError_INVALID_ACCESS_TOKEN; + } - if(s.compare("invalid_select_user") == 0){ + else if(s.compare("invalid_select_user") == 0){ m_tag = AuthError_INVALID_SELECT_USER; + } - if(s.compare("invalid_select_admin") == 0){ + else if(s.compare("invalid_select_admin") == 0){ m_tag = AuthError_INVALID_SELECT_ADMIN; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = AuthError_OTHER; + } } diff --git a/src/dropbox/auth/AuthRateLimitReason.cpp b/src/dropbox/auth/AuthRateLimitReason.cpp index 7a3a5c5..25ad24c 100644 --- a/src/dropbox/auth/AuthRateLimitReason.cpp +++ b/src/dropbox/auth/AuthRateLimitReason.cpp @@ -40,12 +40,15 @@ void RateLimitReason::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("too_many_requests") == 0){ m_tag = RateLimitReason_TOO_MANY_REQUESTS; + } - if(s.compare("too_many_write_operations") == 0){ + else if(s.compare("too_many_write_operations") == 0){ m_tag = RateLimitReason_TOO_MANY_WRITE_OPERATIONS; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RateLimitReason_OTHER; + } } diff --git a/src/dropbox/files/FilesAddPropertiesError.cpp b/src/dropbox/files/FilesAddPropertiesError.cpp index aec977f..401ed6f 100755 --- a/src/dropbox/files/FilesAddPropertiesError.cpp +++ b/src/dropbox/files/FilesAddPropertiesError.cpp @@ -59,24 +59,31 @@ void AddPropertiesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } if(s.compare("path") == 0){ m_tag = PropertiesError_PATH; + m_path.fromJson(js["path"].toObject()); } if(s.compare("property_field_too_large") == 0){ m_tag = InvalidPropertyGroupError_PROPERTY_FIELD_TOO_LARGE; + } - if(s.compare("does_not_fit_template") == 0){ + else if(s.compare("does_not_fit_template") == 0){ m_tag = InvalidPropertyGroupError_DOES_NOT_FIT_TEMPLATE; + } if(s.compare("property_group_already_exists") == 0){ m_tag = AddPropertiesError_PROPERTY_GROUP_ALREADY_EXISTS; + } } diff --git a/src/dropbox/files/FilesAlphaGetMetadataError.cpp b/src/dropbox/files/FilesAlphaGetMetadataError.cpp index fa21912..5f1be68 100755 --- a/src/dropbox/files/FilesAlphaGetMetadataError.cpp +++ b/src/dropbox/files/FilesAlphaGetMetadataError.cpp @@ -38,9 +38,11 @@ void AlphaGetMetadataError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = GetMetadataError_PATH; + m_path.fromJson(js["path"].toObject()); } if(s.compare("properties_error") == 0){ m_tag = AlphaGetMetadataError_PROPERTIES_ERROR; + m_properties_error.fromJson(js["properties_error"].toObject()); } } diff --git a/src/dropbox/files/FilesCreateFolderError.cpp b/src/dropbox/files/FilesCreateFolderError.cpp index c5b170c..d7ed224 100755 --- a/src/dropbox/files/FilesCreateFolderError.cpp +++ b/src/dropbox/files/FilesCreateFolderError.cpp @@ -33,6 +33,7 @@ void CreateFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = CreateFolderError_PATH; + m_path.fromJson(js["path"].toObject()); } } diff --git a/src/dropbox/files/FilesDeleteError.cpp b/src/dropbox/files/FilesDeleteError.cpp index 598f9b6..e885bb2 100755 --- a/src/dropbox/files/FilesDeleteError.cpp +++ b/src/dropbox/files/FilesDeleteError.cpp @@ -42,12 +42,15 @@ void DeleteError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path_lookup") == 0){ m_tag = DeleteError_PATH_LOOKUP; + m_path_lookup.fromJson(js["path_lookup"].toObject()); } - if(s.compare("path_write") == 0){ + else if(s.compare("path_write") == 0){ m_tag = DeleteError_PATH_WRITE; + m_path_write.fromJson(js["path_write"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = DeleteError_OTHER; + } } diff --git a/src/dropbox/files/FilesDownloadError.cpp b/src/dropbox/files/FilesDownloadError.cpp index 4c88de4..872c933 100755 --- a/src/dropbox/files/FilesDownloadError.cpp +++ b/src/dropbox/files/FilesDownloadError.cpp @@ -37,9 +37,11 @@ void DownloadError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = DownloadError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = DownloadError_OTHER; + } } diff --git a/src/dropbox/files/FilesGetCopyReferenceError.cpp b/src/dropbox/files/FilesGetCopyReferenceError.cpp index 3dc43bc..2f67d50 100755 --- a/src/dropbox/files/FilesGetCopyReferenceError.cpp +++ b/src/dropbox/files/FilesGetCopyReferenceError.cpp @@ -37,9 +37,11 @@ void GetCopyReferenceError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = GetCopyReferenceError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetCopyReferenceError_OTHER; + } } diff --git a/src/dropbox/files/FilesGetMetadataError.cpp b/src/dropbox/files/FilesGetMetadataError.cpp index 38475a9..4ee8e35 100755 --- a/src/dropbox/files/FilesGetMetadataError.cpp +++ b/src/dropbox/files/FilesGetMetadataError.cpp @@ -33,6 +33,7 @@ void GetMetadataError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = GetMetadataError_PATH; + m_path.fromJson(js["path"].toObject()); } } diff --git a/src/dropbox/files/FilesGetTemporaryLinkError.cpp b/src/dropbox/files/FilesGetTemporaryLinkError.cpp index f7f32e1..bcf18ab 100755 --- a/src/dropbox/files/FilesGetTemporaryLinkError.cpp +++ b/src/dropbox/files/FilesGetTemporaryLinkError.cpp @@ -37,9 +37,11 @@ void GetTemporaryLinkError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = GetTemporaryLinkError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetTemporaryLinkError_OTHER; + } } diff --git a/src/dropbox/files/FilesInvalidPropertyGroupError.cpp b/src/dropbox/files/FilesInvalidPropertyGroupError.cpp index 02c5d21..412706c 100755 --- a/src/dropbox/files/FilesInvalidPropertyGroupError.cpp +++ b/src/dropbox/files/FilesInvalidPropertyGroupError.cpp @@ -55,21 +55,27 @@ void InvalidPropertyGroupError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } if(s.compare("path") == 0){ m_tag = PropertiesError_PATH; + m_path.fromJson(js["path"].toObject()); } if(s.compare("property_field_too_large") == 0){ m_tag = InvalidPropertyGroupError_PROPERTY_FIELD_TOO_LARGE; + } - if(s.compare("does_not_fit_template") == 0){ + else if(s.compare("does_not_fit_template") == 0){ m_tag = InvalidPropertyGroupError_DOES_NOT_FIT_TEMPLATE; + } } diff --git a/src/dropbox/files/FilesListFolderContinueError.cpp b/src/dropbox/files/FilesListFolderContinueError.cpp index 74a9703..cbae929 100755 --- a/src/dropbox/files/FilesListFolderContinueError.cpp +++ b/src/dropbox/files/FilesListFolderContinueError.cpp @@ -41,12 +41,15 @@ void ListFolderContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = ListFolderContinueError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("reset") == 0){ + else if(s.compare("reset") == 0){ m_tag = ListFolderContinueError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFolderContinueError_OTHER; + } } diff --git a/src/dropbox/files/FilesListFolderError.cpp b/src/dropbox/files/FilesListFolderError.cpp index 92742cb..2f97e3b 100755 --- a/src/dropbox/files/FilesListFolderError.cpp +++ b/src/dropbox/files/FilesListFolderError.cpp @@ -37,9 +37,11 @@ void ListFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = ListFolderError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFolderError_OTHER; + } } diff --git a/src/dropbox/files/FilesListFolderLongpollError.cpp b/src/dropbox/files/FilesListFolderLongpollError.cpp index 6275bff..e7eaf31 100755 --- a/src/dropbox/files/FilesListFolderLongpollError.cpp +++ b/src/dropbox/files/FilesListFolderLongpollError.cpp @@ -36,9 +36,11 @@ void ListFolderLongpollError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("reset") == 0){ m_tag = ListFolderLongpollError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFolderLongpollError_OTHER; + } } diff --git a/src/dropbox/files/FilesListRevisionsError.cpp b/src/dropbox/files/FilesListRevisionsError.cpp index b4f6838..967bcdc 100755 --- a/src/dropbox/files/FilesListRevisionsError.cpp +++ b/src/dropbox/files/FilesListRevisionsError.cpp @@ -37,9 +37,11 @@ void ListRevisionsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = ListRevisionsError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListRevisionsError_OTHER; + } } diff --git a/src/dropbox/files/FilesLookUpPropertiesError.cpp b/src/dropbox/files/FilesLookUpPropertiesError.cpp index 184e7df..97bf7eb 100755 --- a/src/dropbox/files/FilesLookUpPropertiesError.cpp +++ b/src/dropbox/files/FilesLookUpPropertiesError.cpp @@ -32,6 +32,7 @@ void LookUpPropertiesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("property_group_not_found") == 0){ m_tag = LookUpPropertiesError_PROPERTY_GROUP_NOT_FOUND; + } } diff --git a/src/dropbox/files/FilesLookupError.cpp b/src/dropbox/files/FilesLookupError.cpp index 92a564e..8e532e4 100755 --- a/src/dropbox/files/FilesLookupError.cpp +++ b/src/dropbox/files/FilesLookupError.cpp @@ -54,21 +54,27 @@ void LookupError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("malformed_path") == 0){ m_tag = LookupError_MALFORMED_PATH; + m_malformed_path = js["malformed_path"].toString(); } - if(s.compare("not_found") == 0){ + else if(s.compare("not_found") == 0){ m_tag = LookupError_NOT_FOUND; + } - if(s.compare("not_file") == 0){ + else if(s.compare("not_file") == 0){ m_tag = LookupError_NOT_FILE; + } - if(s.compare("not_folder") == 0){ + else if(s.compare("not_folder") == 0){ m_tag = LookupError_NOT_FOLDER; + } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = LookupError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = LookupError_OTHER; + } } diff --git a/src/dropbox/files/FilesMediaInfo.cpp b/src/dropbox/files/FilesMediaInfo.cpp index 9c494fc..3e8fb2f 100755 --- a/src/dropbox/files/FilesMediaInfo.cpp +++ b/src/dropbox/files/FilesMediaInfo.cpp @@ -37,9 +37,11 @@ void MediaInfo::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("pending") == 0){ m_tag = MediaInfo_PENDING; + } - if(s.compare("metadata") == 0){ + else if(s.compare("metadata") == 0){ m_tag = MediaInfo_METADATA; + m_metadata.fromJson(js); } } diff --git a/src/dropbox/files/FilesPreviewError.cpp b/src/dropbox/files/FilesPreviewError.cpp index 63d6cb5..1aafdb0 100755 --- a/src/dropbox/files/FilesPreviewError.cpp +++ b/src/dropbox/files/FilesPreviewError.cpp @@ -45,15 +45,19 @@ void PreviewError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = PreviewError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("in_progress") == 0){ + else if(s.compare("in_progress") == 0){ m_tag = PreviewError_IN_PROGRESS; + } - if(s.compare("unsupported_extension") == 0){ + else if(s.compare("unsupported_extension") == 0){ m_tag = PreviewError_UNSUPPORTED_EXTENSION; + } - if(s.compare("unsupported_content") == 0){ + else if(s.compare("unsupported_content") == 0){ m_tag = PreviewError_UNSUPPORTED_CONTENT; + } } diff --git a/src/dropbox/files/FilesPropertiesError.cpp b/src/dropbox/files/FilesPropertiesError.cpp index 21abf5b..9ae5bca 100755 --- a/src/dropbox/files/FilesPropertiesError.cpp +++ b/src/dropbox/files/FilesPropertiesError.cpp @@ -47,15 +47,19 @@ void PropertiesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } if(s.compare("path") == 0){ m_tag = PropertiesError_PATH; + m_path.fromJson(js["path"].toObject()); } } diff --git a/src/dropbox/files/FilesRelocationError.cpp b/src/dropbox/files/FilesRelocationError.cpp index 0607ff9..a8f6bf0 100755 --- a/src/dropbox/files/FilesRelocationError.cpp +++ b/src/dropbox/files/FilesRelocationError.cpp @@ -63,27 +63,35 @@ void RelocationError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("from_lookup") == 0){ m_tag = RelocationError_FROM_LOOKUP; + m_from_lookup.fromJson(js["from_lookup"].toObject()); } - if(s.compare("from_write") == 0){ + else if(s.compare("from_write") == 0){ m_tag = RelocationError_FROM_WRITE; + m_from_write.fromJson(js["from_write"].toObject()); } - if(s.compare("to") == 0){ + else if(s.compare("to") == 0){ m_tag = RelocationError_TO; + m_to.fromJson(js["to"].toObject()); } - if(s.compare("cant_copy_shared_folder") == 0){ + else if(s.compare("cant_copy_shared_folder") == 0){ m_tag = RelocationError_CANT_COPY_SHARED_FOLDER; + } - if(s.compare("cant_nest_shared_folder") == 0){ + else if(s.compare("cant_nest_shared_folder") == 0){ m_tag = RelocationError_CANT_NEST_SHARED_FOLDER; + } - if(s.compare("cant_move_folder_into_itself") == 0){ + else if(s.compare("cant_move_folder_into_itself") == 0){ m_tag = RelocationError_CANT_MOVE_FOLDER_INTO_ITSELF; + } - if(s.compare("too_many_files") == 0){ + else if(s.compare("too_many_files") == 0){ m_tag = RelocationError_TOO_MANY_FILES; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RelocationError_OTHER; + } } diff --git a/src/dropbox/files/FilesRemovePropertiesError.cpp b/src/dropbox/files/FilesRemovePropertiesError.cpp index 35dae23..c197033 100755 --- a/src/dropbox/files/FilesRemovePropertiesError.cpp +++ b/src/dropbox/files/FilesRemovePropertiesError.cpp @@ -52,18 +52,23 @@ void RemovePropertiesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } if(s.compare("path") == 0){ m_tag = PropertiesError_PATH; + m_path.fromJson(js["path"].toObject()); } if(s.compare("property_group_lookup") == 0){ m_tag = RemovePropertiesError_PROPERTY_GROUP_LOOKUP; + m_property_group_lookup.fromJson(js["property_group_lookup"].toObject()); } } diff --git a/src/dropbox/files/FilesRestoreError.cpp b/src/dropbox/files/FilesRestoreError.cpp index b3fda53..e04453a 100755 --- a/src/dropbox/files/FilesRestoreError.cpp +++ b/src/dropbox/files/FilesRestoreError.cpp @@ -46,15 +46,19 @@ void RestoreError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path_lookup") == 0){ m_tag = RestoreError_PATH_LOOKUP; + m_path_lookup.fromJson(js["path_lookup"].toObject()); } - if(s.compare("path_write") == 0){ + else if(s.compare("path_write") == 0){ m_tag = RestoreError_PATH_WRITE; + m_path_write.fromJson(js["path_write"].toObject()); } - if(s.compare("invalid_revision") == 0){ + else if(s.compare("invalid_revision") == 0){ m_tag = RestoreError_INVALID_REVISION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RestoreError_OTHER; + } } diff --git a/src/dropbox/files/FilesSaveCopyReferenceError.cpp b/src/dropbox/files/FilesSaveCopyReferenceError.cpp index 89f50ea..d3cf09d 100755 --- a/src/dropbox/files/FilesSaveCopyReferenceError.cpp +++ b/src/dropbox/files/FilesSaveCopyReferenceError.cpp @@ -53,21 +53,27 @@ void SaveCopyReferenceError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = SaveCopyReferenceError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("invalid_copy_reference") == 0){ + else if(s.compare("invalid_copy_reference") == 0){ m_tag = SaveCopyReferenceError_INVALID_COPY_REFERENCE; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = SaveCopyReferenceError_NO_PERMISSION; + } - if(s.compare("not_found") == 0){ + else if(s.compare("not_found") == 0){ m_tag = SaveCopyReferenceError_NOT_FOUND; + } - if(s.compare("too_many_files") == 0){ + else if(s.compare("too_many_files") == 0){ m_tag = SaveCopyReferenceError_TOO_MANY_FILES; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SaveCopyReferenceError_OTHER; + } } diff --git a/src/dropbox/files/FilesSaveUrlError.cpp b/src/dropbox/files/FilesSaveUrlError.cpp index d045512..8ace424 100755 --- a/src/dropbox/files/FilesSaveUrlError.cpp +++ b/src/dropbox/files/FilesSaveUrlError.cpp @@ -49,18 +49,23 @@ void SaveUrlError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = SaveUrlError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("download_failed") == 0){ + else if(s.compare("download_failed") == 0){ m_tag = SaveUrlError_DOWNLOAD_FAILED; + } - if(s.compare("invalid_url") == 0){ + else if(s.compare("invalid_url") == 0){ m_tag = SaveUrlError_INVALID_URL; + } - if(s.compare("not_found") == 0){ + else if(s.compare("not_found") == 0){ m_tag = SaveUrlError_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SaveUrlError_OTHER; + } } diff --git a/src/dropbox/files/FilesSaveUrlJobStatus.cpp b/src/dropbox/files/FilesSaveUrlJobStatus.cpp index 10f21ec..c9626bf 100755 --- a/src/dropbox/files/FilesSaveUrlJobStatus.cpp +++ b/src/dropbox/files/FilesSaveUrlJobStatus.cpp @@ -42,12 +42,15 @@ void SaveUrlJobStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = SaveUrlJobStatus_COMPLETE; + m_complete.fromJson(js); } - if(s.compare("failed") == 0){ + else if(s.compare("failed") == 0){ m_tag = SaveUrlJobStatus_FAILED; + m_failed.fromJson(js["failed"].toObject()); } } diff --git a/src/dropbox/files/FilesSaveUrlResult.cpp b/src/dropbox/files/FilesSaveUrlResult.cpp index fc31573..daecb56 100755 --- a/src/dropbox/files/FilesSaveUrlResult.cpp +++ b/src/dropbox/files/FilesSaveUrlResult.cpp @@ -39,9 +39,11 @@ void SaveUrlResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("async_job_id") == 0){ m_tag = LaunchResultBase_ASYNC_JOB_ID; + m_async_job_id = js["async_job_id"].toString(); } if(s.compare("complete") == 0){ m_tag = SaveUrlResult_COMPLETE; + m_complete.fromJson(js); } } diff --git a/src/dropbox/files/FilesSearchError.cpp b/src/dropbox/files/FilesSearchError.cpp index 894d6d8..d1b817d 100755 --- a/src/dropbox/files/FilesSearchError.cpp +++ b/src/dropbox/files/FilesSearchError.cpp @@ -37,9 +37,11 @@ void SearchError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = SearchError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SearchError_OTHER; + } } diff --git a/src/dropbox/files/FilesSearchMatchType.cpp b/src/dropbox/files/FilesSearchMatchType.cpp index abf0c89..0ef8588 100755 --- a/src/dropbox/files/FilesSearchMatchType.cpp +++ b/src/dropbox/files/FilesSearchMatchType.cpp @@ -40,12 +40,15 @@ void SearchMatchType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("filename") == 0){ m_tag = SearchMatchType_FILENAME; + } - if(s.compare("content") == 0){ + else if(s.compare("content") == 0){ m_tag = SearchMatchType_CONTENT; + } - if(s.compare("both") == 0){ + else if(s.compare("both") == 0){ m_tag = SearchMatchType_BOTH; + } } diff --git a/src/dropbox/files/FilesSearchMode.cpp b/src/dropbox/files/FilesSearchMode.cpp index 37d571b..179f894 100755 --- a/src/dropbox/files/FilesSearchMode.cpp +++ b/src/dropbox/files/FilesSearchMode.cpp @@ -40,12 +40,15 @@ void SearchMode::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("filename") == 0){ m_tag = SearchMode_FILENAME; + } - if(s.compare("filename_and_content") == 0){ + else if(s.compare("filename_and_content") == 0){ m_tag = SearchMode_FILENAME_AND_CONTENT; + } - if(s.compare("deleted_filename") == 0){ + else if(s.compare("deleted_filename") == 0){ m_tag = SearchMode_DELETED_FILENAME; + } } diff --git a/src/dropbox/files/FilesThumbnailError.cpp b/src/dropbox/files/FilesThumbnailError.cpp index 6f0c527..897e49e 100755 --- a/src/dropbox/files/FilesThumbnailError.cpp +++ b/src/dropbox/files/FilesThumbnailError.cpp @@ -45,15 +45,19 @@ void ThumbnailError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = ThumbnailError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("unsupported_extension") == 0){ + else if(s.compare("unsupported_extension") == 0){ m_tag = ThumbnailError_UNSUPPORTED_EXTENSION; + } - if(s.compare("unsupported_image") == 0){ + else if(s.compare("unsupported_image") == 0){ m_tag = ThumbnailError_UNSUPPORTED_IMAGE; + } - if(s.compare("conversion_error") == 0){ + else if(s.compare("conversion_error") == 0){ m_tag = ThumbnailError_CONVERSION_ERROR; + } } diff --git a/src/dropbox/files/FilesThumbnailFormat.cpp b/src/dropbox/files/FilesThumbnailFormat.cpp index 30b7b60..ff44aa0 100755 --- a/src/dropbox/files/FilesThumbnailFormat.cpp +++ b/src/dropbox/files/FilesThumbnailFormat.cpp @@ -36,9 +36,11 @@ void ThumbnailFormat::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("jpeg") == 0){ m_tag = ThumbnailFormat_JPEG; + } - if(s.compare("png") == 0){ + else if(s.compare("png") == 0){ m_tag = ThumbnailFormat_PNG; + } } diff --git a/src/dropbox/files/FilesThumbnailSize.cpp b/src/dropbox/files/FilesThumbnailSize.cpp index 82cae16..7d13b58 100755 --- a/src/dropbox/files/FilesThumbnailSize.cpp +++ b/src/dropbox/files/FilesThumbnailSize.cpp @@ -48,18 +48,23 @@ void ThumbnailSize::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("w32h32") == 0){ m_tag = ThumbnailSize_W32H32; + } - if(s.compare("w64h64") == 0){ + else if(s.compare("w64h64") == 0){ m_tag = ThumbnailSize_W64H64; + } - if(s.compare("w128h128") == 0){ + else if(s.compare("w128h128") == 0){ m_tag = ThumbnailSize_W128H128; + } - if(s.compare("w640h480") == 0){ + else if(s.compare("w640h480") == 0){ m_tag = ThumbnailSize_W640H480; + } - if(s.compare("w1024h768") == 0){ + else if(s.compare("w1024h768") == 0){ m_tag = ThumbnailSize_W1024H768; + } } diff --git a/src/dropbox/files/FilesUpdatePropertiesError.cpp b/src/dropbox/files/FilesUpdatePropertiesError.cpp index 39cb09e..7df0613 100755 --- a/src/dropbox/files/FilesUpdatePropertiesError.cpp +++ b/src/dropbox/files/FilesUpdatePropertiesError.cpp @@ -60,24 +60,31 @@ void UpdatePropertiesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } if(s.compare("path") == 0){ m_tag = PropertiesError_PATH; + m_path.fromJson(js["path"].toObject()); } if(s.compare("property_field_too_large") == 0){ m_tag = InvalidPropertyGroupError_PROPERTY_FIELD_TOO_LARGE; + } - if(s.compare("does_not_fit_template") == 0){ + else if(s.compare("does_not_fit_template") == 0){ m_tag = InvalidPropertyGroupError_DOES_NOT_FIT_TEMPLATE; + } if(s.compare("property_group_lookup") == 0){ m_tag = UpdatePropertiesError_PROPERTY_GROUP_LOOKUP; + m_property_group_lookup.fromJson(js["property_group_lookup"].toObject()); } } diff --git a/src/dropbox/files/FilesUploadError.cpp b/src/dropbox/files/FilesUploadError.cpp index dbb39f1..010dfce 100755 --- a/src/dropbox/files/FilesUploadError.cpp +++ b/src/dropbox/files/FilesUploadError.cpp @@ -37,9 +37,11 @@ void UploadError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = UploadError_PATH; + m_path.fromJson(js); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UploadError_OTHER; + } } diff --git a/src/dropbox/files/FilesUploadErrorWithProperties.cpp b/src/dropbox/files/FilesUploadErrorWithProperties.cpp index 70a9068..0a86b1f 100755 --- a/src/dropbox/files/FilesUploadErrorWithProperties.cpp +++ b/src/dropbox/files/FilesUploadErrorWithProperties.cpp @@ -42,12 +42,15 @@ void UploadErrorWithProperties::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = UploadError_PATH; + m_path.fromJson(js); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UploadError_OTHER; + } if(s.compare("properties_error") == 0){ m_tag = UploadErrorWithProperties_PROPERTIES_ERROR; + m_properties_error.fromJson(js["properties_error"].toObject()); } } diff --git a/src/dropbox/files/FilesUploadSessionFinishBatchJobStatus.cpp b/src/dropbox/files/FilesUploadSessionFinishBatchJobStatus.cpp index 39e5375..b12b6ef 100755 --- a/src/dropbox/files/FilesUploadSessionFinishBatchJobStatus.cpp +++ b/src/dropbox/files/FilesUploadSessionFinishBatchJobStatus.cpp @@ -37,9 +37,11 @@ void UploadSessionFinishBatchJobStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = UploadSessionFinishBatchJobStatus_COMPLETE; + m_complete.fromJson(js); } } diff --git a/src/dropbox/files/FilesUploadSessionFinishBatchResultEntry.cpp b/src/dropbox/files/FilesUploadSessionFinishBatchResultEntry.cpp index 92dc713..8d328ba 100755 --- a/src/dropbox/files/FilesUploadSessionFinishBatchResultEntry.cpp +++ b/src/dropbox/files/FilesUploadSessionFinishBatchResultEntry.cpp @@ -38,9 +38,11 @@ void UploadSessionFinishBatchResultEntry::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("success") == 0){ m_tag = UploadSessionFinishBatchResultEntry_SUCCESS; + m_success.fromJson(js); } - if(s.compare("failure") == 0){ + else if(s.compare("failure") == 0){ m_tag = UploadSessionFinishBatchResultEntry_FAILURE; + m_failure.fromJson(js["failure"].toObject()); } } diff --git a/src/dropbox/files/FilesUploadSessionFinishError.cpp b/src/dropbox/files/FilesUploadSessionFinishError.cpp index 08e5d87..dcd4e10 100755 --- a/src/dropbox/files/FilesUploadSessionFinishError.cpp +++ b/src/dropbox/files/FilesUploadSessionFinishError.cpp @@ -46,15 +46,19 @@ void UploadSessionFinishError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("lookup_failed") == 0){ m_tag = UploadSessionFinishError_LOOKUP_FAILED; + m_lookup_failed.fromJson(js["lookup_failed"].toObject()); } - if(s.compare("path") == 0){ + else if(s.compare("path") == 0){ m_tag = UploadSessionFinishError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("too_many_shared_folder_targets") == 0){ + else if(s.compare("too_many_shared_folder_targets") == 0){ m_tag = UploadSessionFinishError_TOO_MANY_SHARED_FOLDER_TARGETS; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UploadSessionFinishError_OTHER; + } } diff --git a/src/dropbox/files/FilesUploadSessionLookupError.cpp b/src/dropbox/files/FilesUploadSessionLookupError.cpp index 1b0a943..0cd0901 100755 --- a/src/dropbox/files/FilesUploadSessionLookupError.cpp +++ b/src/dropbox/files/FilesUploadSessionLookupError.cpp @@ -49,18 +49,23 @@ void UploadSessionLookupError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("not_found") == 0){ m_tag = UploadSessionLookupError_NOT_FOUND; + } - if(s.compare("incorrect_offset") == 0){ + else if(s.compare("incorrect_offset") == 0){ m_tag = UploadSessionLookupError_INCORRECT_OFFSET; + m_incorrect_offset.fromJson(js); } - if(s.compare("closed") == 0){ + else if(s.compare("closed") == 0){ m_tag = UploadSessionLookupError_CLOSED; + } - if(s.compare("not_closed") == 0){ + else if(s.compare("not_closed") == 0){ m_tag = UploadSessionLookupError_NOT_CLOSED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UploadSessionLookupError_OTHER; + } } diff --git a/src/dropbox/files/FilesWriteConflictError.cpp b/src/dropbox/files/FilesWriteConflictError.cpp index 58df877..0303a4c 100755 --- a/src/dropbox/files/FilesWriteConflictError.cpp +++ b/src/dropbox/files/FilesWriteConflictError.cpp @@ -44,15 +44,19 @@ void WriteConflictError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("file") == 0){ m_tag = WriteConflictError_FILE; + } - if(s.compare("folder") == 0){ + else if(s.compare("folder") == 0){ m_tag = WriteConflictError_FOLDER; + } - if(s.compare("file_ancestor") == 0){ + else if(s.compare("file_ancestor") == 0){ m_tag = WriteConflictError_FILE_ANCESTOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = WriteConflictError_OTHER; + } } diff --git a/src/dropbox/files/FilesWriteError.cpp b/src/dropbox/files/FilesWriteError.cpp index b356ed2..5d06ca9 100755 --- a/src/dropbox/files/FilesWriteError.cpp +++ b/src/dropbox/files/FilesWriteError.cpp @@ -55,21 +55,27 @@ void WriteError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("malformed_path") == 0){ m_tag = WriteError_MALFORMED_PATH; + m_malformed_path = js["malformed_path"].toString(); } - if(s.compare("conflict") == 0){ + else if(s.compare("conflict") == 0){ m_tag = WriteError_CONFLICT; + m_conflict.fromJson(js["conflict"].toObject()); } - if(s.compare("no_write_permission") == 0){ + else if(s.compare("no_write_permission") == 0){ m_tag = WriteError_NO_WRITE_PERMISSION; + } - if(s.compare("insufficient_space") == 0){ + else if(s.compare("insufficient_space") == 0){ m_tag = WriteError_INSUFFICIENT_SPACE; + } - if(s.compare("disallowed_name") == 0){ + else if(s.compare("disallowed_name") == 0){ m_tag = WriteError_DISALLOWED_NAME; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = WriteError_OTHER; + } } diff --git a/src/dropbox/files/FilesWriteMode.cpp b/src/dropbox/files/FilesWriteMode.cpp index 0dec07d..b147ae1 100755 --- a/src/dropbox/files/FilesWriteMode.cpp +++ b/src/dropbox/files/FilesWriteMode.cpp @@ -42,12 +42,15 @@ void WriteMode::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("add") == 0){ m_tag = WriteMode_ADD; + } - if(s.compare("overwrite") == 0){ + else if(s.compare("overwrite") == 0){ m_tag = WriteMode_OVERWRITE; + } - if(s.compare("update") == 0){ + else if(s.compare("update") == 0){ m_tag = WriteMode_UPDATE; + m_update = js["update"].toString(); } } diff --git a/src/dropbox/properties/PropertiesModifyPropertyTemplateError.cpp b/src/dropbox/properties/PropertiesModifyPropertyTemplateError.cpp index 1a8460c..8ac5e8c 100644 --- a/src/dropbox/properties/PropertiesModifyPropertyTemplateError.cpp +++ b/src/dropbox/properties/PropertiesModifyPropertyTemplateError.cpp @@ -58,24 +58,31 @@ void ModifyPropertyTemplateError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } if(s.compare("conflicting_property_names") == 0){ m_tag = ModifyPropertyTemplateError_CONFLICTING_PROPERTY_NAMES; + } - if(s.compare("too_many_properties") == 0){ + else if(s.compare("too_many_properties") == 0){ m_tag = ModifyPropertyTemplateError_TOO_MANY_PROPERTIES; + } - if(s.compare("too_many_templates") == 0){ + else if(s.compare("too_many_templates") == 0){ m_tag = ModifyPropertyTemplateError_TOO_MANY_TEMPLATES; + } - if(s.compare("template_attribute_too_large") == 0){ + else if(s.compare("template_attribute_too_large") == 0){ m_tag = ModifyPropertyTemplateError_TEMPLATE_ATTRIBUTE_TOO_LARGE; + } } diff --git a/src/dropbox/properties/PropertiesPropertyTemplateError.cpp b/src/dropbox/properties/PropertiesPropertyTemplateError.cpp index 9ccfe11..a8fbec5 100644 --- a/src/dropbox/properties/PropertiesPropertyTemplateError.cpp +++ b/src/dropbox/properties/PropertiesPropertyTemplateError.cpp @@ -42,12 +42,15 @@ void PropertyTemplateError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("template_not_found") == 0){ m_tag = PropertyTemplateError_TEMPLATE_NOT_FOUND; + m_template_not_found = js["template_not_found"].toString(); } - if(s.compare("restricted_content") == 0){ + else if(s.compare("restricted_content") == 0){ m_tag = PropertyTemplateError_RESTRICTED_CONTENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyTemplateError_OTHER; + } } diff --git a/src/dropbox/properties/PropertiesPropertyType.cpp b/src/dropbox/properties/PropertiesPropertyType.cpp index 53f0d47..b08e866 100644 --- a/src/dropbox/properties/PropertiesPropertyType.cpp +++ b/src/dropbox/properties/PropertiesPropertyType.cpp @@ -36,9 +36,11 @@ void PropertyType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("string") == 0){ m_tag = PropertyType_STRING; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PropertyType_OTHER; + } } diff --git a/src/dropbox/sharing/SharingAccessLevel.cpp b/src/dropbox/sharing/SharingAccessLevel.cpp index ac4f647..707e7f9 100644 --- a/src/dropbox/sharing/SharingAccessLevel.cpp +++ b/src/dropbox/sharing/SharingAccessLevel.cpp @@ -48,18 +48,23 @@ void AccessLevel::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("owner") == 0){ m_tag = AccessLevel_OWNER; + } - if(s.compare("editor") == 0){ + else if(s.compare("editor") == 0){ m_tag = AccessLevel_EDITOR; + } - if(s.compare("viewer") == 0){ + else if(s.compare("viewer") == 0){ m_tag = AccessLevel_VIEWER; + } - if(s.compare("viewer_no_comment") == 0){ + else if(s.compare("viewer_no_comment") == 0){ m_tag = AccessLevel_VIEWER_NO_COMMENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = AccessLevel_OTHER; + } } diff --git a/src/dropbox/sharing/SharingAclUpdatePolicy.cpp b/src/dropbox/sharing/SharingAclUpdatePolicy.cpp index 0aa2ca2..4db3d51 100644 --- a/src/dropbox/sharing/SharingAclUpdatePolicy.cpp +++ b/src/dropbox/sharing/SharingAclUpdatePolicy.cpp @@ -40,12 +40,15 @@ void AclUpdatePolicy::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("owner") == 0){ m_tag = AclUpdatePolicy_OWNER; + } - if(s.compare("editors") == 0){ + else if(s.compare("editors") == 0){ m_tag = AclUpdatePolicy_EDITORS; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = AclUpdatePolicy_OTHER; + } } diff --git a/src/dropbox/sharing/SharingAddFileMemberError.cpp b/src/dropbox/sharing/SharingAddFileMemberError.cpp index a99d5e0..1c742b3 100644 --- a/src/dropbox/sharing/SharingAddFileMemberError.cpp +++ b/src/dropbox/sharing/SharingAddFileMemberError.cpp @@ -50,18 +50,23 @@ void AddFileMemberError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = AddFileMemberError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = AddFileMemberError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("rate_limit") == 0){ + else if(s.compare("rate_limit") == 0){ m_tag = AddFileMemberError_RATE_LIMIT; + } - if(s.compare("invalid_comment") == 0){ + else if(s.compare("invalid_comment") == 0){ m_tag = AddFileMemberError_INVALID_COMMENT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = AddFileMemberError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingAddFolderMemberError.cpp b/src/dropbox/sharing/SharingAddFolderMemberError.cpp index 06ff83d..de080e2 100644 --- a/src/dropbox/sharing/SharingAddFolderMemberError.cpp +++ b/src/dropbox/sharing/SharingAddFolderMemberError.cpp @@ -80,39 +80,51 @@ void AddFolderMemberError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = AddFolderMemberError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("email_unverified") == 0){ + else if(s.compare("email_unverified") == 0){ m_tag = AddFolderMemberError_EMAIL_UNVERIFIED; + } - if(s.compare("bad_member") == 0){ + else if(s.compare("bad_member") == 0){ m_tag = AddFolderMemberError_BAD_MEMBER; + m_bad_member.fromJson(js["bad_member"].toObject()); } - if(s.compare("cant_share_outside_team") == 0){ + else if(s.compare("cant_share_outside_team") == 0){ m_tag = AddFolderMemberError_CANT_SHARE_OUTSIDE_TEAM; + } - if(s.compare("too_many_members") == 0){ + else if(s.compare("too_many_members") == 0){ m_tag = AddFolderMemberError_TOO_MANY_MEMBERS; + m_too_many_members = js["too_many_members"].toVariant().toInt(); } - if(s.compare("too_many_pending_invites") == 0){ + else if(s.compare("too_many_pending_invites") == 0){ m_tag = AddFolderMemberError_TOO_MANY_PENDING_INVITES; + m_too_many_pending_invites = js["too_many_pending_invites"].toVariant().toInt(); } - if(s.compare("rate_limit") == 0){ + else if(s.compare("rate_limit") == 0){ m_tag = AddFolderMemberError_RATE_LIMIT; + } - if(s.compare("too_many_invitees") == 0){ + else if(s.compare("too_many_invitees") == 0){ m_tag = AddFolderMemberError_TOO_MANY_INVITEES; + } - if(s.compare("insufficient_plan") == 0){ + else if(s.compare("insufficient_plan") == 0){ m_tag = AddFolderMemberError_INSUFFICIENT_PLAN; + } - if(s.compare("team_folder") == 0){ + else if(s.compare("team_folder") == 0){ m_tag = AddFolderMemberError_TEAM_FOLDER; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = AddFolderMemberError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = AddFolderMemberError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingAddMemberSelectorError.cpp b/src/dropbox/sharing/SharingAddMemberSelectorError.cpp index eda0913..283e264 100644 --- a/src/dropbox/sharing/SharingAddMemberSelectorError.cpp +++ b/src/dropbox/sharing/SharingAddMemberSelectorError.cpp @@ -62,24 +62,31 @@ void AddMemberSelectorError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("automatic_group") == 0){ m_tag = AddMemberSelectorError_AUTOMATIC_GROUP; + } - if(s.compare("invalid_dropbox_id") == 0){ + else if(s.compare("invalid_dropbox_id") == 0){ m_tag = AddMemberSelectorError_INVALID_DROPBOX_ID; + m_invalid_dropbox_id = js["invalid_dropbox_id"].toString(); } - if(s.compare("invalid_email") == 0){ + else if(s.compare("invalid_email") == 0){ m_tag = AddMemberSelectorError_INVALID_EMAIL; + m_invalid_email = js["invalid_email"].toString(); } - if(s.compare("unverified_dropbox_id") == 0){ + else if(s.compare("unverified_dropbox_id") == 0){ m_tag = AddMemberSelectorError_UNVERIFIED_DROPBOX_ID; + m_unverified_dropbox_id = js["unverified_dropbox_id"].toString(); } - if(s.compare("group_deleted") == 0){ + else if(s.compare("group_deleted") == 0){ m_tag = AddMemberSelectorError_GROUP_DELETED; + } - if(s.compare("group_not_on_team") == 0){ + else if(s.compare("group_not_on_team") == 0){ m_tag = AddMemberSelectorError_GROUP_NOT_ON_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = AddMemberSelectorError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingCreateSharedLinkError.cpp b/src/dropbox/sharing/SharingCreateSharedLinkError.cpp index 24aa95e..d81c5b9 100644 --- a/src/dropbox/sharing/SharingCreateSharedLinkError.cpp +++ b/src/dropbox/sharing/SharingCreateSharedLinkError.cpp @@ -37,9 +37,11 @@ void CreateSharedLinkError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = CreateSharedLinkError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = CreateSharedLinkError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingCreateSharedLinkWithSettingsError.cpp b/src/dropbox/sharing/SharingCreateSharedLinkWithSettingsError.cpp index da032f4..67c860f 100644 --- a/src/dropbox/sharing/SharingCreateSharedLinkWithSettingsError.cpp +++ b/src/dropbox/sharing/SharingCreateSharedLinkWithSettingsError.cpp @@ -50,18 +50,23 @@ void CreateSharedLinkWithSettingsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = CreateSharedLinkWithSettingsError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("email_not_verified") == 0){ + else if(s.compare("email_not_verified") == 0){ m_tag = CreateSharedLinkWithSettingsError_EMAIL_NOT_VERIFIED; + } - if(s.compare("shared_link_already_exists") == 0){ + else if(s.compare("shared_link_already_exists") == 0){ m_tag = CreateSharedLinkWithSettingsError_SHARED_LINK_ALREADY_EXISTS; + } - if(s.compare("settings_error") == 0){ + else if(s.compare("settings_error") == 0){ m_tag = CreateSharedLinkWithSettingsError_SETTINGS_ERROR; + m_settings_error.fromJson(js["settings_error"].toObject()); } - if(s.compare("access_denied") == 0){ + else if(s.compare("access_denied") == 0){ m_tag = CreateSharedLinkWithSettingsError_ACCESS_DENIED; + } } diff --git a/src/dropbox/sharing/SharingFileAction.cpp b/src/dropbox/sharing/SharingFileAction.cpp index d413543..37995ba 100644 --- a/src/dropbox/sharing/SharingFileAction.cpp +++ b/src/dropbox/sharing/SharingFileAction.cpp @@ -60,27 +60,35 @@ void FileAction::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("edit_contents") == 0){ m_tag = FileAction_EDIT_CONTENTS; + } - if(s.compare("invite_viewer") == 0){ + else if(s.compare("invite_viewer") == 0){ m_tag = FileAction_INVITE_VIEWER; + } - if(s.compare("invite_viewer_no_comment") == 0){ + else if(s.compare("invite_viewer_no_comment") == 0){ m_tag = FileAction_INVITE_VIEWER_NO_COMMENT; + } - if(s.compare("unshare") == 0){ + else if(s.compare("unshare") == 0){ m_tag = FileAction_UNSHARE; + } - if(s.compare("relinquish_membership") == 0){ + else if(s.compare("relinquish_membership") == 0){ m_tag = FileAction_RELINQUISH_MEMBERSHIP; + } - if(s.compare("share_link") == 0){ + else if(s.compare("share_link") == 0){ m_tag = FileAction_SHARE_LINK; + } - if(s.compare("create_link") == 0){ + else if(s.compare("create_link") == 0){ m_tag = FileAction_CREATE_LINK; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = FileAction_OTHER; + } } diff --git a/src/dropbox/sharing/SharingFileErrorResult.cpp b/src/dropbox/sharing/SharingFileErrorResult.cpp index af1494a..cdb657f 100644 --- a/src/dropbox/sharing/SharingFileErrorResult.cpp +++ b/src/dropbox/sharing/SharingFileErrorResult.cpp @@ -50,15 +50,19 @@ void FileErrorResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("file_not_found_error") == 0){ m_tag = FileErrorResult_FILE_NOT_FOUND_ERROR; + m_file_not_found_error = js["file_not_found_error"].toString(); } - if(s.compare("invalid_file_action_error") == 0){ + else if(s.compare("invalid_file_action_error") == 0){ m_tag = FileErrorResult_INVALID_FILE_ACTION_ERROR; + m_invalid_file_action_error = js["invalid_file_action_error"].toString(); } - if(s.compare("permission_denied_error") == 0){ + else if(s.compare("permission_denied_error") == 0){ m_tag = FileErrorResult_PERMISSION_DENIED_ERROR; + m_permission_denied_error = js["permission_denied_error"].toString(); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = FileErrorResult_OTHER; + } } diff --git a/src/dropbox/sharing/SharingFileMemberActionError.cpp b/src/dropbox/sharing/SharingFileMemberActionError.cpp index 01be03a..da39365 100644 --- a/src/dropbox/sharing/SharingFileMemberActionError.cpp +++ b/src/dropbox/sharing/SharingFileMemberActionError.cpp @@ -45,15 +45,19 @@ void FileMemberActionError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_member") == 0){ m_tag = FileMemberActionError_INVALID_MEMBER; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = FileMemberActionError_NO_PERMISSION; + } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = FileMemberActionError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = FileMemberActionError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingFileMemberActionIndividualResult.cpp b/src/dropbox/sharing/SharingFileMemberActionIndividualResult.cpp index 69238d6..ea03caa 100644 --- a/src/dropbox/sharing/SharingFileMemberActionIndividualResult.cpp +++ b/src/dropbox/sharing/SharingFileMemberActionIndividualResult.cpp @@ -38,9 +38,11 @@ void FileMemberActionIndividualResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("success") == 0){ m_tag = FileMemberActionIndividualResult_SUCCESS; + m_success.fromJson(js["success"].toObject()); } - if(s.compare("member_error") == 0){ + else if(s.compare("member_error") == 0){ m_tag = FileMemberActionIndividualResult_MEMBER_ERROR; + m_member_error.fromJson(js["member_error"].toObject()); } } diff --git a/src/dropbox/sharing/SharingFileMemberRemoveActionResult.cpp b/src/dropbox/sharing/SharingFileMemberRemoveActionResult.cpp index 48f4d02..0d79e4d 100644 --- a/src/dropbox/sharing/SharingFileMemberRemoveActionResult.cpp +++ b/src/dropbox/sharing/SharingFileMemberRemoveActionResult.cpp @@ -42,12 +42,15 @@ void FileMemberRemoveActionResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("success") == 0){ m_tag = FileMemberRemoveActionResult_SUCCESS; + m_success.fromJson(js); } - if(s.compare("member_error") == 0){ + else if(s.compare("member_error") == 0){ m_tag = FileMemberRemoveActionResult_MEMBER_ERROR; + m_member_error.fromJson(js["member_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = FileMemberRemoveActionResult_OTHER; + } } diff --git a/src/dropbox/sharing/SharingFolderAction.cpp b/src/dropbox/sharing/SharingFolderAction.cpp index 2fd781e..e9453d0 100644 --- a/src/dropbox/sharing/SharingFolderAction.cpp +++ b/src/dropbox/sharing/SharingFolderAction.cpp @@ -76,39 +76,51 @@ void FolderAction::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("change_options") == 0){ m_tag = FolderAction_CHANGE_OPTIONS; + } - if(s.compare("edit_contents") == 0){ + else if(s.compare("edit_contents") == 0){ m_tag = FolderAction_EDIT_CONTENTS; + } - if(s.compare("invite_editor") == 0){ + else if(s.compare("invite_editor") == 0){ m_tag = FolderAction_INVITE_EDITOR; + } - if(s.compare("invite_viewer") == 0){ + else if(s.compare("invite_viewer") == 0){ m_tag = FolderAction_INVITE_VIEWER; + } - if(s.compare("invite_viewer_no_comment") == 0){ + else if(s.compare("invite_viewer_no_comment") == 0){ m_tag = FolderAction_INVITE_VIEWER_NO_COMMENT; + } - if(s.compare("relinquish_membership") == 0){ + else if(s.compare("relinquish_membership") == 0){ m_tag = FolderAction_RELINQUISH_MEMBERSHIP; + } - if(s.compare("unmount") == 0){ + else if(s.compare("unmount") == 0){ m_tag = FolderAction_UNMOUNT; + } - if(s.compare("unshare") == 0){ + else if(s.compare("unshare") == 0){ m_tag = FolderAction_UNSHARE; + } - if(s.compare("leave_a_copy") == 0){ + else if(s.compare("leave_a_copy") == 0){ m_tag = FolderAction_LEAVE_A_COPY; + } - if(s.compare("share_link") == 0){ + else if(s.compare("share_link") == 0){ m_tag = FolderAction_SHARE_LINK; + } - if(s.compare("create_link") == 0){ + else if(s.compare("create_link") == 0){ m_tag = FolderAction_CREATE_LINK; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = FolderAction_OTHER; + } } diff --git a/src/dropbox/sharing/SharingGetFileMetadataError.cpp b/src/dropbox/sharing/SharingGetFileMetadataError.cpp index c19711d..3b12746 100644 --- a/src/dropbox/sharing/SharingGetFileMetadataError.cpp +++ b/src/dropbox/sharing/SharingGetFileMetadataError.cpp @@ -42,12 +42,15 @@ void GetFileMetadataError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = GetFileMetadataError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = GetFileMetadataError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetFileMetadataError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingGetFileMetadataIndividualResult.cpp b/src/dropbox/sharing/SharingGetFileMetadataIndividualResult.cpp index 2b7d50a..1c5147d 100644 --- a/src/dropbox/sharing/SharingGetFileMetadataIndividualResult.cpp +++ b/src/dropbox/sharing/SharingGetFileMetadataIndividualResult.cpp @@ -42,12 +42,15 @@ void GetFileMetadataIndividualResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("metadata") == 0){ m_tag = GetFileMetadataIndividualResult_METADATA; + m_metadata.fromJson(js); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = GetFileMetadataIndividualResult_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetFileMetadataIndividualResult_OTHER; + } } diff --git a/src/dropbox/sharing/SharingGetSharedLinkFileError.cpp b/src/dropbox/sharing/SharingGetSharedLinkFileError.cpp index 36dbf62..387b74d 100644 --- a/src/dropbox/sharing/SharingGetSharedLinkFileError.cpp +++ b/src/dropbox/sharing/SharingGetSharedLinkFileError.cpp @@ -44,15 +44,19 @@ void GetSharedLinkFileError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("shared_link_not_found") == 0){ m_tag = SharedLinkError_SHARED_LINK_NOT_FOUND; + } - if(s.compare("shared_link_access_denied") == 0){ + else if(s.compare("shared_link_access_denied") == 0){ m_tag = SharedLinkError_SHARED_LINK_ACCESS_DENIED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkError_OTHER; + } if(s.compare("shared_link_is_directory") == 0){ m_tag = GetSharedLinkFileError_SHARED_LINK_IS_DIRECTORY; + } } diff --git a/src/dropbox/sharing/SharingGetSharedLinksError.cpp b/src/dropbox/sharing/SharingGetSharedLinksError.cpp index 4c1c754..8b8a646 100644 --- a/src/dropbox/sharing/SharingGetSharedLinksError.cpp +++ b/src/dropbox/sharing/SharingGetSharedLinksError.cpp @@ -38,9 +38,11 @@ void GetSharedLinksError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = GetSharedLinksError_PATH; + m_path = js["path"].toString(); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetSharedLinksError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingInviteeInfo.cpp b/src/dropbox/sharing/SharingInviteeInfo.cpp index e3e6364..b58c136 100644 --- a/src/dropbox/sharing/SharingInviteeInfo.cpp +++ b/src/dropbox/sharing/SharingInviteeInfo.cpp @@ -38,9 +38,11 @@ void InviteeInfo::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("email") == 0){ m_tag = InviteeInfo_EMAIL; + m_email = js["email"].toString(); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = InviteeInfo_OTHER; + } } diff --git a/src/dropbox/sharing/SharingJobError.cpp b/src/dropbox/sharing/SharingJobError.cpp index 27d249e..fa2a8fa 100644 --- a/src/dropbox/sharing/SharingJobError.cpp +++ b/src/dropbox/sharing/SharingJobError.cpp @@ -47,15 +47,19 @@ void JobError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("unshare_folder_error") == 0){ m_tag = JobError_UNSHARE_FOLDER_ERROR; + m_unshare_folder_error.fromJson(js["unshare_folder_error"].toObject()); } - if(s.compare("remove_folder_member_error") == 0){ + else if(s.compare("remove_folder_member_error") == 0){ m_tag = JobError_REMOVE_FOLDER_MEMBER_ERROR; + m_remove_folder_member_error.fromJson(js["remove_folder_member_error"].toObject()); } - if(s.compare("relinquish_folder_membership_error") == 0){ + else if(s.compare("relinquish_folder_membership_error") == 0){ m_tag = JobError_RELINQUISH_FOLDER_MEMBERSHIP_ERROR; + m_relinquish_folder_membership_error.fromJson(js["relinquish_folder_membership_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = JobError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingJobStatus.cpp b/src/dropbox/sharing/SharingJobStatus.cpp index efa6c72..b367d9f 100644 --- a/src/dropbox/sharing/SharingJobStatus.cpp +++ b/src/dropbox/sharing/SharingJobStatus.cpp @@ -41,12 +41,15 @@ void JobStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = JobStatus_COMPLETE; + } - if(s.compare("failed") == 0){ + else if(s.compare("failed") == 0){ m_tag = JobStatus_FAILED; + m_failed.fromJson(js["failed"].toObject()); } } diff --git a/src/dropbox/sharing/SharingListFileMembersContinueError.cpp b/src/dropbox/sharing/SharingListFileMembersContinueError.cpp index 42f95fb..f3ac99f 100644 --- a/src/dropbox/sharing/SharingListFileMembersContinueError.cpp +++ b/src/dropbox/sharing/SharingListFileMembersContinueError.cpp @@ -46,15 +46,19 @@ void ListFileMembersContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = ListFileMembersContinueError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = ListFileMembersContinueError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("invalid_cursor") == 0){ + else if(s.compare("invalid_cursor") == 0){ m_tag = ListFileMembersContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFileMembersContinueError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingListFileMembersError.cpp b/src/dropbox/sharing/SharingListFileMembersError.cpp index 647667c..1930def 100644 --- a/src/dropbox/sharing/SharingListFileMembersError.cpp +++ b/src/dropbox/sharing/SharingListFileMembersError.cpp @@ -42,12 +42,15 @@ void ListFileMembersError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = ListFileMembersError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = ListFileMembersError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFileMembersError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingListFileMembersIndividualResult.cpp b/src/dropbox/sharing/SharingListFileMembersIndividualResult.cpp index 2d86374..c0d6b32 100644 --- a/src/dropbox/sharing/SharingListFileMembersIndividualResult.cpp +++ b/src/dropbox/sharing/SharingListFileMembersIndividualResult.cpp @@ -42,12 +42,15 @@ void ListFileMembersIndividualResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("result") == 0){ m_tag = ListFileMembersIndividualResult_RESULT; + m_result.fromJson(js); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = ListFileMembersIndividualResult_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFileMembersIndividualResult_OTHER; + } } diff --git a/src/dropbox/sharing/SharingListFilesContinueError.cpp b/src/dropbox/sharing/SharingListFilesContinueError.cpp index 51eb58f..52b186f 100644 --- a/src/dropbox/sharing/SharingListFilesContinueError.cpp +++ b/src/dropbox/sharing/SharingListFilesContinueError.cpp @@ -41,12 +41,15 @@ void ListFilesContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = ListFilesContinueError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("invalid_cursor") == 0){ + else if(s.compare("invalid_cursor") == 0){ m_tag = ListFilesContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFilesContinueError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingListFolderMembersContinueError.cpp b/src/dropbox/sharing/SharingListFolderMembersContinueError.cpp index 5b9f289..1e3e0b9 100644 --- a/src/dropbox/sharing/SharingListFolderMembersContinueError.cpp +++ b/src/dropbox/sharing/SharingListFolderMembersContinueError.cpp @@ -41,12 +41,15 @@ void ListFolderMembersContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = ListFolderMembersContinueError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("invalid_cursor") == 0){ + else if(s.compare("invalid_cursor") == 0){ m_tag = ListFolderMembersContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFolderMembersContinueError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingListFoldersContinueError.cpp b/src/dropbox/sharing/SharingListFoldersContinueError.cpp index 45f9c08..92e89d3 100644 --- a/src/dropbox/sharing/SharingListFoldersContinueError.cpp +++ b/src/dropbox/sharing/SharingListFoldersContinueError.cpp @@ -36,9 +36,11 @@ void ListFoldersContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_cursor") == 0){ m_tag = ListFoldersContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListFoldersContinueError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingListSharedLinksError.cpp b/src/dropbox/sharing/SharingListSharedLinksError.cpp index 3b3c515..3769e9b 100644 --- a/src/dropbox/sharing/SharingListSharedLinksError.cpp +++ b/src/dropbox/sharing/SharingListSharedLinksError.cpp @@ -41,12 +41,15 @@ void ListSharedLinksError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("path") == 0){ m_tag = ListSharedLinksError_PATH; + m_path.fromJson(js["path"].toObject()); } - if(s.compare("reset") == 0){ + else if(s.compare("reset") == 0){ m_tag = ListSharedLinksError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListSharedLinksError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingMemberAction.cpp b/src/dropbox/sharing/SharingMemberAction.cpp index 80ae8f6..ee69d01 100644 --- a/src/dropbox/sharing/SharingMemberAction.cpp +++ b/src/dropbox/sharing/SharingMemberAction.cpp @@ -56,24 +56,31 @@ void MemberAction::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("leave_a_copy") == 0){ m_tag = MemberAction_LEAVE_A_COPY; + } - if(s.compare("make_editor") == 0){ + else if(s.compare("make_editor") == 0){ m_tag = MemberAction_MAKE_EDITOR; + } - if(s.compare("make_owner") == 0){ + else if(s.compare("make_owner") == 0){ m_tag = MemberAction_MAKE_OWNER; + } - if(s.compare("make_viewer") == 0){ + else if(s.compare("make_viewer") == 0){ m_tag = MemberAction_MAKE_VIEWER; + } - if(s.compare("make_viewer_no_comment") == 0){ + else if(s.compare("make_viewer_no_comment") == 0){ m_tag = MemberAction_MAKE_VIEWER_NO_COMMENT; + } - if(s.compare("remove") == 0){ + else if(s.compare("remove") == 0){ m_tag = MemberAction_REMOVE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MemberAction_OTHER; + } } diff --git a/src/dropbox/sharing/SharingMemberPolicy.cpp b/src/dropbox/sharing/SharingMemberPolicy.cpp index 692e6a1..b7dde9d 100644 --- a/src/dropbox/sharing/SharingMemberPolicy.cpp +++ b/src/dropbox/sharing/SharingMemberPolicy.cpp @@ -40,12 +40,15 @@ void MemberPolicy::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("team") == 0){ m_tag = MemberPolicy_TEAM; + } - if(s.compare("anyone") == 0){ + else if(s.compare("anyone") == 0){ m_tag = MemberPolicy_ANYONE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MemberPolicy_OTHER; + } } diff --git a/src/dropbox/sharing/SharingMemberSelector.cpp b/src/dropbox/sharing/SharingMemberSelector.cpp index 700c2c2..bee94ce 100644 --- a/src/dropbox/sharing/SharingMemberSelector.cpp +++ b/src/dropbox/sharing/SharingMemberSelector.cpp @@ -44,12 +44,15 @@ void MemberSelector::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("dropbox_id") == 0){ m_tag = MemberSelector_DROPBOX_ID; + m_dropbox_id = js["dropbox_id"].toString(); } - if(s.compare("email") == 0){ + else if(s.compare("email") == 0){ m_tag = MemberSelector_EMAIL; + m_email = js["email"].toString(); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MemberSelector_OTHER; + } } diff --git a/src/dropbox/sharing/SharingModifySharedLinkSettingsError.cpp b/src/dropbox/sharing/SharingModifySharedLinkSettingsError.cpp index d9ca211..16639c1 100644 --- a/src/dropbox/sharing/SharingModifySharedLinkSettingsError.cpp +++ b/src/dropbox/sharing/SharingModifySharedLinkSettingsError.cpp @@ -49,18 +49,23 @@ void ModifySharedLinkSettingsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("shared_link_not_found") == 0){ m_tag = SharedLinkError_SHARED_LINK_NOT_FOUND; + } - if(s.compare("shared_link_access_denied") == 0){ + else if(s.compare("shared_link_access_denied") == 0){ m_tag = SharedLinkError_SHARED_LINK_ACCESS_DENIED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkError_OTHER; + } if(s.compare("settings_error") == 0){ m_tag = ModifySharedLinkSettingsError_SETTINGS_ERROR; + m_settings_error.fromJson(js["settings_error"].toObject()); } - if(s.compare("email_not_verified") == 0){ + else if(s.compare("email_not_verified") == 0){ m_tag = ModifySharedLinkSettingsError_EMAIL_NOT_VERIFIED; + } } diff --git a/src/dropbox/sharing/SharingMountFolderError.cpp b/src/dropbox/sharing/SharingMountFolderError.cpp index e676671..aa0944e 100644 --- a/src/dropbox/sharing/SharingMountFolderError.cpp +++ b/src/dropbox/sharing/SharingMountFolderError.cpp @@ -58,24 +58,31 @@ void MountFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = MountFolderError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("inside_shared_folder") == 0){ + else if(s.compare("inside_shared_folder") == 0){ m_tag = MountFolderError_INSIDE_SHARED_FOLDER; + } - if(s.compare("insufficient_quota") == 0){ + else if(s.compare("insufficient_quota") == 0){ m_tag = MountFolderError_INSUFFICIENT_QUOTA; + m_insufficient_quota.fromJson(js); } - if(s.compare("already_mounted") == 0){ + else if(s.compare("already_mounted") == 0){ m_tag = MountFolderError_ALREADY_MOUNTED; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = MountFolderError_NO_PERMISSION; + } - if(s.compare("not_mountable") == 0){ + else if(s.compare("not_mountable") == 0){ m_tag = MountFolderError_NOT_MOUNTABLE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MountFolderError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingPendingUploadMode.cpp b/src/dropbox/sharing/SharingPendingUploadMode.cpp index 6cd0ac2..c059821 100644 --- a/src/dropbox/sharing/SharingPendingUploadMode.cpp +++ b/src/dropbox/sharing/SharingPendingUploadMode.cpp @@ -36,9 +36,11 @@ void PendingUploadMode::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("file") == 0){ m_tag = PendingUploadMode_FILE; + } - if(s.compare("folder") == 0){ + else if(s.compare("folder") == 0){ m_tag = PendingUploadMode_FOLDER; + } } diff --git a/src/dropbox/sharing/SharingPermissionDeniedReason.cpp b/src/dropbox/sharing/SharingPermissionDeniedReason.cpp index 3647013..f548db0 100644 --- a/src/dropbox/sharing/SharingPermissionDeniedReason.cpp +++ b/src/dropbox/sharing/SharingPermissionDeniedReason.cpp @@ -60,27 +60,35 @@ void PermissionDeniedReason::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_same_team_as_owner") == 0){ m_tag = PermissionDeniedReason_USER_NOT_SAME_TEAM_AS_OWNER; + } - if(s.compare("user_not_allowed_by_owner") == 0){ + else if(s.compare("user_not_allowed_by_owner") == 0){ m_tag = PermissionDeniedReason_USER_NOT_ALLOWED_BY_OWNER; + } - if(s.compare("target_is_indirect_member") == 0){ + else if(s.compare("target_is_indirect_member") == 0){ m_tag = PermissionDeniedReason_TARGET_IS_INDIRECT_MEMBER; + } - if(s.compare("target_is_owner") == 0){ + else if(s.compare("target_is_owner") == 0){ m_tag = PermissionDeniedReason_TARGET_IS_OWNER; + } - if(s.compare("target_is_self") == 0){ + else if(s.compare("target_is_self") == 0){ m_tag = PermissionDeniedReason_TARGET_IS_SELF; + } - if(s.compare("target_not_active") == 0){ + else if(s.compare("target_not_active") == 0){ m_tag = PermissionDeniedReason_TARGET_NOT_ACTIVE; + } - if(s.compare("folder_is_limited_team_folder") == 0){ + else if(s.compare("folder_is_limited_team_folder") == 0){ m_tag = PermissionDeniedReason_FOLDER_IS_LIMITED_TEAM_FOLDER; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PermissionDeniedReason_OTHER; + } } diff --git a/src/dropbox/sharing/SharingRelinquishFileMembershipError.cpp b/src/dropbox/sharing/SharingRelinquishFileMembershipError.cpp index 412b2ba..e7eea39 100644 --- a/src/dropbox/sharing/SharingRelinquishFileMembershipError.cpp +++ b/src/dropbox/sharing/SharingRelinquishFileMembershipError.cpp @@ -45,15 +45,19 @@ void RelinquishFileMembershipError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = RelinquishFileMembershipError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("group_access") == 0){ + else if(s.compare("group_access") == 0){ m_tag = RelinquishFileMembershipError_GROUP_ACCESS; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = RelinquishFileMembershipError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RelinquishFileMembershipError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingRelinquishFolderMembershipError.cpp b/src/dropbox/sharing/SharingRelinquishFolderMembershipError.cpp index 8182220..0d2e226 100644 --- a/src/dropbox/sharing/SharingRelinquishFolderMembershipError.cpp +++ b/src/dropbox/sharing/SharingRelinquishFolderMembershipError.cpp @@ -57,24 +57,31 @@ void RelinquishFolderMembershipError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = RelinquishFolderMembershipError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("folder_owner") == 0){ + else if(s.compare("folder_owner") == 0){ m_tag = RelinquishFolderMembershipError_FOLDER_OWNER; + } - if(s.compare("mounted") == 0){ + else if(s.compare("mounted") == 0){ m_tag = RelinquishFolderMembershipError_MOUNTED; + } - if(s.compare("group_access") == 0){ + else if(s.compare("group_access") == 0){ m_tag = RelinquishFolderMembershipError_GROUP_ACCESS; + } - if(s.compare("team_folder") == 0){ + else if(s.compare("team_folder") == 0){ m_tag = RelinquishFolderMembershipError_TEAM_FOLDER; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = RelinquishFolderMembershipError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RelinquishFolderMembershipError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingRemoveFileMemberError.cpp b/src/dropbox/sharing/SharingRemoveFileMemberError.cpp index aa2bb9e..a938b7d 100644 --- a/src/dropbox/sharing/SharingRemoveFileMemberError.cpp +++ b/src/dropbox/sharing/SharingRemoveFileMemberError.cpp @@ -47,15 +47,19 @@ void RemoveFileMemberError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = RemoveFileMemberError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = RemoveFileMemberError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("no_explicit_access") == 0){ + else if(s.compare("no_explicit_access") == 0){ m_tag = RemoveFileMemberError_NO_EXPLICIT_ACCESS; + m_no_explicit_access.fromJson(js); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RemoveFileMemberError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingRemoveFolderMemberError.cpp b/src/dropbox/sharing/SharingRemoveFolderMemberError.cpp index a3a3694..ddbdb51 100644 --- a/src/dropbox/sharing/SharingRemoveFolderMemberError.cpp +++ b/src/dropbox/sharing/SharingRemoveFolderMemberError.cpp @@ -58,24 +58,31 @@ void RemoveFolderMemberError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = RemoveFolderMemberError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("member_error") == 0){ + else if(s.compare("member_error") == 0){ m_tag = RemoveFolderMemberError_MEMBER_ERROR; + m_member_error.fromJson(js["member_error"].toObject()); } - if(s.compare("folder_owner") == 0){ + else if(s.compare("folder_owner") == 0){ m_tag = RemoveFolderMemberError_FOLDER_OWNER; + } - if(s.compare("group_access") == 0){ + else if(s.compare("group_access") == 0){ m_tag = RemoveFolderMemberError_GROUP_ACCESS; + } - if(s.compare("team_folder") == 0){ + else if(s.compare("team_folder") == 0){ m_tag = RemoveFolderMemberError_TEAM_FOLDER; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = RemoveFolderMemberError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RemoveFolderMemberError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingRemoveMemberJobStatus.cpp b/src/dropbox/sharing/SharingRemoveMemberJobStatus.cpp index 399e4af..4a1c7b6 100644 --- a/src/dropbox/sharing/SharingRemoveMemberJobStatus.cpp +++ b/src/dropbox/sharing/SharingRemoveMemberJobStatus.cpp @@ -42,12 +42,15 @@ void RemoveMemberJobStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = RemoveMemberJobStatus_COMPLETE; + m_complete.fromJson(js); } - if(s.compare("failed") == 0){ + else if(s.compare("failed") == 0){ m_tag = RemoveMemberJobStatus_FAILED; + m_failed.fromJson(js["failed"].toObject()); } } diff --git a/src/dropbox/sharing/SharingRequestedVisibility.cpp b/src/dropbox/sharing/SharingRequestedVisibility.cpp index f30a7b2..6b3adfe 100644 --- a/src/dropbox/sharing/SharingRequestedVisibility.cpp +++ b/src/dropbox/sharing/SharingRequestedVisibility.cpp @@ -40,12 +40,15 @@ void RequestedVisibility::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("public") == 0){ m_tag = RequestedVisibility_PUBLIC; + } - if(s.compare("team_only") == 0){ + else if(s.compare("team_only") == 0){ m_tag = RequestedVisibility_TEAM_ONLY; + } - if(s.compare("password") == 0){ + else if(s.compare("password") == 0){ m_tag = RequestedVisibility_PASSWORD; + } } diff --git a/src/dropbox/sharing/SharingResolvedVisibility.cpp b/src/dropbox/sharing/SharingResolvedVisibility.cpp index bfd573a..5751f08 100644 --- a/src/dropbox/sharing/SharingResolvedVisibility.cpp +++ b/src/dropbox/sharing/SharingResolvedVisibility.cpp @@ -52,21 +52,27 @@ void ResolvedVisibility::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("public") == 0){ m_tag = RequestedVisibility_PUBLIC; + } - if(s.compare("team_only") == 0){ + else if(s.compare("team_only") == 0){ m_tag = RequestedVisibility_TEAM_ONLY; + } - if(s.compare("password") == 0){ + else if(s.compare("password") == 0){ m_tag = RequestedVisibility_PASSWORD; + } if(s.compare("team_and_password") == 0){ m_tag = ResolvedVisibility_TEAM_AND_PASSWORD; + } - if(s.compare("shared_folder_only") == 0){ + else if(s.compare("shared_folder_only") == 0){ m_tag = ResolvedVisibility_SHARED_FOLDER_ONLY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ResolvedVisibility_OTHER; + } } diff --git a/src/dropbox/sharing/SharingRevokeSharedLinkError.cpp b/src/dropbox/sharing/SharingRevokeSharedLinkError.cpp index 7eb136c..2a49245 100644 --- a/src/dropbox/sharing/SharingRevokeSharedLinkError.cpp +++ b/src/dropbox/sharing/SharingRevokeSharedLinkError.cpp @@ -44,15 +44,19 @@ void RevokeSharedLinkError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("shared_link_not_found") == 0){ m_tag = SharedLinkError_SHARED_LINK_NOT_FOUND; + } - if(s.compare("shared_link_access_denied") == 0){ + else if(s.compare("shared_link_access_denied") == 0){ m_tag = SharedLinkError_SHARED_LINK_ACCESS_DENIED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkError_OTHER; + } if(s.compare("shared_link_malformed") == 0){ m_tag = RevokeSharedLinkError_SHARED_LINK_MALFORMED; + } } diff --git a/src/dropbox/sharing/SharingShareFolderError.cpp b/src/dropbox/sharing/SharingShareFolderError.cpp index 3006c82..06fe034 100644 --- a/src/dropbox/sharing/SharingShareFolderError.cpp +++ b/src/dropbox/sharing/SharingShareFolderError.cpp @@ -53,21 +53,27 @@ void ShareFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("email_unverified") == 0){ m_tag = ShareFolderErrorBase_EMAIL_UNVERIFIED; + } - if(s.compare("bad_path") == 0){ + else if(s.compare("bad_path") == 0){ m_tag = ShareFolderErrorBase_BAD_PATH; + m_bad_path.fromJson(js["bad_path"].toObject()); } - if(s.compare("team_policy_disallows_member_policy") == 0){ + else if(s.compare("team_policy_disallows_member_policy") == 0){ m_tag = ShareFolderErrorBase_TEAM_POLICY_DISALLOWS_MEMBER_POLICY; + } - if(s.compare("disallowed_shared_link_policy") == 0){ + else if(s.compare("disallowed_shared_link_policy") == 0){ m_tag = ShareFolderErrorBase_DISALLOWED_SHARED_LINK_POLICY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ShareFolderErrorBase_OTHER; + } if(s.compare("no_permission") == 0){ m_tag = ShareFolderError_NO_PERMISSION; + } } diff --git a/src/dropbox/sharing/SharingShareFolderErrorBase.cpp b/src/dropbox/sharing/SharingShareFolderErrorBase.cpp index f0caddb..e815c16 100644 --- a/src/dropbox/sharing/SharingShareFolderErrorBase.cpp +++ b/src/dropbox/sharing/SharingShareFolderErrorBase.cpp @@ -49,18 +49,23 @@ void ShareFolderErrorBase::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("email_unverified") == 0){ m_tag = ShareFolderErrorBase_EMAIL_UNVERIFIED; + } - if(s.compare("bad_path") == 0){ + else if(s.compare("bad_path") == 0){ m_tag = ShareFolderErrorBase_BAD_PATH; + m_bad_path.fromJson(js["bad_path"].toObject()); } - if(s.compare("team_policy_disallows_member_policy") == 0){ + else if(s.compare("team_policy_disallows_member_policy") == 0){ m_tag = ShareFolderErrorBase_TEAM_POLICY_DISALLOWS_MEMBER_POLICY; + } - if(s.compare("disallowed_shared_link_policy") == 0){ + else if(s.compare("disallowed_shared_link_policy") == 0){ m_tag = ShareFolderErrorBase_DISALLOWED_SHARED_LINK_POLICY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ShareFolderErrorBase_OTHER; + } } diff --git a/src/dropbox/sharing/SharingShareFolderJobStatus.cpp b/src/dropbox/sharing/SharingShareFolderJobStatus.cpp index a0e8a67..ea32330 100644 --- a/src/dropbox/sharing/SharingShareFolderJobStatus.cpp +++ b/src/dropbox/sharing/SharingShareFolderJobStatus.cpp @@ -42,12 +42,15 @@ void ShareFolderJobStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = ShareFolderJobStatus_COMPLETE; + m_complete.fromJson(js); } - if(s.compare("failed") == 0){ + else if(s.compare("failed") == 0){ m_tag = ShareFolderJobStatus_FAILED; + m_failed.fromJson(js["failed"].toObject()); } } diff --git a/src/dropbox/sharing/SharingShareFolderLaunch.cpp b/src/dropbox/sharing/SharingShareFolderLaunch.cpp index 0c3b536..faf16ee 100644 --- a/src/dropbox/sharing/SharingShareFolderLaunch.cpp +++ b/src/dropbox/sharing/SharingShareFolderLaunch.cpp @@ -39,9 +39,11 @@ void ShareFolderLaunch::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("async_job_id") == 0){ m_tag = LaunchResultBase_ASYNC_JOB_ID; + m_async_job_id = js["async_job_id"].toString(); } if(s.compare("complete") == 0){ m_tag = ShareFolderLaunch_COMPLETE; + m_complete.fromJson(js); } } diff --git a/src/dropbox/sharing/SharingSharePathError.cpp b/src/dropbox/sharing/SharingSharePathError.cpp index 2ca9ce0..9c298ca 100644 --- a/src/dropbox/sharing/SharingSharePathError.cpp +++ b/src/dropbox/sharing/SharingSharePathError.cpp @@ -77,39 +77,51 @@ void SharePathError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("is_file") == 0){ m_tag = SharePathError_IS_FILE; + } - if(s.compare("inside_shared_folder") == 0){ + else if(s.compare("inside_shared_folder") == 0){ m_tag = SharePathError_INSIDE_SHARED_FOLDER; + } - if(s.compare("contains_shared_folder") == 0){ + else if(s.compare("contains_shared_folder") == 0){ m_tag = SharePathError_CONTAINS_SHARED_FOLDER; + } - if(s.compare("is_app_folder") == 0){ + else if(s.compare("is_app_folder") == 0){ m_tag = SharePathError_IS_APP_FOLDER; + } - if(s.compare("inside_app_folder") == 0){ + else if(s.compare("inside_app_folder") == 0){ m_tag = SharePathError_INSIDE_APP_FOLDER; + } - if(s.compare("is_public_folder") == 0){ + else if(s.compare("is_public_folder") == 0){ m_tag = SharePathError_IS_PUBLIC_FOLDER; + } - if(s.compare("inside_public_folder") == 0){ + else if(s.compare("inside_public_folder") == 0){ m_tag = SharePathError_INSIDE_PUBLIC_FOLDER; + } - if(s.compare("already_shared") == 0){ + else if(s.compare("already_shared") == 0){ m_tag = SharePathError_ALREADY_SHARED; + m_already_shared.fromJson(js); } - if(s.compare("invalid_path") == 0){ + else if(s.compare("invalid_path") == 0){ m_tag = SharePathError_INVALID_PATH; + } - if(s.compare("is_osx_package") == 0){ + else if(s.compare("is_osx_package") == 0){ m_tag = SharePathError_IS_OSX_PACKAGE; + } - if(s.compare("inside_osx_package") == 0){ + else if(s.compare("inside_osx_package") == 0){ m_tag = SharePathError_INSIDE_OSX_PACKAGE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharePathError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharedFolderAccessError.cpp b/src/dropbox/sharing/SharingSharedFolderAccessError.cpp index 3123cf6..3fadf70 100644 --- a/src/dropbox/sharing/SharingSharedFolderAccessError.cpp +++ b/src/dropbox/sharing/SharingSharedFolderAccessError.cpp @@ -48,18 +48,23 @@ void SharedFolderAccessError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_id") == 0){ m_tag = SharedFolderAccessError_INVALID_ID; + } - if(s.compare("not_a_member") == 0){ + else if(s.compare("not_a_member") == 0){ m_tag = SharedFolderAccessError_NOT_A_MEMBER; + } - if(s.compare("email_unverified") == 0){ + else if(s.compare("email_unverified") == 0){ m_tag = SharedFolderAccessError_EMAIL_UNVERIFIED; + } - if(s.compare("unmounted") == 0){ + else if(s.compare("unmounted") == 0){ m_tag = SharedFolderAccessError_UNMOUNTED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedFolderAccessError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharedFolderMemberError.cpp b/src/dropbox/sharing/SharingSharedFolderMemberError.cpp index 3e9f051..7abf214 100644 --- a/src/dropbox/sharing/SharingSharedFolderMemberError.cpp +++ b/src/dropbox/sharing/SharingSharedFolderMemberError.cpp @@ -45,15 +45,19 @@ void SharedFolderMemberError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_dropbox_id") == 0){ m_tag = SharedFolderMemberError_INVALID_DROPBOX_ID; + } - if(s.compare("not_a_member") == 0){ + else if(s.compare("not_a_member") == 0){ m_tag = SharedFolderMemberError_NOT_A_MEMBER; + } - if(s.compare("no_explicit_access") == 0){ + else if(s.compare("no_explicit_access") == 0){ m_tag = SharedFolderMemberError_NO_EXPLICIT_ACCESS; + m_no_explicit_access.fromJson(js); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedFolderMemberError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharedLinkAccessFailureReason.cpp b/src/dropbox/sharing/SharingSharedLinkAccessFailureReason.cpp index 518d0b3..f28d398 100644 --- a/src/dropbox/sharing/SharingSharedLinkAccessFailureReason.cpp +++ b/src/dropbox/sharing/SharingSharedLinkAccessFailureReason.cpp @@ -52,21 +52,27 @@ void SharedLinkAccessFailureReason::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("login_required") == 0){ m_tag = SharedLinkAccessFailureReason_LOGIN_REQUIRED; + } - if(s.compare("email_verify_required") == 0){ + else if(s.compare("email_verify_required") == 0){ m_tag = SharedLinkAccessFailureReason_EMAIL_VERIFY_REQUIRED; + } - if(s.compare("password_required") == 0){ + else if(s.compare("password_required") == 0){ m_tag = SharedLinkAccessFailureReason_PASSWORD_REQUIRED; + } - if(s.compare("team_only") == 0){ + else if(s.compare("team_only") == 0){ m_tag = SharedLinkAccessFailureReason_TEAM_ONLY; + } - if(s.compare("owner_only") == 0){ + else if(s.compare("owner_only") == 0){ m_tag = SharedLinkAccessFailureReason_OWNER_ONLY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkAccessFailureReason_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharedLinkError.cpp b/src/dropbox/sharing/SharingSharedLinkError.cpp index 1d66d21..31fe848 100644 --- a/src/dropbox/sharing/SharingSharedLinkError.cpp +++ b/src/dropbox/sharing/SharingSharedLinkError.cpp @@ -40,12 +40,15 @@ void SharedLinkError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("shared_link_not_found") == 0){ m_tag = SharedLinkError_SHARED_LINK_NOT_FOUND; + } - if(s.compare("shared_link_access_denied") == 0){ + else if(s.compare("shared_link_access_denied") == 0){ m_tag = SharedLinkError_SHARED_LINK_ACCESS_DENIED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharedLinkPolicy.cpp b/src/dropbox/sharing/SharingSharedLinkPolicy.cpp index 9cb4e12..8b82928 100644 --- a/src/dropbox/sharing/SharingSharedLinkPolicy.cpp +++ b/src/dropbox/sharing/SharingSharedLinkPolicy.cpp @@ -40,12 +40,15 @@ void SharedLinkPolicy::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("anyone") == 0){ m_tag = SharedLinkPolicy_ANYONE; + } - if(s.compare("members") == 0){ + else if(s.compare("members") == 0){ m_tag = SharedLinkPolicy_MEMBERS; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkPolicy_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharedLinkSettingsError.cpp b/src/dropbox/sharing/SharingSharedLinkSettingsError.cpp index 8d543f2..6772c17 100644 --- a/src/dropbox/sharing/SharingSharedLinkSettingsError.cpp +++ b/src/dropbox/sharing/SharingSharedLinkSettingsError.cpp @@ -36,9 +36,11 @@ void SharedLinkSettingsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_settings") == 0){ m_tag = SharedLinkSettingsError_INVALID_SETTINGS; + } - if(s.compare("not_authorized") == 0){ + else if(s.compare("not_authorized") == 0){ m_tag = SharedLinkSettingsError_NOT_AUTHORIZED; + } } diff --git a/src/dropbox/sharing/SharingSharingFileAccessError.cpp b/src/dropbox/sharing/SharingSharingFileAccessError.cpp index e389b63..d337b64 100644 --- a/src/dropbox/sharing/SharingSharingFileAccessError.cpp +++ b/src/dropbox/sharing/SharingSharingFileAccessError.cpp @@ -52,21 +52,27 @@ void SharingFileAccessError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("no_permission") == 0){ m_tag = SharingFileAccessError_NO_PERMISSION; + } - if(s.compare("invalid_file") == 0){ + else if(s.compare("invalid_file") == 0){ m_tag = SharingFileAccessError_INVALID_FILE; + } - if(s.compare("is_folder") == 0){ + else if(s.compare("is_folder") == 0){ m_tag = SharingFileAccessError_IS_FOLDER; + } - if(s.compare("inside_public_folder") == 0){ + else if(s.compare("inside_public_folder") == 0){ m_tag = SharingFileAccessError_INSIDE_PUBLIC_FOLDER; + } - if(s.compare("inside_osx_package") == 0){ + else if(s.compare("inside_osx_package") == 0){ m_tag = SharingFileAccessError_INSIDE_OSX_PACKAGE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharingFileAccessError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingSharingUserError.cpp b/src/dropbox/sharing/SharingSharingUserError.cpp index 24f6bdb..835c23d 100644 --- a/src/dropbox/sharing/SharingSharingUserError.cpp +++ b/src/dropbox/sharing/SharingSharingUserError.cpp @@ -36,9 +36,11 @@ void SharingUserError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("email_unverified") == 0){ m_tag = SharingUserError_EMAIL_UNVERIFIED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharingUserError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingTransferFolderError.cpp b/src/dropbox/sharing/SharingTransferFolderError.cpp index 9d98d9c..0d6494c 100644 --- a/src/dropbox/sharing/SharingTransferFolderError.cpp +++ b/src/dropbox/sharing/SharingTransferFolderError.cpp @@ -61,27 +61,35 @@ void TransferFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = TransferFolderError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("invalid_dropbox_id") == 0){ + else if(s.compare("invalid_dropbox_id") == 0){ m_tag = TransferFolderError_INVALID_DROPBOX_ID; + } - if(s.compare("new_owner_not_a_member") == 0){ + else if(s.compare("new_owner_not_a_member") == 0){ m_tag = TransferFolderError_NEW_OWNER_NOT_A_MEMBER; + } - if(s.compare("new_owner_unmounted") == 0){ + else if(s.compare("new_owner_unmounted") == 0){ m_tag = TransferFolderError_NEW_OWNER_UNMOUNTED; + } - if(s.compare("new_owner_email_unverified") == 0){ + else if(s.compare("new_owner_email_unverified") == 0){ m_tag = TransferFolderError_NEW_OWNER_EMAIL_UNVERIFIED; + } - if(s.compare("team_folder") == 0){ + else if(s.compare("team_folder") == 0){ m_tag = TransferFolderError_TEAM_FOLDER; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = TransferFolderError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = TransferFolderError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingUnmountFolderError.cpp b/src/dropbox/sharing/SharingUnmountFolderError.cpp index 5b44673..e4d6925 100644 --- a/src/dropbox/sharing/SharingUnmountFolderError.cpp +++ b/src/dropbox/sharing/SharingUnmountFolderError.cpp @@ -45,15 +45,19 @@ void UnmountFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = UnmountFolderError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = UnmountFolderError_NO_PERMISSION; + } - if(s.compare("not_unmountable") == 0){ + else if(s.compare("not_unmountable") == 0){ m_tag = UnmountFolderError_NOT_UNMOUNTABLE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UnmountFolderError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingUnshareFileError.cpp b/src/dropbox/sharing/SharingUnshareFileError.cpp index d115282..c2d5df2 100644 --- a/src/dropbox/sharing/SharingUnshareFileError.cpp +++ b/src/dropbox/sharing/SharingUnshareFileError.cpp @@ -42,12 +42,15 @@ void UnshareFileError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_error") == 0){ m_tag = UnshareFileError_USER_ERROR; + m_user_error.fromJson(js["user_error"].toObject()); } - if(s.compare("access_error") == 0){ + else if(s.compare("access_error") == 0){ m_tag = UnshareFileError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UnshareFileError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingUnshareFolderError.cpp b/src/dropbox/sharing/SharingUnshareFolderError.cpp index 31fa45e..30e5761 100644 --- a/src/dropbox/sharing/SharingUnshareFolderError.cpp +++ b/src/dropbox/sharing/SharingUnshareFolderError.cpp @@ -45,15 +45,19 @@ void UnshareFolderError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = UnshareFolderError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("team_folder") == 0){ + else if(s.compare("team_folder") == 0){ m_tag = UnshareFolderError_TEAM_FOLDER; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = UnshareFolderError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UnshareFolderError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingUpdateFolderMemberError.cpp b/src/dropbox/sharing/SharingUpdateFolderMemberError.cpp index e003c48..ec075a4 100644 --- a/src/dropbox/sharing/SharingUpdateFolderMemberError.cpp +++ b/src/dropbox/sharing/SharingUpdateFolderMemberError.cpp @@ -55,21 +55,27 @@ void UpdateFolderMemberError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = UpdateFolderMemberError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("member_error") == 0){ + else if(s.compare("member_error") == 0){ m_tag = UpdateFolderMemberError_MEMBER_ERROR; + m_member_error.fromJson(js["member_error"].toObject()); } - if(s.compare("no_explicit_access") == 0){ + else if(s.compare("no_explicit_access") == 0){ m_tag = UpdateFolderMemberError_NO_EXPLICIT_ACCESS; + m_no_explicit_access.fromJson(js["no_explicit_access"].toObject()); } - if(s.compare("insufficient_plan") == 0){ + else if(s.compare("insufficient_plan") == 0){ m_tag = UpdateFolderMemberError_INSUFFICIENT_PLAN; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = UpdateFolderMemberError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UpdateFolderMemberError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingUpdateFolderPolicyError.cpp b/src/dropbox/sharing/SharingUpdateFolderPolicyError.cpp index c372685..0a639f2 100644 --- a/src/dropbox/sharing/SharingUpdateFolderPolicyError.cpp +++ b/src/dropbox/sharing/SharingUpdateFolderPolicyError.cpp @@ -53,21 +53,27 @@ void UpdateFolderPolicyError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("access_error") == 0){ m_tag = UpdateFolderPolicyError_ACCESS_ERROR; + m_access_error.fromJson(js["access_error"].toObject()); } - if(s.compare("not_on_team") == 0){ + else if(s.compare("not_on_team") == 0){ m_tag = UpdateFolderPolicyError_NOT_ON_TEAM; + } - if(s.compare("team_policy_disallows_member_policy") == 0){ + else if(s.compare("team_policy_disallows_member_policy") == 0){ m_tag = UpdateFolderPolicyError_TEAM_POLICY_DISALLOWS_MEMBER_POLICY; + } - if(s.compare("disallowed_shared_link_policy") == 0){ + else if(s.compare("disallowed_shared_link_policy") == 0){ m_tag = UpdateFolderPolicyError_DISALLOWED_SHARED_LINK_POLICY; + } - if(s.compare("no_permission") == 0){ + else if(s.compare("no_permission") == 0){ m_tag = UpdateFolderPolicyError_NO_PERMISSION; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = UpdateFolderPolicyError_OTHER; + } } diff --git a/src/dropbox/sharing/SharingVisibility.cpp b/src/dropbox/sharing/SharingVisibility.cpp index a174856..c2c77a2 100644 --- a/src/dropbox/sharing/SharingVisibility.cpp +++ b/src/dropbox/sharing/SharingVisibility.cpp @@ -52,21 +52,27 @@ void Visibility::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("public") == 0){ m_tag = Visibility_PUBLIC; + } - if(s.compare("team_only") == 0){ + else if(s.compare("team_only") == 0){ m_tag = Visibility_TEAM_ONLY; + } - if(s.compare("password") == 0){ + else if(s.compare("password") == 0){ m_tag = Visibility_PASSWORD; + } - if(s.compare("team_and_password") == 0){ + else if(s.compare("team_and_password") == 0){ m_tag = Visibility_TEAM_AND_PASSWORD; + } - if(s.compare("shared_folder_only") == 0){ + else if(s.compare("shared_folder_only") == 0){ m_tag = Visibility_SHARED_FOLDER_ONLY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = Visibility_OTHER; + } } diff --git a/src/dropbox/team/TeamAdminTier.cpp b/src/dropbox/team/TeamAdminTier.cpp index fe336c6..89b0da8 100644 --- a/src/dropbox/team/TeamAdminTier.cpp +++ b/src/dropbox/team/TeamAdminTier.cpp @@ -44,15 +44,19 @@ void AdminTier::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("team_admin") == 0){ m_tag = AdminTier_TEAM_ADMIN; + } - if(s.compare("user_management_admin") == 0){ + else if(s.compare("user_management_admin") == 0){ m_tag = AdminTier_USER_MANAGEMENT_ADMIN; + } - if(s.compare("support_admin") == 0){ + else if(s.compare("support_admin") == 0){ m_tag = AdminTier_SUPPORT_ADMIN; + } - if(s.compare("member_only") == 0){ + else if(s.compare("member_only") == 0){ m_tag = AdminTier_MEMBER_ONLY; + } } diff --git a/src/dropbox/team/TeamDateRangeError.cpp b/src/dropbox/team/TeamDateRangeError.cpp index d84ae99..0813817 100644 --- a/src/dropbox/team/TeamDateRangeError.cpp +++ b/src/dropbox/team/TeamDateRangeError.cpp @@ -32,6 +32,7 @@ void DateRangeError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("other") == 0){ m_tag = DateRangeError_OTHER; + } } diff --git a/src/dropbox/team/TeamDesktopPlatform.cpp b/src/dropbox/team/TeamDesktopPlatform.cpp index ab5dafa..d9fcdc0 100644 --- a/src/dropbox/team/TeamDesktopPlatform.cpp +++ b/src/dropbox/team/TeamDesktopPlatform.cpp @@ -44,15 +44,19 @@ void DesktopPlatform::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("windows") == 0){ m_tag = DesktopPlatform_WINDOWS; + } - if(s.compare("mac") == 0){ + else if(s.compare("mac") == 0){ m_tag = DesktopPlatform_MAC; + } - if(s.compare("linux") == 0){ + else if(s.compare("linux") == 0){ m_tag = DesktopPlatform_LINUX; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = DesktopPlatform_OTHER; + } } diff --git a/src/dropbox/team/TeamGroupAccessType.cpp b/src/dropbox/team/TeamGroupAccessType.cpp index abfc3b7..60fda7d 100644 --- a/src/dropbox/team/TeamGroupAccessType.cpp +++ b/src/dropbox/team/TeamGroupAccessType.cpp @@ -36,9 +36,11 @@ void GroupAccessType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("member") == 0){ m_tag = GroupAccessType_MEMBER; + } - if(s.compare("owner") == 0){ + else if(s.compare("owner") == 0){ m_tag = GroupAccessType_OWNER; + } } diff --git a/src/dropbox/team/TeamGroupCreateError.cpp b/src/dropbox/team/TeamGroupCreateError.cpp index ad675ee..6e7962e 100644 --- a/src/dropbox/team/TeamGroupCreateError.cpp +++ b/src/dropbox/team/TeamGroupCreateError.cpp @@ -44,15 +44,19 @@ void GroupCreateError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_name_already_used") == 0){ m_tag = GroupCreateError_GROUP_NAME_ALREADY_USED; + } - if(s.compare("group_name_invalid") == 0){ + else if(s.compare("group_name_invalid") == 0){ m_tag = GroupCreateError_GROUP_NAME_INVALID; + } - if(s.compare("external_id_already_in_use") == 0){ + else if(s.compare("external_id_already_in_use") == 0){ m_tag = GroupCreateError_EXTERNAL_ID_ALREADY_IN_USE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupCreateError_OTHER; + } } diff --git a/src/dropbox/team/TeamGroupDeleteError.cpp b/src/dropbox/team/TeamGroupDeleteError.cpp index 230c80d..385dffe 100644 --- a/src/dropbox/team/TeamGroupDeleteError.cpp +++ b/src/dropbox/team/TeamGroupDeleteError.cpp @@ -40,12 +40,15 @@ void GroupDeleteError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("group_already_deleted") == 0){ m_tag = GroupDeleteError_GROUP_ALREADY_DELETED; + } } diff --git a/src/dropbox/team/TeamGroupMemberSelectorError.cpp b/src/dropbox/team/TeamGroupMemberSelectorError.cpp index abc790c..6bb602c 100644 --- a/src/dropbox/team/TeamGroupMemberSelectorError.cpp +++ b/src/dropbox/team/TeamGroupMemberSelectorError.cpp @@ -40,12 +40,15 @@ void GroupMemberSelectorError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("member_not_in_group") == 0){ m_tag = GroupMemberSelectorError_MEMBER_NOT_IN_GROUP; + } } diff --git a/src/dropbox/team/TeamGroupMemberSetAccessTypeError.cpp b/src/dropbox/team/TeamGroupMemberSetAccessTypeError.cpp index 5c78922..3ffb6d4 100644 --- a/src/dropbox/team/TeamGroupMemberSetAccessTypeError.cpp +++ b/src/dropbox/team/TeamGroupMemberSetAccessTypeError.cpp @@ -44,15 +44,19 @@ void GroupMemberSetAccessTypeError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("member_not_in_group") == 0){ m_tag = GroupMemberSelectorError_MEMBER_NOT_IN_GROUP; + } if(s.compare("user_cannot_be_manager_of_company_managed_group") == 0){ m_tag = GroupMemberSetAccessTypeError_USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP; + } } diff --git a/src/dropbox/team/TeamGroupMembersAddError.cpp b/src/dropbox/team/TeamGroupMembersAddError.cpp index b06100c..aef06cf 100644 --- a/src/dropbox/team/TeamGroupMembersAddError.cpp +++ b/src/dropbox/team/TeamGroupMembersAddError.cpp @@ -63,27 +63,35 @@ void GroupMembersAddError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("duplicate_user") == 0){ m_tag = GroupMembersAddError_DUPLICATE_USER; + } - if(s.compare("group_not_in_team") == 0){ + else if(s.compare("group_not_in_team") == 0){ m_tag = GroupMembersAddError_GROUP_NOT_IN_TEAM; + } - if(s.compare("members_not_in_team") == 0){ + else if(s.compare("members_not_in_team") == 0){ m_tag = GroupMembersAddError_MEMBERS_NOT_IN_TEAM; + jsonarray2ingrl_list(js["members_not_in_team"].toArray(), m_members_not_in_team); } - if(s.compare("users_not_found") == 0){ + else if(s.compare("users_not_found") == 0){ m_tag = GroupMembersAddError_USERS_NOT_FOUND; + jsonarray2ingrl_list(js["users_not_found"].toArray(), m_users_not_found); } - if(s.compare("user_must_be_active_to_be_owner") == 0){ + else if(s.compare("user_must_be_active_to_be_owner") == 0){ m_tag = GroupMembersAddError_USER_MUST_BE_ACTIVE_TO_BE_OWNER; + } - if(s.compare("user_cannot_be_manager_of_company_managed_group") == 0){ + else if(s.compare("user_cannot_be_manager_of_company_managed_group") == 0){ m_tag = GroupMembersAddError_USER_CANNOT_BE_MANAGER_OF_COMPANY_MANAGED_GROUP; + jsonarray2ingrl_list(js["user_cannot_be_manager_of_company_managed_group"].toArray(), m_user_cannot_be_manager_of_company_managed_group); } } diff --git a/src/dropbox/team/TeamGroupMembersRemoveError.cpp b/src/dropbox/team/TeamGroupMembersRemoveError.cpp index ca63a0c..8d7ddca 100644 --- a/src/dropbox/team/TeamGroupMembersRemoveError.cpp +++ b/src/dropbox/team/TeamGroupMembersRemoveError.cpp @@ -44,15 +44,19 @@ void GroupMembersRemoveError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("member_not_in_group") == 0){ m_tag = GroupMembersSelectorError_MEMBER_NOT_IN_GROUP; + } if(s.compare("group_not_in_team") == 0){ m_tag = GroupMembersRemoveError_GROUP_NOT_IN_TEAM; + } } diff --git a/src/dropbox/team/TeamGroupMembersSelectorError.cpp b/src/dropbox/team/TeamGroupMembersSelectorError.cpp index 496e2a1..6ee513a 100644 --- a/src/dropbox/team/TeamGroupMembersSelectorError.cpp +++ b/src/dropbox/team/TeamGroupMembersSelectorError.cpp @@ -40,12 +40,15 @@ void GroupMembersSelectorError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("member_not_in_group") == 0){ m_tag = GroupMembersSelectorError_MEMBER_NOT_IN_GROUP; + } } diff --git a/src/dropbox/team/TeamGroupSelector.cpp b/src/dropbox/team/TeamGroupSelector.cpp index 5cc4b21..5bf64a9 100644 --- a/src/dropbox/team/TeamGroupSelector.cpp +++ b/src/dropbox/team/TeamGroupSelector.cpp @@ -40,9 +40,11 @@ void GroupSelector::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_id") == 0){ m_tag = GroupSelector_GROUP_ID; + m_group_id = js["group_id"].toString(); } - if(s.compare("group_external_id") == 0){ + else if(s.compare("group_external_id") == 0){ m_tag = GroupSelector_GROUP_EXTERNAL_ID; + m_group_external_id = js["group_external_id"].toString(); } } diff --git a/src/dropbox/team/TeamGroupSelectorError.cpp b/src/dropbox/team/TeamGroupSelectorError.cpp index 885cfc3..150a8fd 100644 --- a/src/dropbox/team/TeamGroupSelectorError.cpp +++ b/src/dropbox/team/TeamGroupSelectorError.cpp @@ -36,9 +36,11 @@ void GroupSelectorError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } } diff --git a/src/dropbox/team/TeamGroupUpdateError.cpp b/src/dropbox/team/TeamGroupUpdateError.cpp index 9fc3790..1bb2769 100644 --- a/src/dropbox/team/TeamGroupUpdateError.cpp +++ b/src/dropbox/team/TeamGroupUpdateError.cpp @@ -40,12 +40,15 @@ void GroupUpdateError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_found") == 0){ m_tag = GroupSelectorError_GROUP_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupSelectorError_OTHER; + } if(s.compare("external_id_already_in_use") == 0){ m_tag = GroupUpdateError_EXTERNAL_ID_ALREADY_IN_USE; + } } diff --git a/src/dropbox/team/TeamGroupsGetInfoError.cpp b/src/dropbox/team/TeamGroupsGetInfoError.cpp index 9cd90be..24e34c7 100644 --- a/src/dropbox/team/TeamGroupsGetInfoError.cpp +++ b/src/dropbox/team/TeamGroupsGetInfoError.cpp @@ -36,9 +36,11 @@ void GroupsGetInfoError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_not_on_team") == 0){ m_tag = GroupsGetInfoError_GROUP_NOT_ON_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupsGetInfoError_OTHER; + } } diff --git a/src/dropbox/team/TeamGroupsGetInfoItem.cpp b/src/dropbox/team/TeamGroupsGetInfoItem.cpp index 20803db..3753a20 100644 --- a/src/dropbox/team/TeamGroupsGetInfoItem.cpp +++ b/src/dropbox/team/TeamGroupsGetInfoItem.cpp @@ -39,9 +39,11 @@ void GroupsGetInfoItem::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("id_not_found") == 0){ m_tag = GroupsGetInfoItem_ID_NOT_FOUND; + m_id_not_found = js["id_not_found"].toString(); } - if(s.compare("group_info") == 0){ + else if(s.compare("group_info") == 0){ m_tag = GroupsGetInfoItem_GROUP_INFO; + m_group_info.fromJson(js); } } diff --git a/src/dropbox/team/TeamGroupsListContinueError.cpp b/src/dropbox/team/TeamGroupsListContinueError.cpp index a444afb..64a0c30 100644 --- a/src/dropbox/team/TeamGroupsListContinueError.cpp +++ b/src/dropbox/team/TeamGroupsListContinueError.cpp @@ -36,9 +36,11 @@ void GroupsListContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_cursor") == 0){ m_tag = GroupsListContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupsListContinueError_OTHER; + } } diff --git a/src/dropbox/team/TeamGroupsMembersListContinueError.cpp b/src/dropbox/team/TeamGroupsMembersListContinueError.cpp index 808a33b..d159c2d 100644 --- a/src/dropbox/team/TeamGroupsMembersListContinueError.cpp +++ b/src/dropbox/team/TeamGroupsMembersListContinueError.cpp @@ -36,9 +36,11 @@ void GroupsMembersListContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_cursor") == 0){ m_tag = GroupsMembersListContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupsMembersListContinueError_OTHER; + } } diff --git a/src/dropbox/team/TeamGroupsPollError.cpp b/src/dropbox/team/TeamGroupsPollError.cpp index 64a621a..13c7214 100644 --- a/src/dropbox/team/TeamGroupsPollError.cpp +++ b/src/dropbox/team/TeamGroupsPollError.cpp @@ -44,15 +44,19 @@ void GroupsPollError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_async_job_id") == 0){ m_tag = PollError_INVALID_ASYNC_JOB_ID; + } - if(s.compare("internal_error") == 0){ + else if(s.compare("internal_error") == 0){ m_tag = PollError_INTERNAL_ERROR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = PollError_OTHER; + } if(s.compare("access_denied") == 0){ m_tag = GroupsPollError_ACCESS_DENIED; + } } diff --git a/src/dropbox/team/TeamGroupsSelector.cpp b/src/dropbox/team/TeamGroupsSelector.cpp index 1ab300e..8c6ab25 100644 --- a/src/dropbox/team/TeamGroupsSelector.cpp +++ b/src/dropbox/team/TeamGroupsSelector.cpp @@ -38,9 +38,11 @@ void GroupsSelector::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("group_ids") == 0){ m_tag = GroupsSelector_GROUP_IDS; + jsonarray2ingrl_list(js["group_ids"].toArray(), m_group_ids); } - if(s.compare("group_external_ids") == 0){ + else if(s.compare("group_external_ids") == 0){ m_tag = GroupsSelector_GROUP_EXTERNAL_IDS; + jsonarray2ingrl_list(js["group_external_ids"].toArray(), m_group_external_ids); } } diff --git a/src/dropbox/team/TeamListMemberAppsError.cpp b/src/dropbox/team/TeamListMemberAppsError.cpp index 23089b6..13c18cc 100644 --- a/src/dropbox/team/TeamListMemberAppsError.cpp +++ b/src/dropbox/team/TeamListMemberAppsError.cpp @@ -36,9 +36,11 @@ void ListMemberAppsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("member_not_found") == 0){ m_tag = ListMemberAppsError_MEMBER_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListMemberAppsError_OTHER; + } } diff --git a/src/dropbox/team/TeamListMemberDevicesError.cpp b/src/dropbox/team/TeamListMemberDevicesError.cpp index 066a4ea..ef4244f 100644 --- a/src/dropbox/team/TeamListMemberDevicesError.cpp +++ b/src/dropbox/team/TeamListMemberDevicesError.cpp @@ -36,9 +36,11 @@ void ListMemberDevicesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("member_not_found") == 0){ m_tag = ListMemberDevicesError_MEMBER_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListMemberDevicesError_OTHER; + } } diff --git a/src/dropbox/team/TeamListMembersAppsError.cpp b/src/dropbox/team/TeamListMembersAppsError.cpp index 46b4cd2..f3e509c 100644 --- a/src/dropbox/team/TeamListMembersAppsError.cpp +++ b/src/dropbox/team/TeamListMembersAppsError.cpp @@ -36,9 +36,11 @@ void ListMembersAppsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("reset") == 0){ m_tag = ListMembersAppsError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListMembersAppsError_OTHER; + } } diff --git a/src/dropbox/team/TeamListMembersDevicesError.cpp b/src/dropbox/team/TeamListMembersDevicesError.cpp index 9a713f8..28429b7 100644 --- a/src/dropbox/team/TeamListMembersDevicesError.cpp +++ b/src/dropbox/team/TeamListMembersDevicesError.cpp @@ -36,9 +36,11 @@ void ListMembersDevicesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("reset") == 0){ m_tag = ListMembersDevicesError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListMembersDevicesError_OTHER; + } } diff --git a/src/dropbox/team/TeamListTeamAppsError.cpp b/src/dropbox/team/TeamListTeamAppsError.cpp index e62ae3c..f3be517 100644 --- a/src/dropbox/team/TeamListTeamAppsError.cpp +++ b/src/dropbox/team/TeamListTeamAppsError.cpp @@ -36,9 +36,11 @@ void ListTeamAppsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("reset") == 0){ m_tag = ListTeamAppsError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListTeamAppsError_OTHER; + } } diff --git a/src/dropbox/team/TeamListTeamDevicesError.cpp b/src/dropbox/team/TeamListTeamDevicesError.cpp index 069e1cb..d1fb899 100644 --- a/src/dropbox/team/TeamListTeamDevicesError.cpp +++ b/src/dropbox/team/TeamListTeamDevicesError.cpp @@ -36,9 +36,11 @@ void ListTeamDevicesError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("reset") == 0){ m_tag = ListTeamDevicesError_RESET; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = ListTeamDevicesError_OTHER; + } } diff --git a/src/dropbox/team/TeamMemberAddResult.cpp b/src/dropbox/team/TeamMemberAddResult.cpp index a0482df..1cbeb3a 100644 --- a/src/dropbox/team/TeamMemberAddResult.cpp +++ b/src/dropbox/team/TeamMemberAddResult.cpp @@ -81,30 +81,39 @@ void MemberAddResult::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("success") == 0){ m_tag = MemberAddResult_SUCCESS; + m_success.fromJson(js); } - if(s.compare("team_license_limit") == 0){ + else if(s.compare("team_license_limit") == 0){ m_tag = MemberAddResult_TEAM_LICENSE_LIMIT; + m_team_license_limit = js["team_license_limit"].toString(); } - if(s.compare("free_team_member_limit_reached") == 0){ + else if(s.compare("free_team_member_limit_reached") == 0){ m_tag = MemberAddResult_FREE_TEAM_MEMBER_LIMIT_REACHED; + m_free_team_member_limit_reached = js["free_team_member_limit_reached"].toString(); } - if(s.compare("user_already_on_team") == 0){ + else if(s.compare("user_already_on_team") == 0){ m_tag = MemberAddResult_USER_ALREADY_ON_TEAM; + m_user_already_on_team = js["user_already_on_team"].toString(); } - if(s.compare("user_on_another_team") == 0){ + else if(s.compare("user_on_another_team") == 0){ m_tag = MemberAddResult_USER_ON_ANOTHER_TEAM; + m_user_on_another_team = js["user_on_another_team"].toString(); } - if(s.compare("user_already_paired") == 0){ + else if(s.compare("user_already_paired") == 0){ m_tag = MemberAddResult_USER_ALREADY_PAIRED; + m_user_already_paired = js["user_already_paired"].toString(); } - if(s.compare("user_migration_failed") == 0){ + else if(s.compare("user_migration_failed") == 0){ m_tag = MemberAddResult_USER_MIGRATION_FAILED; + m_user_migration_failed = js["user_migration_failed"].toString(); } - if(s.compare("duplicate_external_member_id") == 0){ + else if(s.compare("duplicate_external_member_id") == 0){ m_tag = MemberAddResult_DUPLICATE_EXTERNAL_MEMBER_ID; + m_duplicate_external_member_id = js["duplicate_external_member_id"].toString(); } - if(s.compare("user_creation_failed") == 0){ + else if(s.compare("user_creation_failed") == 0){ m_tag = MemberAddResult_USER_CREATION_FAILED; + m_user_creation_failed = js["user_creation_failed"].toString(); } } diff --git a/src/dropbox/team/TeamMemberSelectorError.cpp b/src/dropbox/team/TeamMemberSelectorError.cpp index f1943d2..1c3ebc8 100644 --- a/src/dropbox/team/TeamMemberSelectorError.cpp +++ b/src/dropbox/team/TeamMemberSelectorError.cpp @@ -36,9 +36,11 @@ void MemberSelectorError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MemberSelectorError_USER_NOT_IN_TEAM; + } } diff --git a/src/dropbox/team/TeamMembersAddJobStatus.cpp b/src/dropbox/team/TeamMembersAddJobStatus.cpp index eff707b..dcd0def 100644 --- a/src/dropbox/team/TeamMembersAddJobStatus.cpp +++ b/src/dropbox/team/TeamMembersAddJobStatus.cpp @@ -43,12 +43,15 @@ void MembersAddJobStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("in_progress") == 0){ m_tag = PollResultBase_IN_PROGRESS; + } if(s.compare("complete") == 0){ m_tag = MembersAddJobStatus_COMPLETE; + jsonarray2struct_list(js["complete"].toArray(), m_complete); } - if(s.compare("failed") == 0){ + else if(s.compare("failed") == 0){ m_tag = MembersAddJobStatus_FAILED; + m_failed = js["failed"].toString(); } } diff --git a/src/dropbox/team/TeamMembersAddLaunch.cpp b/src/dropbox/team/TeamMembersAddLaunch.cpp index 1a2240e..b67248a 100644 --- a/src/dropbox/team/TeamMembersAddLaunch.cpp +++ b/src/dropbox/team/TeamMembersAddLaunch.cpp @@ -39,9 +39,11 @@ void MembersAddLaunch::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("async_job_id") == 0){ m_tag = LaunchResultBase_ASYNC_JOB_ID; + m_async_job_id = js["async_job_id"].toString(); } if(s.compare("complete") == 0){ m_tag = MembersAddLaunch_COMPLETE; + jsonarray2struct_list(js["complete"].toArray(), m_complete); } } diff --git a/src/dropbox/team/TeamMembersDeactivateError.cpp b/src/dropbox/team/TeamMembersDeactivateError.cpp index f4207a7..6f39d4c 100644 --- a/src/dropbox/team/TeamMembersDeactivateError.cpp +++ b/src/dropbox/team/TeamMembersDeactivateError.cpp @@ -40,12 +40,15 @@ void MembersDeactivateError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MembersDeactivateError_USER_NOT_IN_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersDeactivateError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersGetInfoError.cpp b/src/dropbox/team/TeamMembersGetInfoError.cpp index b492a47..8483139 100644 --- a/src/dropbox/team/TeamMembersGetInfoError.cpp +++ b/src/dropbox/team/TeamMembersGetInfoError.cpp @@ -32,6 +32,7 @@ void MembersGetInfoError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("other") == 0){ m_tag = MembersGetInfoError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersGetInfoItem.cpp b/src/dropbox/team/TeamMembersGetInfoItem.cpp index a696b67..3f35164 100644 --- a/src/dropbox/team/TeamMembersGetInfoItem.cpp +++ b/src/dropbox/team/TeamMembersGetInfoItem.cpp @@ -39,9 +39,11 @@ void MembersGetInfoItem::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("id_not_found") == 0){ m_tag = MembersGetInfoItem_ID_NOT_FOUND; + m_id_not_found = js["id_not_found"].toString(); } - if(s.compare("member_info") == 0){ + else if(s.compare("member_info") == 0){ m_tag = MembersGetInfoItem_MEMBER_INFO; + m_member_info.fromJson(js); } } diff --git a/src/dropbox/team/TeamMembersListContinueError.cpp b/src/dropbox/team/TeamMembersListContinueError.cpp index b491dff..8ed7730 100644 --- a/src/dropbox/team/TeamMembersListContinueError.cpp +++ b/src/dropbox/team/TeamMembersListContinueError.cpp @@ -36,9 +36,11 @@ void MembersListContinueError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("invalid_cursor") == 0){ m_tag = MembersListContinueError_INVALID_CURSOR; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersListContinueError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersListError.cpp b/src/dropbox/team/TeamMembersListError.cpp index f10c70e..f8e1843 100644 --- a/src/dropbox/team/TeamMembersListError.cpp +++ b/src/dropbox/team/TeamMembersListError.cpp @@ -32,6 +32,7 @@ void MembersListError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("other") == 0){ m_tag = MembersListError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersRecoverError.cpp b/src/dropbox/team/TeamMembersRecoverError.cpp index 52df638..321ac8a 100644 --- a/src/dropbox/team/TeamMembersRecoverError.cpp +++ b/src/dropbox/team/TeamMembersRecoverError.cpp @@ -44,15 +44,19 @@ void MembersRecoverError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_unrecoverable") == 0){ m_tag = MembersRecoverError_USER_UNRECOVERABLE; + } - if(s.compare("user_not_in_team") == 0){ + else if(s.compare("user_not_in_team") == 0){ m_tag = MembersRecoverError_USER_NOT_IN_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersRecoverError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersRemoveError.cpp b/src/dropbox/team/TeamMembersRemoveError.cpp index 0c420a1..aa2c368 100644 --- a/src/dropbox/team/TeamMembersRemoveError.cpp +++ b/src/dropbox/team/TeamMembersRemoveError.cpp @@ -88,48 +88,63 @@ void MembersRemoveError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MembersDeactivateError_USER_NOT_IN_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersDeactivateError_OTHER; + } if(s.compare("remove_last_admin") == 0){ m_tag = MembersRemoveError_REMOVE_LAST_ADMIN; + } - if(s.compare("removed_and_transfer_dest_should_differ") == 0){ + else if(s.compare("removed_and_transfer_dest_should_differ") == 0){ m_tag = MembersRemoveError_REMOVED_AND_TRANSFER_DEST_SHOULD_DIFFER; + } - if(s.compare("removed_and_transfer_admin_should_differ") == 0){ + else if(s.compare("removed_and_transfer_admin_should_differ") == 0){ m_tag = MembersRemoveError_REMOVED_AND_TRANSFER_ADMIN_SHOULD_DIFFER; + } - if(s.compare("transfer_dest_user_not_found") == 0){ + else if(s.compare("transfer_dest_user_not_found") == 0){ m_tag = MembersRemoveError_TRANSFER_DEST_USER_NOT_FOUND; + } - if(s.compare("transfer_dest_user_not_in_team") == 0){ + else if(s.compare("transfer_dest_user_not_in_team") == 0){ m_tag = MembersRemoveError_TRANSFER_DEST_USER_NOT_IN_TEAM; + } - if(s.compare("transfer_admin_user_not_found") == 0){ + else if(s.compare("transfer_admin_user_not_found") == 0){ m_tag = MembersRemoveError_TRANSFER_ADMIN_USER_NOT_FOUND; + } - if(s.compare("transfer_admin_user_not_in_team") == 0){ + else if(s.compare("transfer_admin_user_not_in_team") == 0){ m_tag = MembersRemoveError_TRANSFER_ADMIN_USER_NOT_IN_TEAM; + } - if(s.compare("unspecified_transfer_admin_id") == 0){ + else if(s.compare("unspecified_transfer_admin_id") == 0){ m_tag = MembersRemoveError_UNSPECIFIED_TRANSFER_ADMIN_ID; + } - if(s.compare("transfer_admin_is_not_admin") == 0){ + else if(s.compare("transfer_admin_is_not_admin") == 0){ m_tag = MembersRemoveError_TRANSFER_ADMIN_IS_NOT_ADMIN; + } - if(s.compare("cannot_keep_account_and_transfer") == 0){ + else if(s.compare("cannot_keep_account_and_transfer") == 0){ m_tag = MembersRemoveError_CANNOT_KEEP_ACCOUNT_AND_TRANSFER; + } - if(s.compare("cannot_keep_account_and_delete_data") == 0){ + else if(s.compare("cannot_keep_account_and_delete_data") == 0){ m_tag = MembersRemoveError_CANNOT_KEEP_ACCOUNT_AND_DELETE_DATA; + } - if(s.compare("email_address_too_long_to_be_disabled") == 0){ + else if(s.compare("email_address_too_long_to_be_disabled") == 0){ m_tag = MembersRemoveError_EMAIL_ADDRESS_TOO_LONG_TO_BE_DISABLED; + } } diff --git a/src/dropbox/team/TeamMembersSendWelcomeError.cpp b/src/dropbox/team/TeamMembersSendWelcomeError.cpp index ba3f307..6ef7a9e 100644 --- a/src/dropbox/team/TeamMembersSendWelcomeError.cpp +++ b/src/dropbox/team/TeamMembersSendWelcomeError.cpp @@ -40,12 +40,15 @@ void MembersSendWelcomeError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MemberSelectorError_USER_NOT_IN_TEAM; + } if(s.compare("other") == 0){ m_tag = MembersSendWelcomeError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersSetPermissionsError.cpp b/src/dropbox/team/TeamMembersSetPermissionsError.cpp index 36e1067..5ac5069 100644 --- a/src/dropbox/team/TeamMembersSetPermissionsError.cpp +++ b/src/dropbox/team/TeamMembersSetPermissionsError.cpp @@ -52,21 +52,27 @@ void MembersSetPermissionsError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("last_admin") == 0){ m_tag = MembersSetPermissionsError_LAST_ADMIN; + } - if(s.compare("user_not_in_team") == 0){ + else if(s.compare("user_not_in_team") == 0){ m_tag = MembersSetPermissionsError_USER_NOT_IN_TEAM; + } - if(s.compare("cannot_set_permissions") == 0){ + else if(s.compare("cannot_set_permissions") == 0){ m_tag = MembersSetPermissionsError_CANNOT_SET_PERMISSIONS; + } - if(s.compare("team_license_limit") == 0){ + else if(s.compare("team_license_limit") == 0){ m_tag = MembersSetPermissionsError_TEAM_LICENSE_LIMIT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersSetPermissionsError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersSetProfileError.cpp b/src/dropbox/team/TeamMembersSetProfileError.cpp index c5a3ac8..b5e2bbb 100644 --- a/src/dropbox/team/TeamMembersSetProfileError.cpp +++ b/src/dropbox/team/TeamMembersSetProfileError.cpp @@ -64,30 +64,39 @@ void MembersSetProfileError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MemberSelectorError_USER_NOT_IN_TEAM; + } if(s.compare("external_id_and_new_external_id_unsafe") == 0){ m_tag = MembersSetProfileError_EXTERNAL_ID_AND_NEW_EXTERNAL_ID_UNSAFE; + } - if(s.compare("no_new_data_specified") == 0){ + else if(s.compare("no_new_data_specified") == 0){ m_tag = MembersSetProfileError_NO_NEW_DATA_SPECIFIED; + } - if(s.compare("email_reserved_for_other_user") == 0){ + else if(s.compare("email_reserved_for_other_user") == 0){ m_tag = MembersSetProfileError_EMAIL_RESERVED_FOR_OTHER_USER; + } - if(s.compare("external_id_used_by_other_user") == 0){ + else if(s.compare("external_id_used_by_other_user") == 0){ m_tag = MembersSetProfileError_EXTERNAL_ID_USED_BY_OTHER_USER; + } - if(s.compare("set_profile_disallowed") == 0){ + else if(s.compare("set_profile_disallowed") == 0){ m_tag = MembersSetProfileError_SET_PROFILE_DISALLOWED; + } - if(s.compare("param_cannot_be_empty") == 0){ + else if(s.compare("param_cannot_be_empty") == 0){ m_tag = MembersSetProfileError_PARAM_CANNOT_BE_EMPTY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersSetProfileError_OTHER; + } } diff --git a/src/dropbox/team/TeamMembersSuspendError.cpp b/src/dropbox/team/TeamMembersSuspendError.cpp index d27751b..44cccf4 100644 --- a/src/dropbox/team/TeamMembersSuspendError.cpp +++ b/src/dropbox/team/TeamMembersSuspendError.cpp @@ -52,21 +52,27 @@ void MembersSuspendError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MembersDeactivateError_USER_NOT_IN_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersDeactivateError_OTHER; + } if(s.compare("suspend_inactive_user") == 0){ m_tag = MembersSuspendError_SUSPEND_INACTIVE_USER; + } - if(s.compare("suspend_last_admin") == 0){ + else if(s.compare("suspend_last_admin") == 0){ m_tag = MembersSuspendError_SUSPEND_LAST_ADMIN; + } - if(s.compare("team_license_limit") == 0){ + else if(s.compare("team_license_limit") == 0){ m_tag = MembersSuspendError_TEAM_LICENSE_LIMIT; + } } diff --git a/src/dropbox/team/TeamMembersUnsuspendError.cpp b/src/dropbox/team/TeamMembersUnsuspendError.cpp index f6af689..e17d6ef 100644 --- a/src/dropbox/team/TeamMembersUnsuspendError.cpp +++ b/src/dropbox/team/TeamMembersUnsuspendError.cpp @@ -48,18 +48,23 @@ void MembersUnsuspendError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } if(s.compare("user_not_in_team") == 0){ m_tag = MembersDeactivateError_USER_NOT_IN_TEAM; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MembersDeactivateError_OTHER; + } if(s.compare("unsuspend_non_suspended_member") == 0){ m_tag = MembersUnsuspendError_UNSUSPEND_NON_SUSPENDED_MEMBER; + } - if(s.compare("team_license_limit") == 0){ + else if(s.compare("team_license_limit") == 0){ m_tag = MembersUnsuspendError_TEAM_LICENSE_LIMIT; + } } diff --git a/src/dropbox/team/TeamMobileClientPlatform.cpp b/src/dropbox/team/TeamMobileClientPlatform.cpp index e951ed6..cf25e4b 100644 --- a/src/dropbox/team/TeamMobileClientPlatform.cpp +++ b/src/dropbox/team/TeamMobileClientPlatform.cpp @@ -52,21 +52,27 @@ void MobileClientPlatform::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("iphone") == 0){ m_tag = MobileClientPlatform_IPHONE; + } - if(s.compare("ipad") == 0){ + else if(s.compare("ipad") == 0){ m_tag = MobileClientPlatform_IPAD; + } - if(s.compare("android") == 0){ + else if(s.compare("android") == 0){ m_tag = MobileClientPlatform_ANDROID; + } - if(s.compare("windows_phone") == 0){ + else if(s.compare("windows_phone") == 0){ m_tag = MobileClientPlatform_WINDOWS_PHONE; + } - if(s.compare("blackberry") == 0){ + else if(s.compare("blackberry") == 0){ m_tag = MobileClientPlatform_BLACKBERRY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = MobileClientPlatform_OTHER; + } } diff --git a/src/dropbox/team/TeamRevokeDeviceSessionArg.cpp b/src/dropbox/team/TeamRevokeDeviceSessionArg.cpp index 907810b..9a0a0c1 100644 --- a/src/dropbox/team/TeamRevokeDeviceSessionArg.cpp +++ b/src/dropbox/team/TeamRevokeDeviceSessionArg.cpp @@ -43,12 +43,15 @@ void RevokeDeviceSessionArg::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("web_session") == 0){ m_tag = RevokeDeviceSessionArg_WEB_SESSION; + m_web_session.fromJson(js); } - if(s.compare("desktop_client") == 0){ + else if(s.compare("desktop_client") == 0){ m_tag = RevokeDeviceSessionArg_DESKTOP_CLIENT; + m_desktop_client.fromJson(js); } - if(s.compare("mobile_client") == 0){ + else if(s.compare("mobile_client") == 0){ m_tag = RevokeDeviceSessionArg_MOBILE_CLIENT; + m_mobile_client.fromJson(js); } } diff --git a/src/dropbox/team/TeamRevokeDeviceSessionBatchError.cpp b/src/dropbox/team/TeamRevokeDeviceSessionBatchError.cpp index 8fc3a47..2869558 100644 --- a/src/dropbox/team/TeamRevokeDeviceSessionBatchError.cpp +++ b/src/dropbox/team/TeamRevokeDeviceSessionBatchError.cpp @@ -32,6 +32,7 @@ void RevokeDeviceSessionBatchError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("other") == 0){ m_tag = RevokeDeviceSessionBatchError_OTHER; + } } diff --git a/src/dropbox/team/TeamRevokeDeviceSessionError.cpp b/src/dropbox/team/TeamRevokeDeviceSessionError.cpp index cfeef2d..b2f4332 100644 --- a/src/dropbox/team/TeamRevokeDeviceSessionError.cpp +++ b/src/dropbox/team/TeamRevokeDeviceSessionError.cpp @@ -40,12 +40,15 @@ void RevokeDeviceSessionError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("device_session_not_found") == 0){ m_tag = RevokeDeviceSessionError_DEVICE_SESSION_NOT_FOUND; + } - if(s.compare("member_not_found") == 0){ + else if(s.compare("member_not_found") == 0){ m_tag = RevokeDeviceSessionError_MEMBER_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RevokeDeviceSessionError_OTHER; + } } diff --git a/src/dropbox/team/TeamRevokeLinkedAppBatchError.cpp b/src/dropbox/team/TeamRevokeLinkedAppBatchError.cpp index 956877c..6780973 100644 --- a/src/dropbox/team/TeamRevokeLinkedAppBatchError.cpp +++ b/src/dropbox/team/TeamRevokeLinkedAppBatchError.cpp @@ -32,6 +32,7 @@ void RevokeLinkedAppBatchError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("other") == 0){ m_tag = RevokeLinkedAppBatchError_OTHER; + } } diff --git a/src/dropbox/team/TeamRevokeLinkedAppError.cpp b/src/dropbox/team/TeamRevokeLinkedAppError.cpp index 395fe20..d159b1b 100644 --- a/src/dropbox/team/TeamRevokeLinkedAppError.cpp +++ b/src/dropbox/team/TeamRevokeLinkedAppError.cpp @@ -40,12 +40,15 @@ void RevokeLinkedAppError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("app_not_found") == 0){ m_tag = RevokeLinkedAppError_APP_NOT_FOUND; + } - if(s.compare("member_not_found") == 0){ + else if(s.compare("member_not_found") == 0){ m_tag = RevokeLinkedAppError_MEMBER_NOT_FOUND; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = RevokeLinkedAppError_OTHER; + } } diff --git a/src/dropbox/team/TeamTeamMemberStatus.cpp b/src/dropbox/team/TeamTeamMemberStatus.cpp index e9418b4..209b115 100644 --- a/src/dropbox/team/TeamTeamMemberStatus.cpp +++ b/src/dropbox/team/TeamTeamMemberStatus.cpp @@ -45,15 +45,19 @@ void TeamMemberStatus::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("active") == 0){ m_tag = TeamMemberStatus_ACTIVE; + } - if(s.compare("invited") == 0){ + else if(s.compare("invited") == 0){ m_tag = TeamMemberStatus_INVITED; + } - if(s.compare("suspended") == 0){ + else if(s.compare("suspended") == 0){ m_tag = TeamMemberStatus_SUSPENDED; + } - if(s.compare("removed") == 0){ + else if(s.compare("removed") == 0){ m_tag = TeamMemberStatus_REMOVED; + m_removed.fromJson(js); } } diff --git a/src/dropbox/team/TeamTeamMembershipType.cpp b/src/dropbox/team/TeamTeamMembershipType.cpp index 4084de5..52a7047 100644 --- a/src/dropbox/team/TeamTeamMembershipType.cpp +++ b/src/dropbox/team/TeamTeamMembershipType.cpp @@ -36,9 +36,11 @@ void TeamMembershipType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("full") == 0){ m_tag = TeamMembershipType_FULL; + } - if(s.compare("limited") == 0){ + else if(s.compare("limited") == 0){ m_tag = TeamMembershipType_LIMITED; + } } diff --git a/src/dropbox/team/TeamUserSelectorArg.cpp b/src/dropbox/team/TeamUserSelectorArg.cpp index 7b85633..e6ba846 100644 --- a/src/dropbox/team/TeamUserSelectorArg.cpp +++ b/src/dropbox/team/TeamUserSelectorArg.cpp @@ -46,12 +46,15 @@ void UserSelectorArg::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("team_member_id") == 0){ m_tag = UserSelectorArg_TEAM_MEMBER_ID; + m_team_member_id = js["team_member_id"].toString(); } - if(s.compare("external_id") == 0){ + else if(s.compare("external_id") == 0){ m_tag = UserSelectorArg_EXTERNAL_ID; + m_external_id = js["external_id"].toString(); } - if(s.compare("email") == 0){ + else if(s.compare("email") == 0){ m_tag = UserSelectorArg_EMAIL; + m_email = js["email"].toString(); } } diff --git a/src/dropbox/team/TeamUserSelectorError.cpp b/src/dropbox/team/TeamUserSelectorError.cpp index 1dbdf59..df2e409 100644 --- a/src/dropbox/team/TeamUserSelectorError.cpp +++ b/src/dropbox/team/TeamUserSelectorError.cpp @@ -32,6 +32,7 @@ void UserSelectorError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("user_not_found") == 0){ m_tag = UserSelectorError_USER_NOT_FOUND; + } } diff --git a/src/dropbox/team/TeamUsersSelectorArg.cpp b/src/dropbox/team/TeamUsersSelectorArg.cpp index 3a4098d..9e0d6cb 100644 --- a/src/dropbox/team/TeamUsersSelectorArg.cpp +++ b/src/dropbox/team/TeamUsersSelectorArg.cpp @@ -43,12 +43,15 @@ void UsersSelectorArg::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("team_member_ids") == 0){ m_tag = UsersSelectorArg_TEAM_MEMBER_IDS; + jsonarray2ingrl_list(js["team_member_ids"].toArray(), m_team_member_ids); } - if(s.compare("external_ids") == 0){ + else if(s.compare("external_ids") == 0){ m_tag = UsersSelectorArg_EXTERNAL_IDS; + jsonarray2ingrl_list(js["external_ids"].toArray(), m_external_ids); } - if(s.compare("emails") == 0){ + else if(s.compare("emails") == 0){ m_tag = UsersSelectorArg_EMAILS; + jsonarray2ingrl_list(js["emails"].toArray(), m_emails); } } diff --git a/src/dropbox/team_common/TeamCommonGroupManagementType.cpp b/src/dropbox/team_common/TeamCommonGroupManagementType.cpp index a4d2bc3..ef8d188 100644 --- a/src/dropbox/team_common/TeamCommonGroupManagementType.cpp +++ b/src/dropbox/team_common/TeamCommonGroupManagementType.cpp @@ -40,12 +40,15 @@ void GroupManagementType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("company_managed") == 0){ m_tag = GroupManagementType_COMPANY_MANAGED; + } - if(s.compare("user_managed") == 0){ + else if(s.compare("user_managed") == 0){ m_tag = GroupManagementType_USER_MANAGED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupManagementType_OTHER; + } } diff --git a/src/dropbox/team_common/TeamCommonGroupType.cpp b/src/dropbox/team_common/TeamCommonGroupType.cpp index 89fb382..a47d6bf 100644 --- a/src/dropbox/team_common/TeamCommonGroupType.cpp +++ b/src/dropbox/team_common/TeamCommonGroupType.cpp @@ -40,12 +40,15 @@ void GroupType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("team") == 0){ m_tag = GroupType_TEAM; + } - if(s.compare("user_managed") == 0){ + else if(s.compare("user_managed") == 0){ m_tag = GroupType_USER_MANAGED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GroupType_OTHER; + } } diff --git a/src/dropbox/team_policies/TeamPoliciesEmmState.cpp b/src/dropbox/team_policies/TeamPoliciesEmmState.cpp index c164bfc..cb330fe 100755 --- a/src/dropbox/team_policies/TeamPoliciesEmmState.cpp +++ b/src/dropbox/team_policies/TeamPoliciesEmmState.cpp @@ -44,15 +44,19 @@ void EmmState::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("disabled") == 0){ m_tag = EmmState_DISABLED; + } - if(s.compare("optional") == 0){ + else if(s.compare("optional") == 0){ m_tag = EmmState_OPTIONAL; + } - if(s.compare("required") == 0){ + else if(s.compare("required") == 0){ m_tag = EmmState_REQUIRED; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = EmmState_OTHER; + } } diff --git a/src/dropbox/team_policies/TeamPoliciesSharedFolderJoinPolicy.cpp b/src/dropbox/team_policies/TeamPoliciesSharedFolderJoinPolicy.cpp index be77a1a..667259f 100755 --- a/src/dropbox/team_policies/TeamPoliciesSharedFolderJoinPolicy.cpp +++ b/src/dropbox/team_policies/TeamPoliciesSharedFolderJoinPolicy.cpp @@ -40,12 +40,15 @@ void SharedFolderJoinPolicy::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("from_team_only") == 0){ m_tag = SharedFolderJoinPolicy_FROM_TEAM_ONLY; + } - if(s.compare("from_anyone") == 0){ + else if(s.compare("from_anyone") == 0){ m_tag = SharedFolderJoinPolicy_FROM_ANYONE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedFolderJoinPolicy_OTHER; + } } diff --git a/src/dropbox/team_policies/TeamPoliciesSharedFolderMemberPolicy.cpp b/src/dropbox/team_policies/TeamPoliciesSharedFolderMemberPolicy.cpp index 6dab96e..bc700f9 100755 --- a/src/dropbox/team_policies/TeamPoliciesSharedFolderMemberPolicy.cpp +++ b/src/dropbox/team_policies/TeamPoliciesSharedFolderMemberPolicy.cpp @@ -40,12 +40,15 @@ void SharedFolderMemberPolicy::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("team") == 0){ m_tag = SharedFolderMemberPolicy_TEAM; + } - if(s.compare("anyone") == 0){ + else if(s.compare("anyone") == 0){ m_tag = SharedFolderMemberPolicy_ANYONE; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedFolderMemberPolicy_OTHER; + } } diff --git a/src/dropbox/team_policies/TeamPoliciesSharedLinkCreatePolicy.cpp b/src/dropbox/team_policies/TeamPoliciesSharedLinkCreatePolicy.cpp index 52b9ea9..b0ff2c1 100755 --- a/src/dropbox/team_policies/TeamPoliciesSharedLinkCreatePolicy.cpp +++ b/src/dropbox/team_policies/TeamPoliciesSharedLinkCreatePolicy.cpp @@ -44,15 +44,19 @@ void SharedLinkCreatePolicy::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("default_public") == 0){ m_tag = SharedLinkCreatePolicy_DEFAULT_PUBLIC; + } - if(s.compare("default_team_only") == 0){ + else if(s.compare("default_team_only") == 0){ m_tag = SharedLinkCreatePolicy_DEFAULT_TEAM_ONLY; + } - if(s.compare("team_only") == 0){ + else if(s.compare("team_only") == 0){ m_tag = SharedLinkCreatePolicy_TEAM_ONLY; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SharedLinkCreatePolicy_OTHER; + } } diff --git a/src/dropbox/users/UsersAccountType.cpp b/src/dropbox/users/UsersAccountType.cpp index 19c706c..fe7afb9 100644 --- a/src/dropbox/users/UsersAccountType.cpp +++ b/src/dropbox/users/UsersAccountType.cpp @@ -40,12 +40,15 @@ void AccountType::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("basic") == 0){ m_tag = AccountType_BASIC; + } - if(s.compare("pro") == 0){ + else if(s.compare("pro") == 0){ m_tag = AccountType_PRO; + } - if(s.compare("business") == 0){ + else if(s.compare("business") == 0){ m_tag = AccountType_BUSINESS; + } } diff --git a/src/dropbox/users/UsersGetAccountBatchError.cpp b/src/dropbox/users/UsersGetAccountBatchError.cpp index f9e7e2c..721c8f7 100644 --- a/src/dropbox/users/UsersGetAccountBatchError.cpp +++ b/src/dropbox/users/UsersGetAccountBatchError.cpp @@ -38,9 +38,11 @@ void GetAccountBatchError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("no_account") == 0){ m_tag = GetAccountBatchError_NO_ACCOUNT; + m_no_account = js["no_account"].toString(); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetAccountBatchError_OTHER; + } } diff --git a/src/dropbox/users/UsersGetAccountError.cpp b/src/dropbox/users/UsersGetAccountError.cpp index 92487b7..06b463c 100644 --- a/src/dropbox/users/UsersGetAccountError.cpp +++ b/src/dropbox/users/UsersGetAccountError.cpp @@ -36,9 +36,11 @@ void GetAccountError::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("no_account") == 0){ m_tag = GetAccountError_NO_ACCOUNT; + } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = GetAccountError_OTHER; + } } diff --git a/src/dropbox/users/UsersSpaceAllocation.cpp b/src/dropbox/users/UsersSpaceAllocation.cpp index 5519e65..8bc852f 100644 --- a/src/dropbox/users/UsersSpaceAllocation.cpp +++ b/src/dropbox/users/UsersSpaceAllocation.cpp @@ -42,12 +42,15 @@ void SpaceAllocation::fromJson(const QJsonObject& js){ QString s = js[".tag"].toString(); if(s.compare("individual") == 0){ m_tag = SpaceAllocation_INDIVIDUAL; + m_individual.fromJson(js); } - if(s.compare("team") == 0){ + else if(s.compare("team") == 0){ m_tag = SpaceAllocation_TEAM; + m_team.fromJson(js); } - if(s.compare("other") == 0){ + else if(s.compare("other") == 0){ m_tag = SpaceAllocation_OTHER; + } }