Replace runtime schema parsing with compile-time code generation
Review Request #111711 - Created July 26, 2013 and submitted
This removes the not exactly cheap XML DOM parsing for the schema creation, and replaces it with generating the structures returned by the parsing code at compile time. From a functional POV this equivalent, but it gets us half way to removing the dependency on QtXml and it paves the way for more sophisticated schema annotations for compile-time query checking in the future. Git Log: No need to compile in the schema XML now. Get rid of the XML DOM parsing code for the db setup. Replaced with compile-time generated code now. Generate schema as classes rather than one single namespace. This way we can have multiple ones, e.g the real one and the one we use for unit testing. Also generate schema description for relation tables. Generate schema description objects at compile time. This will replace the run-time parsing of the schema XML. Mime types and flags are created automatically on demand. So there's no need to pre-fill the database with some well-known ones. Move schema data types into their own file.
db setup is covered by unit tests
The data are not populated anymore. It seems that the entries are inserted automatically when they are first encountered by the server (same applies for flags), so they probably don't have to be populated when the database is being created, but I'm better pointing this out, there was probably a reason why you've done it originally :)
Remove this line