[Development] QSettings refactor updates

Ziller Eike Eike.Ziller at theqtcompany.com
Fri Oct 10 16:25:45 CEST 2014

On Oct 10, 2014, at 3:37 PM, Adam Light <aclight at gmail.com> wrote:

>> On Fri, Oct 10, 2014 at 4:27 AM, Ziller Eike <Eike.Ziller at theqtcompany.com> wrote:
>> On Oct 10, 2014, at 11:48 AM, Morten Johan Sørvig <morten.sorvig at digia.com> wrote:
>> >>
>> >>> Mac people: do we need access to plist files?
>> >>
>> >> Plist is the format for application and other settings on OS X, and there are native tools for nicely editing these. Ini is highly alien on OS X.
>> >> So, I’d answer yes.
>> >
>> > On the other hand, git uses the ini file format for the config files also on OS X.
>> git is a command line tool, and used by a very specific audience.
>> > I see this as two separate use cases:
>> > 1) Cross-platform API for managing application settings.
>> We regularly have people which complain that Qt Creator application settings do not follow platform convention on OS X, because they do not find a qt creator plist in ~/Library/Preferences, or actually there is one that contains some settings coming from Qt (NSNavLastRootDirectory, PMPrintingExpandedState...., some WebKit stuff, and a few more), but not the actual application settings.
> On the flip side, our large Qt application runs on Mac and Windows and we're intentionally using QSettings with INI format on both platforms for consistency. Since the storage of settings is really an implementation detail (users should hopefully never need to edit the settings files themselves), it's easier for us if the settings are stored the same way on all platforms.

Qt Creator intentionally used ini format for “consistency” as well, but:
* Since the paths are different through the platforms (Windows XP vs Windows vs Linux vs OS X), and have to be, there is not much consistency in the end after all, and
* Uninstallation process involves manually removing settings and application data, at least on OS X, and there are even uninstallation tools out there which do it for you, if the application follows the platform convention

So there are IMO very good reasons why someone would want their application to follow platform conventions for application settings. Possibly with a way to opt-in or opt-out.

Eike Ziller, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

More information about the Development mailing list