diff options
Diffstat (limited to 'src/core/custom_protocol_handler.h')
-rw-r--r-- | src/core/custom_protocol_handler.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/custom_protocol_handler.h b/src/core/custom_protocol_handler.h index 94da28673..8b6756715 100644 --- a/src/core/custom_protocol_handler.h +++ b/src/core/custom_protocol_handler.h @@ -42,10 +42,9 @@ #include <QtCore/QByteArray> #include <QtCore/QObject> -#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE +#include <QtCore/QWeakPointer> QT_FORWARD_DECLARE_CLASS(QIODevice) -QT_FORWARD_DECLARE_CLASS(QWebEngineUrlSchemeHandler) namespace net { class NetworkDelegate; @@ -61,13 +60,13 @@ class BrowserContextAdapter; class QWEBENGINE_EXPORT CustomProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { public: - CustomProtocolHandler(QWebEngineUrlSchemeHandler *); + CustomProtocolHandler(QWeakPointer<const BrowserContextAdapter> adapter); virtual net::URLRequestJob *MaybeCreateJob(net::URLRequest *request, net::NetworkDelegate *networkDelegate) const Q_DECL_OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(CustomProtocolHandler); - QWebEngineUrlSchemeHandler *m_schemeHandler; + QWeakPointer<const BrowserContextAdapter> m_adapter; }; } // namespace |