diff options
author | Ivan Komissarov <ABBAPOH@gmail.com> | 2014-05-06 16:10:10 +0000 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-08-13 16:09:58 +0200 |
commit | 6c3c1a4cb8e4973b8e603edfbe608e1b1587f3f2 (patch) | |
tree | a5f94686383fc913b88ef23d949621face11d816 /src/corelib/io/io.pri | |
parent | 091653e9e71c3e2ada54efe6b3592340e16eaa85 (diff) |
Add the QStorageInfo class
Allows to retrieve information about mounted volumes such as label,
total/available size, filesystem type and so on.
Possible use cases are:
- allows to do checks about filesystem before performing actual
operation (such as available/maximum volume size)
- allows to retrive information about volume that can be shown in file
dialogs
- allows to retrieve volume for specific path and check if two or more
paths belong to the same volume or not
[ChangeLog][QtCore] Added QStorageInfo class to retrive information
about mounted volumes and drives
Change-Id: Ibf9c2e6b53ef39c5605894a4422acdbbca4030c4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/corelib/io/io.pri')
-rw-r--r-- | src/corelib/io/io.pri | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index 5e389b19a6..bdc362ef22 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -32,6 +32,8 @@ HEADERS += \ io/qresource_iterator_p.h \ io/qsavefile.h \ io/qstandardpaths.h \ + io/qstorageinfo.h \ + io/qstorageinfo_p.h \ io/qurl.h \ io/qurl_p.h \ io/qurlquery.h \ @@ -70,6 +72,7 @@ SOURCES += \ io/qlockfile.cpp \ io/qnoncontiguousbytedevice.cpp \ io/qprocess.cpp \ + io/qstorageinfo.cpp \ io/qtextstream.cpp \ io/qtemporarydir.cpp \ io/qtemporaryfile.cpp \ @@ -108,7 +111,8 @@ win32 { SOURCES += io/qstandardpaths_win.cpp wince* { - SOURCES += io/qprocess_wince.cpp + SOURCES += io/qprocess_wince.cpp \ + io/qstorageinfo_stub.cpp } else { HEADERS += \ io/qwinoverlappedionotifier_p.h \ @@ -116,12 +120,15 @@ win32 { SOURCES += \ io/qprocess_win.cpp \ io/qwinoverlappedionotifier.cpp \ - io/qwindowspipereader.cpp + io/qwindowspipereader.cpp \ + io/qstorageinfo_win.cpp + LIBS += -lmpr } } else { SOURCES += \ io/qstandardpaths_winrt.cpp \ - io/qsettings_winrt.cpp + io/qsettings_winrt.cpp \ + io/qstorageinfo_stub.cpp } } else:unix|integrity { SOURCES += \ @@ -141,18 +148,28 @@ win32 { HEADERS += io/qfilesystemwatcher_fsevents_p.h } macx { - SOURCES += io/qstandardpaths_mac.cpp + SOURCES += \ + io/qstorageinfo_mac.cpp \ + io/qstandardpaths_mac.cpp + LIBS += -framework DiskArbitration -framework IOKit } else:ios { OBJECTIVE_SOURCES += io/qstandardpaths_ios.mm + SOURCES += io/qstorageinfo_mac.cpp } else { SOURCES += io/qstandardpaths_unix.cpp } } else:blackberry { - SOURCES += io/qstandardpaths_blackberry.cpp + SOURCES += \ + io/qstandardpaths_blackberry.cpp \ + io/qstorageinfo_unix.cpp } else:android:!android-no-sdk { - SOURCES += io/qstandardpaths_android.cpp + SOURCES += \ + io/qstandardpaths_android.cpp \ + io/qstorageinfo_unix.cpp } else { - SOURCES += io/qstandardpaths_unix.cpp + SOURCES += \ + io/qstandardpaths_unix.cpp \ + io/qstorageinfo_unix.cpp } linux|if(qnx:contains(QT_CONFIG, inotify)) { |