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.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to