To be sure you don't have an issue with charachter encoding and similar related problems that just make the qDebug() string not visible, put a breakpoint on that line and look in to the mem->memory memory in the debugger.
To be sure you don't have an issue with charachter encoding and similar related problems that just make the qDebug() string not visible, put a breakpoint on that line and look in to the mem->memory memory in the debugger.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Thanks for your reply! You got me on the right track. This appears to be a display bug with Qt Creator. There is some sort of buffer in the debug output that causes a delay. The first thing I did was replace qDebug() with fprintf(stderr...), printing one character at a time. Doing this, I noticed that the output to each fprintf() call was truncated, but that subsequent calls to fprintf() completed the previous call's output. This does not happen using qDebug (it must clear the buffer each time).
In any case, the good news is that the webpage does seem to be downloaded correctly, as verified by a) writing the output to a file b) converting to a QString and using a regular expression to look for the terminating </html>. The only problem is, I can't figure out how to display it within Qt Creator (using the Watch menu doesn't work either - all I see is a small image of a musical eighth note. Charming.).
Is this a console application (QCoreApplication) or a gui application (QApplication)?
Are you in release or debug mode?
Do you want the output only for debug purposses or do you want it as an application feature?
qDebug() is only a debug output.
If this is a GUI app you probably should output it to a widget, or if you really want it on the console, you should output it to std output.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
This is a GUI application. I'm in debug mode, and I just wanted to see the output for debugging. I finally found a simple workaround, which is to use split("\n") to break the webpage (one long string) into multiple lines, then use a loop to print each line. Thanks for your help!
Bookmarks