LibreVNA-GUI:CustomWidgets:siunitedit: Fix ambiguous conversion

This commit adds a static_cast to the 'QChar' for the keycode if it
is less than or equal to 255.
This commit is contained in:
Alexander Voronov 2023-03-24 22:01:53 +03:00
parent f0d0f3bde2
commit e12cc850db

View File

@ -70,7 +70,7 @@ bool SIUnitEdit::eventFilter(QObject *, QEvent *event)
key = tolower(key);
}
if(key <= 255) {
if (prefixes.indexOf(key) >= 0) {
if (prefixes.indexOf(static_cast<QChar>(key)) >= 0) {
// a valid prefix key was pressed
parseNewValue(Unit::SIPrefixToFactor(key));
continueEditing();