Debugger: force qfloat16 to float to print

It'll get a _Float16 cast operator, which will cause ambiguous overloads:

watchhandler.cpp:782:24: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::ostringstream’ {aka ‘std::__cxx11::basic_ostringstream<char>’} and ‘qfloat16’)

Change-Id: Ic44396b31ba04712aab3fffd16ff43d6616878f9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Thiago Macieira
2022-07-06 07:28:55 -07:00
parent 531288a715
commit d4ed6d6129

View File

@@ -786,7 +786,7 @@ static QString formattedValue(const WatchItem *item)
std::ostringstream ss; std::ostringstream ss;
ss << std::hexfloat; ss << std::hexfloat;
switch (item->guessSize()) { switch (item->guessSize()) {
case 2: ss << qfloat16(dd); break; case 2: ss << float(qfloat16(dd)); break;
case 4: ss << float(dd); break; case 4: ss << float(dd); break;
default: ss << dd; break; default: ss << dd; break;
} }