diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2016-08-24 14:59:30 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2016-08-25 08:00:01 +0000 |
commit | 02af5155283d55f0eac0bec2dc1fd7c074861993 (patch) | |
tree | 2fb7e8bf24e2c85cb31532fe9a20bb875dc476db /tests/auto/network/access | |
parent | fc3346cba84a3aa1e4140292cd1a8bad59d835da (diff) |
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>
Diffstat (limited to 'tests/auto/network/access')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 1b53608902..61927862f7 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -8247,17 +8247,18 @@ public slots: // We had received some data but it is corrupt! qDebug() << "CORRUPT" << m_receivedData.count(); - // Use this to track down the pattern of the corruption and conclude the source -// QFile a("/tmp/corrupt"); -// a.open(QIODevice::WriteOnly); -// a.write(m_receivedData); -// a.close(); - -// QFile b("/tmp/correct"); -// b.open(QIODevice::WriteOnly); -// b.write(m_expectedData); -// b.close(); +#if 0 // Use this to track down the pattern of the corruption and conclude the source + QFile a("/tmp/corrupt"); + a.open(QIODevice::WriteOnly); + a.write(m_receivedData); + a.close(); + + QFile b("/tmp/correct"); + b.open(QIODevice::WriteOnly); + b.write(m_expectedData); + b.close(); //exit(1); +#endif emit corruptFileUploadReceived(); } else { emit correctFileUploadReceived(); |