fix: log QQmlComponent creation error strings

This commit is contained in:
outfoxxed committed 2024-02-03 01:02:04 -08:00
1 parent b62f2f3a50
commit 56502b79f6
2 files changed
+6

No files matched your search

+1
View File
@@ -33,6 +33,7 @@ void RootWrapper::reloadGraph(bool hard) {
SCAVENGE_PARENT = nullptr;
if (obj == nullptr) {
qWarning() << component.errorString().toStdString().c_str();
qWarning() << "failed to create root component";
return;
}
+5
View File
@@ -36,5 +36,10 @@ QObject* createComponentScavengeable(
if (instance->parent() != nullptr) instance->setParent(&parent);
component.setInitialProperties(instance, initialProperties);
component.completeCreate();
if (instance == nullptr) {
qWarning() << component.errorString().toStdString().c_str();
}
return instance;
}