Difference between revisions of "Development/Tutorials/Collaboration/Attica/Tips"

Jump to: navigation, search
(use other template)
(Debugging Attica)
Line 9: Line 9:
 
     if (d->m_reply->error() == QNetworkReply::NoError) {
 
     if (d->m_reply->error() == QNetworkReply::NoError) {
 
         QByteArray data = d->m_reply->readAll();
 
         QByteArray data = d->m_reply->readAll();
         '''qDebug() << data;'''
+
         qDebug() << data; // ADD THIS LINE
 
         ...
 
         ...
 
</code>
 
</code>
  
 
and you will see lots of XML in your debug shell.
 
and you will see lots of XML in your debug shell.

Revision as of 19:04, 24 November 2009

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:

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.


Content is available under Creative Commons License SA 4.0 unless otherwise noted.