mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 01:23:57 -07:00
fix compiling on arch
This commit is contained in:
parent
ba786a0289
commit
3cf3fa789d
7 changed files with 108 additions and 56 deletions
|
|
@ -101,6 +101,10 @@ QString getSafeDebugString(const ::google::protobuf::Message &message)
|
|||
#endif // GOOGLE_PROTOBUF_VERSION > 3004000
|
||||
|
||||
std::string debug_string;
|
||||
printer.PrintToString(message, &debug_string);
|
||||
return QString::number(size) + " bytes " + QString::fromStdString(debug_string);
|
||||
bool ok = printer.PrintToString(message, &debug_string);
|
||||
if (ok) {
|
||||
return QString::number(size) + " bytes " + QString::fromStdString(debug_string);
|
||||
} else {
|
||||
return "could not convert message to string";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue