summaryrefslogtreecommitdiffstats
path: root/src/core/custom_url_scheme_handler.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-20 11:59:02 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-20 14:16:22 +0000
commit61dec11a8bc36d37ed36acc6ad897653735d4564 (patch)
tree2de013b04c38fd6734f744182d1e40b13521516d /src/core/custom_url_scheme_handler.cpp
parentd2b9c003f87e34ca599d3264a9af371e435ad0f8 (diff)
Fix crashes and ownership issues in Custom URL scheme handling
Fixes crashes exposed by implementing the qthelp protocol handler for Qt assistant. Change-Id: I0b1153bc52ff82838cde009f1fe1ac46edc43210 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/custom_url_scheme_handler.cpp')
-rw-r--r--src/core/custom_url_scheme_handler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/custom_url_scheme_handler.cpp b/src/core/custom_url_scheme_handler.cpp
index a8701a5d4..edc8000c9 100644
--- a/src/core/custom_url_scheme_handler.cpp
+++ b/src/core/custom_url_scheme_handler.cpp
@@ -39,7 +39,6 @@
CustomUrlSchemeHandler::CustomUrlSchemeHandler(const QByteArray &scheme)
: m_scheme(scheme)
- , m_protocolHandler(new CustomProtocolHandler(this))
{
}
@@ -57,7 +56,8 @@ void CustomUrlSchemeHandler::setScheme(const QByteArray &scheme)
m_scheme = scheme;
}
-CustomProtocolHandler *CustomUrlSchemeHandler::protocolHandler()
+CustomProtocolHandler *CustomUrlSchemeHandler::createProtocolHandler()
{
- return m_protocolHandler.data();
+ // Will be owned by the JobFactory.
+ return new CustomProtocolHandler(this);
}