summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-23 10:32:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-26 10:06:56 +0000
commit6546a8e122d8fe7725701d76285eb6156eebf8e4 (patch)
tree86d364854f2244a42236459bfe787eec5747fc27
parentdc707f0855a7b8a5c98456d4b8cd65d1a7ea3514 (diff)
Fix crash on unsetting request interceptor
Don't access nullpointer. Also don't print developer warnings to end-users. Change-Id: I273101dd581a335464ff2dbae5095bc99e455649 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 74dc14da..32c00075 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -577,9 +577,11 @@ QWebEngineCookieStore* QWebEngineProfile::cookieStore()
void QWebEngineProfile::setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor)
{
Q_D(QWebEngineProfile);
- interceptor->setProperty("deprecated", true);
+ if (interceptor)
+ interceptor->setProperty("deprecated", true);
d->profileAdapter()->setRequestInterceptor(interceptor);
- qWarning("Use of deprecated not tread-safe setter, use setUrlRequestInterceptor instead.");
+ if (interceptor)
+ qDebug("Use of deprecated not thread-safe setter, use setUrlRequestInterceptor instead.");
}
#endif
/*!