summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-23 11:24:04 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-23 11:24:07 +0100
commitd34353a065c443aac20376cbd88323480d769183 (patch)
treeda5d86b51c2cf7023356551c4c980849b35bab14 /src/corelib/io
parent4e40b1952695f0b1086ef7b88e8514bd18cf96bf (diff)
parent571908f7fc8f5e4ef9a4dfd90102566f6f0fcad2 (diff)
Merge dev into 5.5
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm2
-rw-r--r--src/corelib/io/qsettings_winrt.cpp2
-rw-r--r--src/corelib/io/qstandardpaths_ios.mm2
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp27
-rw-r--r--src/corelib/io/qurl_mac.mm2
5 files changed, 29 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 1076b8f5b4..8a028c91e1 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
diff --git a/src/corelib/io/qsettings_winrt.cpp b/src/corelib/io/qsettings_winrt.cpp
index bf8b157d00..02c3c7624e 100644
--- a/src/corelib/io/qsettings_winrt.cpp
+++ b/src/corelib/io/qsettings_winrt.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
diff --git a/src/corelib/io/qstandardpaths_ios.mm b/src/corelib/io/qstandardpaths_ios.mm
index 98e939cbda..27d28526c2 100644
--- a/src/corelib/io/qstandardpaths_ios.mm
+++ b/src/corelib/io/qstandardpaths_ios.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index 667301b516..7e23ac897d 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -59,6 +59,7 @@
# include <Path.h>
# include <Volume.h>
# include <VolumeRoster.h>
+# include <fs_info.h>
# include <sys/statvfs.h>
#else
# include <sys/statvfs.h>
@@ -341,9 +342,18 @@ inline bool QStorageIterator::next()
return false;
const BPath path(&directory);
+
+ fs_info fsInfo;
+ memset(&fsInfo, 0, sizeof(fsInfo));
+
+ if (fs_stat_dev(volume.Device(), &fsInfo) != 0)
+ return false;
+
m_rootPath = path.Path();
- m_fileSystemType = QByteArray(); // no public API to access it
- m_device = QByteArray::number(static_cast<qint32>(volume.Device()));
+ m_fileSystemType = QByteArray(fsInfo.fsh_name);
+
+ const QByteArray deviceName(fsInfo.device_name);
+ m_device = (deviceName.isEmpty() ? QByteArray::number(qint32(volume.Device())) : deviceName);
return true;
}
@@ -444,6 +454,19 @@ static inline QString retrieveLabel(const QByteArray &device)
if (fileInfo.isSymLink() && fileInfo.symLinkTarget().toLocal8Bit() == device)
return fileInfo.fileName();
}
+#elif defined Q_OS_HAIKU
+ fs_info fsInfo;
+ memset(&fsInfo, 0, sizeof(fsInfo));
+
+ int32 pos = 0;
+ dev_t dev;
+ while ((dev = next_dev(&pos)) >= 0) {
+ if (fs_stat_dev(dev, &fsInfo) != 0)
+ continue;
+
+ if (qstrcmp(fsInfo.device_name, device.constData()) == 0)
+ return QString::fromLocal8Bit(fsInfo.volume_name);
+ }
#else
Q_UNUSED(device);
#endif
diff --git a/src/corelib/io/qurl_mac.mm b/src/corelib/io/qurl_mac.mm
index f051dfbd32..a1fa7e4fc4 100644
--- a/src/corelib/io/qurl_mac.mm
+++ b/src/corelib/io/qurl_mac.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.