View Issue Details

IDProjectCategoryView StatusLast Update
0002240Slicer4Core: Usabilitypublic2013-02-12 09:40
Reporterfedorov Assigned Tosankhesh  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002240: Mounted volumes are not accessible in "Add file" dialog on Mac
Description

When I insert a USB key into my mac, I am not able to see it in the Add Data dialog, and need to copy the data to a local folder in order to load it into Slicer.

TagsNo tags attached.

Activities

pieper

pieper

2012-08-20 09:50

administrator   ~0005589

Is this a Qt limitation?

2012-08-20 09:58

 

fedorov

fedorov

2012-08-20 09:59

developer   ~0005600

I don't know. But when I use Paraview, I am able to access /Volumes -- see screenshot attached (looks like it is using a custom file dialog).

pieper

pieper

2012-09-20 12:04

administrator   ~0006150

It looks like this has been an issue on mac for a long time:

https://bugreports.qt-project.org/browse/QTBUG-6875

As a workaround, creating a symbolic link in your home directory pointing to /Volumes lets you browse from there. The same thing works for /tmp, which is helpful when you want to save scratch data that will be cleared on a reboot.

cd
ln -s /Volumes .
ln -s /tmp .

pieper

pieper

2012-11-07 11:05

administrator   ~0007104

Julien: do you know of any Qt level workarounds?

finetjul

finetjul

2012-12-04 10:41

administrator   ~0007403

As suggested in QTBUG-6875, we might need to show hidden files.

sankhesh

sankhesh

2012-12-17 07:10

developer   ~0007510

Tried this:

diff --git a/Base/QTGUI/qSlicerDataDialog.cxx b/Base/QTGUI/qSlicerDataDialog.cxx
index b8f2967..a87297e 100644
--- a/Base/QTGUI/qSlicerDataDialog.cxx
+++ b/Base/QTGUI/qSlicerDataDialog.cxx
@@ -125,7 +125,8 @@ void qSlicerDataDialogPrivate::addDirectory(const QDir& directory)
{
bool recursive = true;
QDir::Filters filters =

  • QDir::AllDirs | QDir::Files | QDir::Readable | QDir::NoDotAndDotDot;
  • QDir::AllDirs | QDir::Files | QDir::Readable | QDir::NoDotAndDotDot
  • | QDir::Hidden;
    foreach(QFileInfo entry, directory.entryInfoList(filters))
    {
    if (entry.isFile())

That does not work. However, I noticed that even without the QDir::Hidden flag, one can access the /Volumes directory simply by typing in the address bar at the bottom of the file dialog.

We can use QFileDialog::setSidebarUrls ( http://doc.qt.digia.com/qt/qfiledialog.html#setSidebarUrls ) to add the Volumes url in the sidebar on Mac. Does that seem like an appropriate solution?

I looked at ParaView's pqFileDialog following Andriy's note. From what I discern, it uses a native search and lists the directory as a row provided it meets certain conditions. ( https://github.com/Kitware/ParaView/blob/master/Qt/Core/pqFileDialogFilter.cxx )

pieper

pieper

2012-12-17 07:23

administrator   ~0007511

Yes, the sidebar urls sounds like a better solution than what we have now.

sankhesh

sankhesh

2012-12-17 10:28

developer   ~0007514

Pushed fix to topic: https://github.com/sankhesh/Slicer/tree/2240-mounted-volumes-mac

sankhesh

sankhesh

2012-12-18 06:19

developer   ~0007522

Fixed in version r21519 ( http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21519 )

finetjul

finetjul

2012-12-18 09:48

administrator   ~0007537

Last edited: 2012-12-18 09:49

Concerning (0007510), it couldn't have been working, the dialog to change should have been instead be the one created in qSlicerDataDialogPrivate::addDirectory().
Namely, qSlicerStandardFileDialog::createFileDialog() should have been tweaked to really test the fix.

r21519 is an acceptable solution. However there is code duplication.
Please add the change only in qSlicerStandardFileDialog::createFileDialog()

sankhesh

sankhesh

2012-12-19 09:17

developer   ~0007558

Done. Fixed in r21521 ( http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Base/QTGUI/qSlicerFileDialog.cxx?r1=21521&r2=21520&pathrev=21521 )

Issue History

Date Modified Username Field Change
2012-06-21 07:13 fedorov New Issue
2012-08-20 08:16 nicole Assigned To => pieper
2012-08-20 08:16 nicole Status new => assigned
2012-08-20 08:16 nicole Target Version => Slicer 4.3.0
2012-08-20 09:50 pieper Note Added: 0005589
2012-08-20 09:58 fedorov File Added: Screen shot 2012-08-20 at 13.52.07 .png
2012-08-20 09:59 fedorov Note Added: 0005600
2012-09-20 12:04 pieper Note Added: 0006150
2012-11-07 11:04 pieper Assigned To pieper => finetjul
2012-11-07 11:05 pieper Note Added: 0007104
2012-11-09 04:08 jcfr Assigned To finetjul => jcfr
2012-12-04 10:41 finetjul Note Added: 0007403
2012-12-16 14:53 jcfr Assigned To jcfr => sankhesh
2012-12-16 14:53 jcfr Target Version Slicer 4.3.0 => Slicer 4.2.3
2012-12-17 07:10 sankhesh Note Added: 0007510
2012-12-17 07:23 pieper Note Added: 0007511
2012-12-17 10:28 sankhesh Note Added: 0007514
2012-12-18 06:05 sankhesh Status assigned => confirmed
2012-12-18 06:19 sankhesh Note Added: 0007522
2012-12-18 06:19 sankhesh Status confirmed => resolved
2012-12-18 06:19 sankhesh Fixed in Version => Slicer 4.2.3
2012-12-18 06:19 sankhesh Resolution open => fixed
2012-12-18 09:48 finetjul Status resolved => assigned
2012-12-18 09:48 finetjul Note Added: 0007537
2012-12-18 09:49 finetjul Note Edited: 0007537
2012-12-19 09:17 sankhesh Note Added: 0007558
2012-12-19 09:18 sankhesh Status assigned => resolved
2012-12-21 10:53 fedorov Status resolved => closed
2013-02-12 09:39 jcfr Target Version Slicer 4.2.3 => Slicer 4.3.0
2013-02-12 09:40 jcfr Fixed in Version Slicer 4.2.3 => Slicer 4.3.0