forked from quickshell/quickshell
		
	fix: log QQmlComponent creation error strings
This commit is contained in:
		
							parent
							
								
									b62f2f3a50
								
							
						
					
					
						commit
						56502b79f6
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -33,6 +33,7 @@ void RootWrapper::reloadGraph(bool hard) {
 | 
				
			||||||
	SCAVENGE_PARENT = nullptr;
 | 
						SCAVENGE_PARENT = nullptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (obj == nullptr) {
 | 
						if (obj == nullptr) {
 | 
				
			||||||
 | 
							qWarning() << component.errorString().toStdString().c_str();
 | 
				
			||||||
		qWarning() << "failed to create root component";
 | 
							qWarning() << "failed to create root component";
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,5 +36,10 @@ QObject* createComponentScavengeable(
 | 
				
			||||||
	if (instance->parent() != nullptr) instance->setParent(&parent);
 | 
						if (instance->parent() != nullptr) instance->setParent(&parent);
 | 
				
			||||||
	component.setInitialProperties(instance, initialProperties);
 | 
						component.setInitialProperties(instance, initialProperties);
 | 
				
			||||||
	component.completeCreate();
 | 
						component.completeCreate();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (instance == nullptr) {
 | 
				
			||||||
 | 
							qWarning() << component.errorString().toStdString().c_str();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return instance;
 | 
						return instance;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue