forked from quickshell/quickshell
		
	core: don't show " at " in qml warnings if object name is empty
This commit is contained in:
		
							parent
							
								
									ee31e5d226
								
							
						
					
					
						commit
						b898592db7
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -327,13 +327,13 @@ void EngineGeneration::onEngineWarnings(const QList<QQmlError>& warnings) const
 | 
			
		|||
 | 
			
		||||
		QString objectName;
 | 
			
		||||
		auto desc = error.description();
 | 
			
		||||
		if (auto i = desc.indexOf(": "); i != -1) {
 | 
			
		||||
			objectName = desc.first(i);
 | 
			
		||||
		if (auto i = desc.indexOf(": "); i != -1 && desc.startsWith("QML ")) {
 | 
			
		||||
			objectName = desc.first(i) + " at ";
 | 
			
		||||
			desc = desc.sliced(i + 2);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		qCWarning(logScene).noquote().nospace() << objectName << " at " << rel << '[' << error.line()
 | 
			
		||||
		                                        << ':' << error.column() << "]: " << desc;
 | 
			
		||||
		qCWarning(logScene).noquote().nospace()
 | 
			
		||||
		    << objectName << rel << '[' << error.line() << ':' << error.column() << "]: " << desc;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue