QStorageInfo: change private blockSize member to int
It's what the public API returns. There's little reason to use ulong, despite that being the type that struct statvfs uses (on Windows, that was 32-bit anyway). Saves 8 bytes on the size of the QStorageInfoPrivate class. Change-Id: I8f3ce163ccc5408cac39fffd178db8cfb9e5e4f6 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
80cdd4e5bb
commit
6e21d1d21a
@ -170,7 +170,7 @@ void QStorageInfoPrivate::retrieveVolumeInfo()
|
||||
bytesTotal = statfs_buf.f_blocks * statfs_buf.f_frsize;
|
||||
bytesFree = statfs_buf.f_bfree * statfs_buf.f_frsize;
|
||||
bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_frsize;
|
||||
blockSize = statfs_buf.f_bsize;
|
||||
blockSize = int(statfs_buf.f_bsize);
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
#if defined(_STATFS_F_FLAGS)
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
qint64 bytesTotal = -1;
|
||||
qint64 bytesFree = -1;
|
||||
qint64 bytesAvailable = -1;
|
||||
ulong blockSize = ulong(-1);
|
||||
int blockSize = -1;
|
||||
|
||||
bool readOnly = false;
|
||||
bool ready = false;
|
||||
|
@ -417,7 +417,7 @@ void QStorageInfoPrivate::retrieveVolumeInfo()
|
||||
bytesFree = statfs_buf.f_bfree * statfs_buf.f_frsize;
|
||||
bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_frsize;
|
||||
#endif
|
||||
blockSize = statfs_buf.f_bsize;
|
||||
blockSize = int(statfs_buf.f_bsize);
|
||||
#if defined(Q_OS_ANDROID) || defined(Q_OS_BSD4) || defined(Q_OS_INTEGRITY) || defined(Q_OS_RTEMS)
|
||||
#if defined(_STATFS_F_FLAGS)
|
||||
readOnly = (statfs_buf.f_flags & ST_RDONLY) != 0;
|
||||
|
@ -203,7 +203,7 @@ bool QStorageInfoPrivate::queryStorageProperty()
|
||||
nullptr);
|
||||
CloseHandle(handle);
|
||||
if (result)
|
||||
blockSize = saad.BytesPerPhysicalSector;
|
||||
blockSize = int(saad.BytesPerPhysicalSector);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user