Make configuration handling on non-windows multi-level (Qt default ini) #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code currently uses two different configuration files, the Qt
native one to store the directory used in QPersistantFileDialog and
DInsightReportWindow, and a INI file named insight.conf for everything
else. The first use is kept unchanged, while the latter is changed
for non-Windows builds. Windows configuration handling is kept
unchanged to stay compatible with the already released version. On
non-Windows platforms the code is changed to look in /usr/share/,
/etc/ and ~/.config/ for insight.ini instead of looking for
insight.conf only in the current working directory.
This bring the program more in line with Linux Filesystem Hierarcy
standard on Unix.
Note, the Qt QSettings documentation state that the native file to
look for is named insight.conf, but at least on Linux the file used by
QPersistantFileDialog and DInsightReportWindow is insightrc. The file
used by DInsightConfig is insight.ini after this change, thus keeping
the two configuration systems in two separeate files.
This change partly addresses issue #9.