On quinta-feira, 1 de agosto de 2013 07:58:41, André Somers wrote: > I do see a use for using a schema right there. Settings can be accessed > from all over the application. If you use QSettings or QConfiguration or > whatever for that directly, it means that everywhere you need a specific > value, you also need the default value. So, you end up duplicating the > default value to several places in the code, and it won't be easy to > find all occurrences either. If you define the defaults centrally, at > least you don't have that issue.
In the past, KDE has solved this problem by processing the schema file (it's never been called that in KDE, but turns out it's what the .kcfg files are) and generating a nice C++ class to access, with the defaults built-in and the proper C++ type safety. This solves the runtime overhead problem by transferring it to a compile-time issue. Since I'm not convinced, the objection still stands for now: schemas must not be a mandatory runtime requirement. They can be present only if optional and opt-in. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development