Skip to content

Commit

Permalink
Changed mapping of uint8 and int8 to unsigned int and int.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanFabian committed Aug 18, 2021
1 parent d9e04ab commit cdf0c3f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/message_conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@ QVariant msgToMap( const TranslatedMessage::ConstPtr &storage, const Message &ms
case MessageTypes::Bool:
return QVariant::fromValue( msg.as<ValueMessage<bool>>().getValue());
case MessageTypes::UInt8:
return QVariant::fromValue( msg.as<ValueMessage<uint8_t>>().getValue());
return QVariant::fromValue<unsigned int>( msg.as<ValueMessage<uint8_t>>().getValue());
case MessageTypes::UInt16:
return QVariant::fromValue( msg.as<ValueMessage<uint16_t>>().getValue());
return QVariant::fromValue<unsigned int>( msg.as<ValueMessage<uint16_t>>().getValue());
case MessageTypes::UInt32:
return QVariant::fromValue( msg.as<ValueMessage<uint32_t>>().getValue());
case MessageTypes::UInt64:
return QVariant::fromValue( msg.as<ValueMessage<uint64_t>>().getValue());
case MessageTypes::Int8:
return QVariant::fromValue( msg.as<ValueMessage<int8_t>>().getValue());
return QVariant::fromValue<int>( msg.as<ValueMessage<int8_t>>().getValue());
case MessageTypes::Int16:
return QVariant::fromValue( msg.as<ValueMessage<int16_t>>().getValue());
return QVariant::fromValue<int>( msg.as<ValueMessage<int16_t>>().getValue());
case MessageTypes::Int32:
return QVariant::fromValue( msg.as<ValueMessage<int32_t>>().getValue());
case MessageTypes::Int64:
Expand Down Expand Up @@ -253,17 +253,17 @@ QVariant msgToMap( const Message &msg )
case MessageTypes::Bool:
return QVariant::fromValue( msg.as<ValueMessage<bool>>().getValue());
case MessageTypes::UInt8:
return QVariant::fromValue( msg.as<ValueMessage<uint8_t>>().getValue());
return QVariant::fromValue<unsigned int>( msg.as<ValueMessage<uint8_t>>().getValue());
case MessageTypes::UInt16:
return QVariant::fromValue( msg.as<ValueMessage<uint16_t>>().getValue());
return QVariant::fromValue<unsigned int>( msg.as<ValueMessage<uint16_t>>().getValue());
case MessageTypes::UInt32:
return QVariant::fromValue( msg.as<ValueMessage<uint32_t>>().getValue());
case MessageTypes::UInt64:
return QVariant::fromValue( msg.as<ValueMessage<uint64_t>>().getValue());
case MessageTypes::Int8:
return QVariant::fromValue( msg.as<ValueMessage<int8_t>>().getValue());
return QVariant::fromValue<int>( msg.as<ValueMessage<int8_t>>().getValue());
case MessageTypes::Int16:
return QVariant::fromValue( msg.as<ValueMessage<int16_t>>().getValue());
return QVariant::fromValue<int>( msg.as<ValueMessage<int16_t>>().getValue());
case MessageTypes::Int32:
return QVariant::fromValue( msg.as<ValueMessage<int32_t>>().getValue());
case MessageTypes::Int64:
Expand Down

0 comments on commit cdf0c3f

Please sign in to comment.