View Issue Details

IDProjectCategoryView StatusLast Update
0002565Slicer4Core: Base Codepublic2014-05-13 20:37
Reporterjcfr Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0002565: Add a function name ctk::composePath - (in file ctkUtils.h)
Description

See issue https://github.com/commontk/CTK/issues/240

Instead of:

// -------------
QDir slicerHomeDir(q->slicerHome());
slicerHomeDir.cdUp();
QFileInfo contentsFileInfo(slicerHome, "Contents");
QFileInfo extensionDirFileInfo( QDir(contentsFileInfo.filePath()), Slicer_BUNDLE_EXTENSIONS_DIRNAME);
return extensionDirFileInfo.absoluteFilePath();
// -------------

Would be nice to have a convenient function that would allow us to do:

// -------------
ctk::composePath(QStringList() << slicerHomeDir.absolutePath() << "Contents" << Slicer_BUNDLE_EXTENSIONS_DIRNAME)
// -------------

In its implementation "composePath" would use QDir, QFileInfo, etc ...

From Julien:

I also like:
ctk::composePath(slicerHomeDir.absolutePath(), "Contents", Slicer_BUNDLE_EXTENSIONS_DIRNAME)
Please reuse the same function name as python (or kwwidgets) if any.

Tagshelp-wanted

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2012-09-25 06:42 jcfr New Issue
2012-09-25 06:42 jcfr Status new => assigned
2012-09-25 06:42 jcfr Assigned To => pieper
2012-09-25 06:43 jcfr Assigned To pieper => sankhesh
2012-09-25 06:43 jcfr Target Version => Slicer 4.3.0
2012-09-25 06:43 jcfr Description Updated
2013-06-03 05:15 jcfr Assigned To sankhesh => jcfr
2013-07-30 05:05 jcfr Summary Add a function name ctk::composePath => Add a function name ctk::composePath - (in file ctkUtils.h)
2013-07-30 05:05 jcfr Assigned To jcfr => chrysteljuan
2013-07-30 12:48 jcfr Target Version Slicer 4.3.0 => Slicer 4.4.0
2014-05-13 20:35 jcfr Assigned To chrysteljuan => jcfr
2014-05-13 20:36 jcfr Status assigned => acknowledged
2014-05-13 20:37 jcfr Target Version Slicer 4.4.0 =>
2014-05-13 20:37 jcfr Tag Attached: help-wanted