mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-18 13:04:28 -04:00
chore: Fix pretty printing for QString (#101)
Previously QString was printed symbol by symbol. E.g.: reader.readWholeFileAfter(3, 1) Which is: { "i", "n", "e", " ", "2", " ", "L", "i", "n", "e", " ", "3" }
This commit is contained in:
committed by
GitHub
parent
0d3493e7f6
commit
ab97f39ea4
@ -27,6 +27,16 @@ using namespace QodeAssist::Context;
|
|||||||
using namespace QodeAssist::LLMCore;
|
using namespace QodeAssist::LLMCore;
|
||||||
using namespace QodeAssist::Settings;
|
using namespace QodeAssist::Settings;
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
// gtest can't pick pretty printer when comparing QString
|
||||||
|
inline void PrintTo(const QString &value, ::std::ostream *out)
|
||||||
|
{
|
||||||
|
*out << '"' << value.toStdString() << '"';
|
||||||
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const QString &value)
|
std::ostream &operator<<(std::ostream &out, const QString &value)
|
||||||
{
|
{
|
||||||
out << '"' << value.toStdString() << '"';
|
out << '"' << value.toStdString() << '"';
|
||||||
|
Reference in New Issue
Block a user