fix: log QQmlComponent creation error strings

This commit is contained in:
outfoxxed 2024-02-03 01:02:04 -08:00
parent b62f2f3a50
commit 56502b79f6
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 6 additions and 0 deletions

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;
}

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;
}