-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Dynamic configuration framework #385
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like Qt's QSettings, I like it. Namespaces are also better than "celengine" and so on. But I wonder if is something similar already implemented as independend project.
Btw I would be also happy to see Parser class integration. |
What do you mean? Parser is an absolutely independent entity, it's only required to parse files. |
I generally agree on the direction, have to take a closer look to comment on the actual implementation. |
By the way, I realize that something like |
Good point |
I meant Array and Value classed from parser.h |
I will. Currently it's just a proof-of-concept so it doesn't contain all required code. Instead of replying I edited your comment, lol |
690ab56
to
2f8f3b0
Compare
The problem:
SolarSystemMaxDistance
used in render.cpp:So not only routines responsible for
celestia.cfg
reading aware of this option but GUI code as well. While the latter can be fixed with some common routines in celestiacore.cpp this will not make out config code more robust.Configuration files are read on application startup only, to reconfigure we should restart it.
Frontends save some different options using their specific methods so Gtk or win-native frontends are unable to read configuration saved by Qt frontend and vice verse.
So the requirements:
This PR is a very early attempt to provide such configuration framework, it provides only basic functions and even not integrated into Celestia codebase.
src/celengine/testprops.cc
provides an example of usage.Let's discuss its pros and cons.