From 893990a67e28e57523fcb979060206c958d25059 Mon Sep 17 00:00:00 2001 From: Ievgenii Meshcheriakov Date: Wed, 10 Nov 2021 15:09:18 +0100 Subject: [PATCH] QFileSystemEngine: Don't use _?W suffixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't use W suffix for most of the Windows API so there is no need to use it here either. Also remove W suffix for variables of type TRUSTEE (was TRUSTEE_W). Change-Id: Id67b772ba5d3232f882841a1e581fb1bbd392fa4 Reviewed-by: MÃ¥rten Nordheim --- src/corelib/io/qfilesystemengine_win.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index 85a13288ac..c7b423d63e 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -145,8 +145,8 @@ typedef struct _REPARSE_DATA_BUFFER { #if QT_CONFIG(fslibs) #include #include -static TRUSTEE_W currentUserTrusteeW; -static TRUSTEE_W worldTrusteeW; +static TRUSTEE currentUserTrustee; +static TRUSTEE worldTrustee; static PSID currentUserSID = nullptr; static PSID worldSID = nullptr; static HANDLE currentUserImpersonatedToken = nullptr; @@ -198,7 +198,7 @@ GlobalSid::GlobalSid() currentUserSID = reinterpret_cast(malloc(sidLen)); Q_CHECK_PTR(currentUserSID); if (::CopySid(sidLen, currentUserSID, tokenSid)) - BuildTrusteeWithSid(¤tUserTrusteeW, currentUserSID); + BuildTrusteeWithSid(¤tUserTrustee, currentUserSID); } free(tokenBuffer); } @@ -218,7 +218,7 @@ GlobalSid::GlobalSid() SID_IDENTIFIER_AUTHORITY worldAuth = { SECURITY_WORLD_SID_AUTHORITY }; if (AllocateAndInitializeSid(&worldAuth, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &worldSID)) { - BuildTrusteeWithSid(&worldTrusteeW, worldSID); + BuildTrusteeWithSid(&worldTrustee, worldSID); } } } @@ -810,7 +810,7 @@ bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSyst &pOwner, &pGroup, &pDacl, nullptr, &pSD); if (res == ERROR_SUCCESS) { ACCESS_MASK access_mask; - TRUSTEE_W trustee; + TRUSTEE trustee; if (what & QFileSystemMetaData::UserPermissions) { // user // Using AccessCheck because GetEffectiveRightsFromAcl doesn't account // for elevation @@ -854,7 +854,7 @@ bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSyst } } else { // fallback to GetEffectiveRightsFromAcl data.knownFlagsMask |= QFileSystemMetaData::UserPermissions; - if (GetEffectiveRightsFromAclW(pDacl, ¤tUserTrusteeW, &access_mask) + if (GetEffectiveRightsFromAcl(pDacl, ¤tUserTrustee, &access_mask) != ERROR_SUCCESS) { access_mask = ACCESS_MASK(-1); } @@ -892,7 +892,7 @@ bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSyst } if (what & QFileSystemMetaData::OtherPermissions) { // other (world) data.knownFlagsMask |= QFileSystemMetaData::OtherPermissions; - if (GetEffectiveRightsFromAcl(pDacl, &worldTrusteeW, &access_mask) + if (GetEffectiveRightsFromAcl(pDacl, &worldTrustee, &access_mask) != ERROR_SUCCESS) { access_mask = (ACCESS_MASK)-1; // ### }