ProgrammingCube / lcdhost

Automatically exported from code.google.com/p/lcdhost
1 stars 0 forks source link

Setting LH_Qt_QFileInfo gives you absolute paths #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When browsing for a file, the path displayed in a LH_Qt_QFileInfo object is 
shown relative to the current layout, which makes perfect sense.

When setting the value programmatically to a path within the current layout, 
using an absolute path, the path displayed is absolute, which is inconsistent.

When trying to set the file via a relative path it fails.

Hence there is no way to have the LH_Qt_QFileInfo display data consistently 
between user entered data and programmatically assigned data.

Replicate:
1. Creating a LH_Qt_QFileInfo 
2. Programmatically set the LH_Qt_QFileInfo to a valid file using absolute paths
3. Now programmatically change it to a different file within the current layout 
folder using a relative path. The selection will not change.
4. Now change it using the absolute path. This will work, but the file now 
displays the complete, absolute path

Proposed solution:
Make setting the file programmatically funciton in the same way as browsing for 
the file, i.e. display it relative to the layout path.

Original issue reported on code.google.com by a...@bridgesuk.com on 18 Feb 2011 at 5:39

GoogleCodeExporter commented 8 years ago

Original comment by linkdata...@gmail.com on 22 Feb 2011 at 8:20

GoogleCodeExporter commented 8 years ago

Original comment by linkdata...@gmail.com on 25 Feb 2011 at 6:07