summaryrefslogtreecommitdiffstats
path: root/tests/auto/qxmlquery/NetworkOverrider.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qxmlquery/NetworkOverrider.h')
-rw-r--r--tests/auto/qxmlquery/NetworkOverrider.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/qxmlquery/NetworkOverrider.h b/tests/auto/qxmlquery/NetworkOverrider.h
index 3322054..c64e422 100644
--- a/tests/auto/qxmlquery/NetworkOverrider.h
+++ b/tests/auto/qxmlquery/NetworkOverrider.h
@@ -70,6 +70,7 @@ public:
virtual QNetworkReply *createRequest(Operation op,
const QNetworkRequest &req,
QIODevice *outgoingData);
+ bool isValid() const;
private:
const QUrl m_rewriteFrom;
@@ -77,11 +78,10 @@ private:
};
NetworkOverrider::NetworkOverrider(const QUrl &rewriteFrom,
- const QUrl &rewriteTo) : m_rewriteFrom(rewriteFrom)
- , m_rewriteTo(rewriteTo)
+ const QUrl &rewriteTo)
+ : m_rewriteFrom(rewriteFrom)
+ , m_rewriteTo(rewriteTo)
{
- Q_ASSERT(m_rewriteFrom.isValid());
- Q_ASSERT(m_rewriteTo.isValid());
}
QNetworkReply *NetworkOverrider::createRequest(Operation op,
@@ -95,4 +95,9 @@ QNetworkReply *NetworkOverrider::createRequest(Operation op,
return QNetworkAccessManager::createRequest(op, newReq, outgoingData);
}
+
+bool NetworkOverrider::isValid() const
+{
+ return m_rewriteFrom.isValid() && m_rewriteTo.isValid();
+}
#endif