![]() |
LeechCraft 0.6.70-19424-g027e980fd1
Modular cross-platform feature rich live environment.
|
Model-related classes for Qt's Model-View-Controller. More...
Classes | |
| class | LC::Util::DndActionsMixin< Model > |
| Qt4-style getters and setters for DnD actions. More... | |
| class | LC::Util::FlatToFoldersProxyModel |
| class | LC::Util::LazyRootMixin< Model > |
| Defers populating the model until a view first asks for rows. More... | |
| class | LC::Util::MergeModel |
| class | LC::Util::ModelItem |
| Provides a proxying API on top of an QAbstractItemModel. More... | |
| class | LC::Util::ModelItemBase< T > |
| Base class for model items for tree-like models. More... | |
| class | LC::Util::ModelIterator |
| Provides an iterator-based API to a Qt model. More... | |
| class | LC::Util::RoleNamesMixin< Model > |
| Provides Qt4-style role names setters. More... | |
Functions | |
| void | LC::Util::InstallModelSanitizer (QAbstractItemModel &model) |
| Attaches a QAbstractItemModelTester to model for the rest of its lifetime. | |
Model-related classes for Qt's Model-View-Controller.
| UTIL_MODELS_API void LC::Util::InstallModelSanitizer | ( | QAbstractItemModel & | model | ) |
Attaches a QAbstractItemModelTester to model for the rest of its lifetime.
The tester checks the model against the QAbstractItemModel invariants at the time of the call and after each of the model's change signals from then on.
Since the model tester checks invariants on installation time as well and calls the model's methods, call this only after the class has set up everything its QAbstractItemModel overrides read, (typically as the last statement of its constructor). If a class is designed to be derived from and its model-related methods overridden, never do this from a base class constructor.
| [in] | model | The model to check. |
Definition at line 20 of file modelsanitizer.cpp.
References InstallModelSanitizer(), and LC::Warning.
Referenced by LC::Util::FlatItemsModelTypedBase< T >::FlatItemsModelTypedBase(), LC::Util::FlatToFoldersProxyModel::FlatToFoldersProxyModel(), LC::Util::MergeModel::MergeModel(), LC::Util::SelectionProxyModel< Id >::SelectionProxyModel(), and InstallModelSanitizer().