Lots of tidying

This commit is contained in:
Nav
2022-12-03 22:16:21 +00:00
parent df36d9d698
commit b3fb3f0955
26 changed files with 743 additions and 550 deletions

View File

@@ -94,9 +94,11 @@ namespace Bloom
}
QWidget* UiLoader::createWidget(const QString& className, QWidget* parent, const QString& name) {
if (this->customWidgetConstructorsByWidgetName.contains(className)) {
const auto widgetContructorIt = this->customWidgetConstructorsByWidgetName.find(className);
if (widgetContructorIt != this->customWidgetConstructorsByWidgetName.end()) {
// This is a custom widget - call the mapped constructor
return this->customWidgetConstructorsByWidgetName.at(className)(parent, name);
return widgetContructorIt->second(parent, name);
}
return QUiLoader::createWidget(className, parent, name);