forked from quickshell/quickshell
		
	service/upower: correctly deserialize UPowerDeviceState::Discharging
???
This commit is contained in:
		
							parent
							
								
									f3b7171b25
								
							
						
					
					
						commit
						eaf854935b
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -114,9 +114,7 @@ DBusResult<qreal> DBusDataTransform<PowerPercentage>::fromWire(qreal wire) {
 | 
			
		|||
 | 
			
		||||
DBusResult<UPowerDeviceState::Enum>
 | 
			
		||||
DBusDataTransform<UPowerDeviceState::Enum>::fromWire(quint32 wire) {
 | 
			
		||||
	if (wire != UPowerDeviceType::Battery && wire >= UPowerDeviceState::Unknown
 | 
			
		||||
	    && wire <= UPowerDeviceState::PendingDischarge)
 | 
			
		||||
	{
 | 
			
		||||
	if (wire >= UPowerDeviceState::Unknown && wire <= UPowerDeviceState::PendingDischarge) {
 | 
			
		||||
		return DBusResult(static_cast<UPowerDeviceState::Enum>(wire));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue