On sábado, 25 de janeiro de 2014 22:33:36, Samuel Gaist wrote: > On 24 janv. 2014, at 18:05, Thiago Macieira <[email protected]> wrote: > > On sexta-feira, 24 de janeiro de 2014 09:25:35, Samuel Gaist wrote: > >> Extending this list would make the current test (if else if) getting a > >> bit > >> long and not necessarily the "good thing to do (™)" so once the list of > >> extension is decided I would like to know what would be the Qtish way to > >> store it: > >> > >> A static QVector inside the function ? > >> A static QVector outside the function with an intializing function ? > >> Other container/algorithm best suited ? > > > > An indexed string table, generated with generate_string_table.pl which you > > can find in the kdesdk repository. You can see examples of it in > > qsimd.cpp and in qdbuserror.cpp. It's also what moc generates behind the > > scenes. > > > > Marc has some code to be able to generate them with macros but he hasn't > > yet fixed the issues we pointed out. They'll miss 5.3. > > Nice, thank you ! > > Is the macro version already viewable somewhere ?
https://codereview.qt-project.org/66624 > One more thing, what's the best way to provide the original data ? In a > comment above the generated table or a text file ? If it's long, keep it in a separate file. Otherwise, just keep it in a comment next to the generated data like qsimd.cpp and qdbuserror.cpp. In either case, always keep the instructions on how to regenerate next to the generated code. -- 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 [email protected] http://lists.qt-project.org/mailman/listinfo/development
