class BrowserRun |
|
This class extends KRun to provide additional functionality for browsers:
- "save or open" dialog boxes
- "save" functionality
- support for HTTP POST (including saving the result to a temp file if
opening a separate application)
- warning before launching executables off the web
- custom error handling (i.e. treating errors as HTML pages)
- generation of SSL metadata depending on the previous URL shown by the part
Author David Faure |
|
url - the URL we're probing
args - URL args - includes reload, metaData, etc. browserArgs - browser-related args - includes data for a HTTP POST, etc. part - the part going to open this URL - can be 0 if not created yet window - the mainwindow - passed to KIO.Job.setWindow() removeReferrer - if true, the "referrer" metadata from args isn't passed on trustedSource - if false, a warning will be shown before launching an executable. Always pass false for trustedSource, except for local directory views. hideErrorDialog - if true, no dialog will be shown in case of errors. |
|
|
|
Similar to askSave but for the case where the current application is
able to embed the url itself (instead of passing it to another app).
url - the URL in question mimeType - the mimetype of the URL suggestedFileName - optional filename suggested by the server flags - set to AttachmentDisposition if suggested by the server Returns Save, Open or Cancel. |
|
Ask the user whether to save or open a url in another application.
url - the URL in question offer - the application that will be used to open the URL mimeType - the mimetype of the URL suggestedFileName - optional file name suggested by the server Returns Save, Open or Cancel. |
|
|
Returns Suggested disposition by the server (e.g. HTTP content-disposition) |
|
Called when an error happens. NOTE: job could be 0, if you passed hideErrorDialog=true. The default implementation shows a message box, but only when job != 0 .... It is strongly recommended to reimplement this method if you passed hideErrorDialog=true. |
|
Helper for foundMimeType: call this if the mimetype couldn't be embedded |
|
|
Reimplemented from KRun |
|
|
|
|
Reimplemented from KRun |
|
|
|
|
|
|
|
InlineDisposition | - 0 | - | ||
AttachmentDisposition | - 1 | - |
Save | - | - | ||
Open | - | - | ||
Cancel | - | - |
NotHandled means that foundMimeType should call KRun.foundMimeType, i.e. launch an external app.
Handled | - | - | ||
NotHandled | - | - | ||
Delayed | - | - |