View Issue Details

IDProjectCategoryView StatusLast Update
0001733Slicer4Core: QtTestingpublic2012-05-23 11:42
Reporterfinetjul Assigned ToBenjaminLong  
PriorityhighSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Product VersionSlicer 4.0.1 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001733: Generalize qSlicerIOManager::openDialog code
Description

File qSlicerIOManager.h, methods openAddDataDialog(), openAddVolumeDialog()...
Requiring the developer to set an objectName for the dialog defeats the purpose of having a generic method for file dialogs.
Qt testing requires all Qt widgets to have an object name.
That object name doesn't necessarilly has to be manually as long as it is unique.
Here it can be automatically generated based on the type of dialog.
I suggest to generate the name using the fileType, action and ioProperties.

Additional Information

Implementation idea:

in qSlicerIOManager::openDialog():
objectName = action == Read ? "Add" : "Save";
objectName += toString(fileType); // use the meta data information to get a string from enum
objectName += ioProperties["multipleFiles"].toBool() ? "s" : "";
objectName += "Dialog";

TagsNo tags attached.

Activities

BenjaminLong

BenjaminLong

2012-05-23 11:40

reporter   ~0004582

Fixed in r20139

Issue History

Date Modified Username Field Change
2012-02-17 11:19 finetjul New Issue
2012-02-17 11:19 finetjul Status new => assigned
2012-02-17 11:19 finetjul Assigned To => BenjaminLong
2012-05-21 14:49 finetjul Priority normal => high
2012-05-21 14:49 finetjul Category Base Code => QtTesting
2012-05-23 11:40 BenjaminLong Note Added: 0004582
2012-05-23 11:40 BenjaminLong Status assigned => resolved
2012-05-23 11:40 BenjaminLong Fixed in Version => Slicer 4.1.0
2012-05-23 11:40 BenjaminLong Resolution open => fixed
2012-05-23 11:42 finetjul Status resolved => closed
2012-05-23 11:42 finetjul Fixed in Version Slicer 4.1.0 => Slicer 4.2.0 - Sept 1st 2012