From 4cc2f48628a5029ec299d8b6e5a828d140ef6c86 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 19 Jun 2021 14:19:43 +0200 Subject: [PATCH] QF*Engine: port a couple of QFlags->int implicit conversions to toInt() Change-Id: Iafc3527941a0b56a680322e3bc05b4046e560e89 Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_unix.cpp | 4 ++-- src/corelib/io/qfsfileengine_unix.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index e0c41bdb38..c8d7170b64 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -1559,7 +1559,7 @@ bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Per bool success = ::chmod(entry.nativeFilePath().constData(), mode) == 0; if (success && data) { data->entryFlags &= ~QFileSystemMetaData::Permissions; - data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions)); + data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions.toInt())); data->knownFlagsMask |= QFileSystemMetaData::Permissions; } if (!success) @@ -1575,7 +1575,7 @@ bool QFileSystemEngine::setPermissions(int fd, QFile::Permissions permissions, Q bool success = ::fchmod(fd, mode) == 0; if (success && data) { data->entryFlags &= ~QFileSystemMetaData::Permissions; - data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions)); + data->entryFlags |= QFileSystemMetaData::MetaDataFlag(uint(permissions.toInt())); data->knownFlagsMask |= QFileSystemMetaData::Permissions; } if (!success) diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index e85f81f267..a57d924c12 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -383,7 +383,7 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const { QFileSystemMetaData::MetaDataFlags queryFlags = { }; - queryFlags |= QFileSystemMetaData::MetaDataFlags(uint(type)) + queryFlags |= QFileSystemMetaData::MetaDataFlags(uint(type.toInt())) & QFileSystemMetaData::Permissions; if (type & TypesMask) @@ -409,7 +409,7 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const return ret; if (exists && (type & PermsMask)) - ret |= FileFlags(uint(d->metaData.permissions())); + ret |= FileFlags(uint(d->metaData.permissions().toInt())); if (type & TypesMask) { if (d->metaData.isAlias()) {