diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-07-27 14:41:19 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-07-30 21:12:21 +0000 |
commit | cc7fcecd7ad3c2d7dcf9d93ba4d7018b9cd111b3 (patch) | |
tree | fd0f1c597bc6be8d96cf33540033b41e6f15ebb9 /src/corelib/io/qstorageinfo_unix.cpp | |
parent | 62bd4f5852137276e354746737a88c06168c4b8b (diff) |
Add QStorageInfo::blockSize
[ChangeLog][QtCore][QStorageInfo] Added QStorageInfo::blockSize(), which
returns the optimal block size for data transfer to and from the
storage.
Change-Id: Ib306f8f647014b399b87ffff13f4eba6000452d4
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Diffstat (limited to 'src/corelib/io/qstorageinfo_unix.cpp')
-rw-r--r-- | src/corelib/io/qstorageinfo_unix.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index f82d0ff0a1..83c52dbf2c 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -510,6 +510,7 @@ void QStorageInfoPrivate::retrieveVolumeInfo() bytesTotal = statfs_buf.f_blocks * statfs_buf.f_bsize; bytesFree = statfs_buf.f_bfree * statfs_buf.f_bsize; bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_bsize; + blockSize = statfs_buf.f_bsize; #if defined(Q_OS_ANDROID) || defined (Q_OS_BSD4) #if defined(_STATFS_F_FLAGS) readOnly = (statfs_buf.f_flags & ST_RDONLY) != 0; |