summaryrefslogtreecommitdiffhomepage
path: root/options/bundle.cpp
AgeCommit message (Collapse)Author
2018-01-31gui: clean up a bitStanislaw Halik
2017-06-18minor tweaks onlyStanislaw Halik
2017-05-10options: don't create QSettings all the timeStanislaw Halik
Update usages.
2017-05-10options/bundle: skip needless compare-twiceStanislaw Halik
2017-03-28start renaming internal macros as OPENTRACK_* to OTR_*Stanislaw Halik
2017-03-25options/bundle: appease qt creatorStanislaw Halik
2017-03-21options/{bundle,connector,value}: allow setting to default valuesStanislaw Halik
This is complicated by Qt's rejection of template classes. Also move some stuff to slots where makes sense.
2017-02-27options/fix bundle refcount handlingStanislaw Halik
We rolled up our own refcount while using shared_ptr at the same time. Remove all rolled-up logic and rely on shared_ptr's custom deleter to do the cleanups. This greatly simplifies the code here. Unfortunately, _fini ordering makes Qt crash after the app object runs out of scope: gui/main.cpp: QApplication app(argc, argv); Both things considered, use _exit(2) on Unix to avoid running static destructors.
2016-12-08options: get element with call operatorStanislaw Halik
thread_local is expensive.
2016-09-18add missing copyright termsStanislaw Halik
Due to fucking AT&T vs BSD suit copyright defaults to all rights reserved. Fuck Berne Convention as well.
2016-09-16gui/main-window: exit program when config not writableStanislaw Halik
Note, it opens the config in read-write mode to check if it's writable. This might present a race condition when config is saved. However, we're expecting all config saving to be done in the user interface thread. Add a check for it however.
2016-09-09options/bundle: remove rest of logspamStanislaw Halik
2016-09-09options/{bundle,group}: don't create QSettings all the timeStanislaw Halik
2016-09-09add support for migrationsStanislaw Halik
They're run from the UI thread so can even be interactive.
2016-09-09options/bundle: whitespace onlyStanislaw Halik
2016-09-09options/bundle: lessen logspamStanislaw Halik
2016-08-25options: use non-generic comparison for bundle modification checkStanislaw Halik
The generic QVariant comparison works badly for QList<QPointF>. Create a comparator between two QVariants for base_value in value<tp> ctor, using QVariant::value<tp> which returns right results once it's converted to tp. If a value was registered for a name in a bundle, use that comparator as the comparator for that name. In case conflicting value types were registered always use generic comparison for that name. std::type_index needs to be used here since value<t> can be instantiated in different modules (libraries), resulting in different value for the comparator function pointer. Move group::operator== to bundle type to avoid circular include for connector.h. Also use element_type more consistently in value<tp>.
2016-08-23options/bundle: simplify mutex const-droppingStanislaw Halik
2016-08-23options/bundle: don't fire signals in reload() with no unsaved changesStanislaw Halik
2016-08-23options/bundle: emit changed() whenever any part of a bundle changesStanislaw Halik
2016-08-23options/bundle: treat bundles with empty names speciallyStanislaw Halik
They're now not cached in the singleton. Operations like "reload", "save", and connector stuff short-circuit to prevent anything done with them
2016-08-18options: factor out connector out of bundleStanislaw Halik
2016-08-17options: support deferred writes when saving bundlesStanislaw Halik
The mapping window has 13 bundles total in use. Setting them all can take up to a large fraction of a second on some windows filesystems. Do a single config write instead.
2016-08-17move options framework into its own libraryStanislaw Halik
- adjust usages - add support for QList signals and metatype