Store settings on ini file

Request a feature that you would like to see in QLC+.
Explain in details why you would need it and which is your usage case.
Post Reply
hellishvictor
Posts: 4
Joined: Wed May 13, 2020 6:31 pm
Real Name:

Hi, I wonder if there exist an option for store the settings on a .ini files instead of the registry, so it become portable and allow the user to launched the program from an usb pendrive.

Cheers.
User avatar
GGGss
Posts: 3052
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

Interesting tought...
If you know your way around working with the registry, you could export the registry tree to your USB stick, and import them back on your shadow client...
ScreenHunter_49 Jan. 03 10.41.png
But I would mess around too much - you easily brake the structure
All electric machines work on smoke... when the smoke escapes... they don't work anymore
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

QSettings class supports .ini files directly see https://doc.qt.io/qt-5/qsettings.html#details

Problem is how to achieve backward compatibility:
- QLC+ has to read both registry and ini files
- we have to tell QLC+ if the changed settings should be stored in ini file or registry
- or we have to tell QLC+ to use ini files only.

For a proof of concept, find all QSettings constructors and add QSettings::IniFormat before the first parameter. That should read/write from/to ini file.
You'll need to add type conversion if they are not present already, since ini files return everything as string. There might be a problem with key names as well.

Jano
Post Reply