Remove Q_ASSERT's from QNetworkReply autotest
authorJason McDonald <jason.mcdonald@nokia.com>
Mon, 9 May 2011 01:50:23 +0000 (11:50 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 00:46:46 +0000 (10:46 +1000)
Rather than aborting in debug builds and ignoring the failure in release
builds, report a fatal error in all builds.

Change-Id: I1fb8e692c65cf23cf5d2453173db742260ddca48
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 136f39bbb63706819eb18d000f305edbe1cc6a81)

tests/auto/qnetworkreply/tst_qnetworkreply.cpp

index d1dc62b..1ecd5d5 100644 (file)
@@ -622,9 +622,14 @@ public:
     }
 
     QIODevice *prepare(const QNetworkCacheMetaData &)
-    { Q_ASSERT(0 && "Should not have tried to add to the cache"); return 0; }
+    {
+        qFatal("%s: Should not have tried to add to the cache", Q_FUNC_INFO);
+        return 0;
+    }
     void insert(QIODevice *)
-    { Q_ASSERT(0 && "Should not have tried to add to the cache"); }
+    {
+        qFatal("%s: Should not have tried to add to the cache", Q_FUNC_INFO);
+    }
 
     void clear() { cache.clear(); }
 };