Commit 5837e7604909cb5587356ebd8cb847e0d005c55f

Authored by David Gräff
1 parent c75163cf

Fix utf8 problem with a character

Signed-off-by: David Gräff <david.graeff@web.de>
Showing 1 changed file with 3 additions and 3 deletions
openhantek/src/helper.cpp
... ... @@ -83,7 +83,7 @@ namespace Helper {
83 83 // Voltage string representation
84 84 int logarithm = floor(log10(fabs(value)));
85 85 if(value < 1e-3)
86   - return QApplication::tr("%L1 \265V").arg(value / 1e-6, 0, format, (precision <= 0) ? precision : qBound(0, precision - 7 - logarithm, precision));
  86 + return QApplication::tr("%L1 µV").arg(value / 1e-6, 0, format, (precision <= 0) ? precision : qBound(0, precision - 7 - logarithm, precision));
87 87 else if(value < 1.0)
88 88 return QApplication::tr("%L1 mV").arg(value / 1e-3, 0, format, (precision <= 0) ? precision : (precision - 4 - logarithm));
89 89 else
... ... @@ -100,7 +100,7 @@ namespace Helper {
100 100 else if(value < 1e-6)
101 101 return QApplication::tr("%L1 ns").arg(value / 1e-9, 0, format, (precision <= 0) ? precision : (precision - 10 - (int) floor(log10(fabs(value)))));
102 102 else if(value < 1e-3)
103   - return QApplication::tr("%L1 \265s").arg(value / 1e-6, 0, format, (precision <= 0) ? precision : (precision - 7 - (int) floor(log10(fabs(value)))));
  103 + return QApplication::tr("%L1 µs").arg(value / 1e-6, 0, format, (precision <= 0) ? precision : (precision - 7 - (int) floor(log10(fabs(value)))));
104 104 else if(value < 1.0)
105 105 return QApplication::tr("%L1 ms").arg(value / 1e-3, 0, format, (precision <= 0) ? precision : (precision - 4 - (int) floor(log10(fabs(value)))));
106 106 else if(value < 60)
... ... @@ -209,7 +209,7 @@ namespace Helper {
209 209 return value * 1e-12;
210 210 else if(unitString.startsWith('n'))
211 211 return value * 1e-9;
212   - else if(unitString.startsWith('\265'))
  212 + else if(unitString.startsWith('µ'))
213 213 return value * 1e-6;
214 214 else if(unitString.startsWith("min"))
215 215 return value * 60;
... ...