From cb95fff1c7dfcfc00b1bf93d18b80485aca9dd0c Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Mon, 16 Feb 2015 11:44:46 +0200 Subject: Fixed license headers Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen --- src/corelib/io/qfilesystemwatcher_fsevents.mm | 2 +- src/corelib/io/qsettings_winrt.cpp | 2 +- src/corelib/io/qstandardpaths_ios.mm | 2 +- src/corelib/io/qurl_mac.mm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/io') 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/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. -- cgit v1.2.3 From f7716a0899fba150fcde29f5b03da06dd284c6be Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Mon, 16 Feb 2015 15:00:53 +0000 Subject: Haiku: Extend QStorageInfo implementation Provide the file system type, the name (label) of the volume and the path to the associated device (if available). Change-Id: I7dd0d314d3f757e0f57c8f82beaf8ee21da86167 Reviewed-by: Augustin Cavalier Reviewed-by: Thiago Macieira --- src/corelib/io/qstorageinfo_unix.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/corelib/io') 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 # include # include +# include # include #else # include @@ -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(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 -- cgit v1.2.3