Import 2017-06-07 23:51:09: master c6d6ec14

Author Committer Branch Timestamp Parent
naucoin naucoin master 2015-07-07 13:53:15 master b51b8c79
Affected Issues 0003956: Repeated saves of MRBs cause corruption
Changeset

BUG: implement a Slicer specific Qt file suffix

In the MRML storage node it is dealing correctly with tricky
file names like brain.1.nii.gz to return the proper suffix. In
Qt we were relying on completeSuffix but that was returning
everything after the first dot in the file name and would fail
on that example case. This change leverages the storage nodes
to gather a list of valid file suffixes and compares them against
the file name endings and returns a matching one. Special case
included if .* is a valid Slicer suffix, that goes back to
Qt's completeSuffix call.
Note: tried calling fileWriterExtensions and ran into a crash
as it was trying to add new storage nodes to the scene.
Use the new suffix in the save data dialog and node writer.
Added testing, more file name cases can be added easily.

Issue 0003956

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24380 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Base/QTCore/Testing/Cxx/qSlicerCoreIOManagerTest1.cxx Diff File
mod - Base/QTCore/qSlicerCoreIOManager.cxx Diff File
mod - Base/QTCore/qSlicerCoreIOManager.h Diff File
mod - Base/QTGUI/qSlicerNodeWriter.cxx Diff File
mod - Base/QTGUI/qSlicerSaveDataDialog.cxx Diff File