diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-11-10 15:09:18 +0100 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-11-10 19:21:43 +0100 |
commit | 893990a67e28e57523fcb979060206c958d25059 (patch) | |
tree | a6cdc326885504ae92264826bb25eca8d54b6b45 /src/corelib/io | |
parent | d7e14165802d9f69bb2fb8feb2abc0926cdbf860 (diff) |
QFileSystemEngine: Don't use _?W suffixes
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 <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfilesystemengine_win.cpp | 14 |
1 files 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 <aclapi.h> #include <userenv.h> -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<PSID>(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; // ### } |