tst_qnetworkreply: use preprocessor rather than "commenting out"
Debug code is suppressed; let someone investigating a problem be able to turn it on/off by just editing one byte instead of each line of the block of debug code. Change-Id: Iba06df4042d9126d3a5d0873e524ef504c19d3de Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This commit is contained in:
parent
fc3346cba8
commit
02af515528
@ -8247,17 +8247,18 @@ public slots:
|
|||||||
// We had received some data but it is corrupt!
|
// We had received some data but it is corrupt!
|
||||||
qDebug() << "CORRUPT" << m_receivedData.count();
|
qDebug() << "CORRUPT" << m_receivedData.count();
|
||||||
|
|
||||||
// Use this to track down the pattern of the corruption and conclude the source
|
#if 0 // Use this to track down the pattern of the corruption and conclude the source
|
||||||
// QFile a("/tmp/corrupt");
|
QFile a("/tmp/corrupt");
|
||||||
// a.open(QIODevice::WriteOnly);
|
a.open(QIODevice::WriteOnly);
|
||||||
// a.write(m_receivedData);
|
a.write(m_receivedData);
|
||||||
// a.close();
|
a.close();
|
||||||
|
|
||||||
// QFile b("/tmp/correct");
|
QFile b("/tmp/correct");
|
||||||
// b.open(QIODevice::WriteOnly);
|
b.open(QIODevice::WriteOnly);
|
||||||
// b.write(m_expectedData);
|
b.write(m_expectedData);
|
||||||
// b.close();
|
b.close();
|
||||||
//exit(1);
|
//exit(1);
|
||||||
|
#endif
|
||||||
emit corruptFileUploadReceived();
|
emit corruptFileUploadReceived();
|
||||||
} else {
|
} else {
|
||||||
emit correctFileUploadReceived();
|
emit correctFileUploadReceived();
|
||||||
|
Loading…
Reference in New Issue
Block a user