Bug 220941 - devel/qt5-core: QStorageInfo::mountedVolumes() fails to read mountpoints
Summary: devel/qt5-core: QStorageInfo::mountedVolumes() fails to read mountpoints
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: kde
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-23 10:23 UTC by Yuri Victorovich
Modified: 2017-07-23 10:58 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments
suggested patch to qstorageinfo__unix.cpp (362 bytes, text/x-c++src)
2017-07-23 10:23 UTC, Yuri Victorovich
no flags Details
patch (1.14 KB, patch)
2017-07-23 10:41 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2017-07-23 10:23:05 UTC
Created attachment 184624 [details]
suggested patch to qstorageinfo__unix.cpp

QStorageInfo::mountedVolumes() returns an empty list.

See filelight (https://github.com/KDE/filelight) as a testcase. Particularly, src/localLister.cpp there.

It looked like patching /usr/ports/devel/qt5-core/files/patch-src_corelib_io_qstorageinfo__unix.cpp should have helped, but it doesn't.
It calls getfsstat which returns a non-empty list, but QStorageInfo::mountedVolumes() still returns an empty list.
Comment 1 Yuri Victorovich freebsd_committer 2017-07-23 10:41:02 UTC
Created attachment 184625 [details]
patch

Please disregard my previous message.

The attached patch solves the problem.
Comment 2 Tobias C. Berner freebsd_committer 2017-07-23 10:46:21 UTC
Hi, 

we have already upstreamed that change recently:
https://github.com/qt/qtbase/commit/fa3940cc4b5580070f465d1f64a23a69bc925367

But it seems we forgot to add it to the propper ports tree :D 

mfg Tobias
Comment 3 Yuri Victorovich freebsd_committer 2017-07-23 10:48:42 UTC
Thanks!
Comment 4 commit-hook freebsd_committer 2017-07-23 10:56:40 UTC
A commit references this bug:

Author: tcberner
Date: Sun Jul 23 10:56:03 UTC 2017
New revision: 446462
URL: https://svnweb.freebsd.org/changeset/ports/446462

Log:
  Fix QStorageInfo in devel/qt5-core.

  QStorageInfo did not return any valid data on FreeBSD.

  Add upstreamed patch:
     getmntinfo() was wrongly called with flag 0. This changes it to use MNT_NOWAIT.

  PR:		220941

Changes:
  head/devel/qt5-core/Makefile
  head/devel/qt5-core/files/patch-git_fa3940cc