As the creator of Bug 354534 noted, the output of
kscreen-console json
contains quotations seem to be generated from the qDebug()-Output stream.
The proposed fix is to convert the QString to a C++ std::string and use std::cout for output.
sebas |
As the creator of Bug 354534 noted, the output of
kscreen-console json
contains quotations seem to be generated from the qDebug()-Output stream.
The proposed fix is to convert the QString to a C++ std::string and use std::cout for output.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Thanks for your patch! Instead of converting to an std::string you could try
qDebug().noquote() << doc.toJson();
[1] https://doc.qt.io/qt-5/qdebug.html#noquote
However, given Thiago complained about the usage of qDebug() in the first place, either should work. But then, I'm not a fan of converting to an std::string … Let's have sebas (as KScreen maintainer) decide. :)
Idea in general looks good, I'd rather use QTextStream than std though. Can you change that?
b/console/console.cpp | ||
---|---|---|
185 ↗ | (On Diff #8646) | In other tools, we use QTextStream for the output, I'd prefer that. See libkscreen/src/doctor.cpp for an example. |
I'm sorry that this got lost. The patch is fine, can you please push it?
Please add "BUG:354534" to the commit message, on a separate line, this will close the corresponding bugreport.
He can't push it, he doesn't have a devel account.
Sebas can you please push it? Name is Jan-Matthias Braun and e-mail according to identity is jan_braun@gmx.net
Or i can commit if if you tell me the repo, which you did not fill out when creating the request.