Development/Tutorials/Collaboration/Attica/Tips

From KDE TechBase
Revision as of 20:44, 29 June 2011 by Neverendingo (talk | contribs) (Text replace - "<code>" to "<syntaxhighlight lang="text">")

Debugging Attica

In attica/lib/atticabasejob.cpp you can enable the debug output of all XML the server sends. Simply add the qDebug() to the dataFinished function:

<syntaxhighlight lang="text"> void BaseJob::dataFinished() {

   if (d->m_reply->error() == QNetworkReply::NoError) {
       QByteArray data = d->m_reply->readAll();
       qDebug() << data; // ADD THIS LINE
       ...

and you will see lots of XML in your debug shell.