Changeset View
Changeset View
Standalone View
Standalone View
webenginepart/src/webenginepage.h
Context not available. | |||||
62 | */ | 62 | */ | ||
---|---|---|---|---|---|
63 | void setSslInfo (const WebSslInfo &other); | 63 | void setSslInfo (const WebSslInfo &other); | ||
64 | 64 | | |||
65 | void download(const QUrl &url, bool newWindow = false); | 65 | void download(QWebEngineDownloadItem *it, bool newWindow = false); | ||
66 | 66 | | |||
67 | /** | ||||
68 | * Store the information that loadUrl has been called | ||||
69 | * | ||||
70 | * @see LoadUrlCalledStatus | ||||
71 | */ | ||||
72 | void recordLoadUrlCalled(){m_loadUrlCalledStatus = Called;} | ||||
73 | | ||||
74 | /** | ||||
75 | * Removes the information that loadUrl has been called | ||||
76 | * | ||||
77 | * @see LoadUrlCalledStatus | ||||
78 | */ | ||||
79 | void clearLoadUrlCalled(){m_loadUrlCalledStatus = NotCalled;} | ||||
80 | | ||||
81 | /** | ||||
82 | * Whether or not the part corresponding to this page must be used to open the given URL, | ||||
83 | * regardless of everything else | ||||
84 | * | ||||
85 | * @see LoadUrlCalledStatus | ||||
86 | */ | ||||
87 | bool forceDownloadWithThis() const {return m_loadUrlCalledStatus != NotCalled;} | ||||
88 | | ||||
67 | Q_SIGNALS: | 89 | Q_SIGNALS: | ||
68 | /** | 90 | /** | ||
69 | * This signal is emitted whenever a user cancels/aborts a load resource | 91 | * This signal is emitted whenever a user cancels/aborts a load resource | ||
Context not available. | |||||
74 | void navigationRequested(WebEnginePage* page, const QUrl& url); | 96 | void navigationRequested(WebEnginePage* page, const QUrl& url); | ||
75 | 97 | | |||
76 | protected: | 98 | protected: | ||
99 | | ||||
100 | /** | ||||
101 | * Sometimes Konqueror may be configured to handle extensions which | ||||
102 | * QWebEngine can't actually handle. In this case, there's the risk | ||||
103 | * of an endless loop: | ||||
104 | * QWebEngineProfile::downloadRequested -> download -> emit openUrlRequest -> WebEnginePart::openUrl -> acceptNavigationRequest -> QWebEngineProfile::downloadRequested ... | ||||
105 | * To avoid this situation, this enum is used. NotCalled means that | ||||
106 | * it's the first time that acceptNavigationRequest is called for an | ||||
107 | * URL; Called means that an acceptNavigationRequest call for an URL; | ||||
108 | * CalledAndSeen means that a second acceptNavigationRequest call for | ||||
109 | * an URL is already being processed (endless loop). | ||||
110 | */ | ||||
111 | enum LoadUrlCalledStatus {NotCalled, Called, CalledAndSeen}; | ||||
112 | | ||||
77 | /** | 113 | /** | ||
78 | * Returns the webengine part in use by this object. | 114 | * Returns the webengine part in use by this object. | ||
79 | * @internal | 115 | * @internal | ||
Context not available. | |||||
121 | QPointer<WebEnginePart> m_part; | 157 | QPointer<WebEnginePart> m_part; | ||
122 | 158 | | |||
123 | QScopedPointer<KPasswdServerClient> m_passwdServerClient; | 159 | QScopedPointer<KPasswdServerClient> m_passwdServerClient; | ||
160 | | ||||
161 | LoadUrlCalledStatus m_loadUrlCalledStatus; | ||||
124 | }; | 162 | }; | ||
125 | 163 | | |||
126 | 164 | | |||
Context not available. |