KParts
browserrun.cpp
Go to the documentation of this file.
239 d->m_args.metaData().insert(QLatin1String("content-disposition-modification-date"), modificationTime);
256 KMimeType::Ptr mimePtr = fixupMimeType(_type, suggestedFileName.isEmpty() ? url().fileName() : suggestedFileName);
270 BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable(const QString& _mimeType, KService::Ptr* selectedService)
307 QString fileName = suggestedFileName().isEmpty() ? KRun::url().fileName() : suggestedFileName();
359 BrowserRun::AskSaveResult BrowserRun::askSave( const KUrl & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFileName )
373 BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KUrl & url, const QString& mimeType, const QString & suggestedFileName, int flags )
406 KConfigGroup cfg = KSharedConfig::openConfig("konquerorrc", KConfig::NoGlobals)->group("HTML Settings");
415 QString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ", downloadManger);
416 QString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled.");
470 const QString modificationTime = metaData[QLatin1String("content-disposition-modification-date")];
472 job->setModificationTime(KDateTime::fromString(modificationTime, KDateTime::RFCDate).dateTime());
566 (void) (KRun::runUrl( static_cast<KIO::FileCopyJob *>(job)->destUrl(), d->m_mimeType, d->m_window ));
QString i18n(const char *text)
QString readPathEntry(const QString &pKey, const QString &aDefault) const
static AskSaveResult askSave(const KUrl &url, KService::Ptr offer, const QString &mimeType, const QString &suggestedFileName=QString())
Ask the user whether to save or open a url in another application.
Definition: browserrun.cpp:359
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
static bool allowExecution(const QString &mimeType, const KUrl &url)
Definition: browserrun.cpp:344
QMap< QString, QString > & metaData()
Meta-data to associate with the KIO operation that will be used to open the URL.
Definition: part.cpp:1131
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
BrowserArguments is a set of web-browsing-specific arguments, which allow specifying how a URL should...
Definition: browserextension.h:64
void setSuggestedFileName(const QString &suggestedFileName)
Sets the suggested filename, shown in the dialog.
Definition: browseropenorsavequestion.cpp:310
TransferJob * get(const KUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
int stat(const QString &path, KDE_struct_stat *buf)
const char * name(StandardAction id)
static KDateTime fromString(const QString &string, TimeFormat format=ISODate, bool *negZero=0)
KUrl url() const
KConfigGroup group(const QByteArray &group)
static void saveUrlUsingKIO(const KUrl &srcUrl, const KUrl &destUrl, QWidget *window, const QMap< QString, QString > &metaData)
Starts the KIO file copy job to download srcUrl into destUrl.
Definition: browserrun.cpp:465
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
bool hasError() const
NonEmbeddableResult
NotHandled means that foundMimeType should call KRun::foundMimeType, i.e.
Definition: browserrun.h:176
void setSuffix(const QString &suffix)
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setUrl(const KUrl &url)
void setPath(const QString &path)
static AskSaveResult askEmbedOrSave(const KUrl &url, const QString &mimeType, const QString &suggestedFileName=QString(), int flags=0)
Similar to askSave but for the case where the current application is able to embed the url itself (in...
Definition: browserrun.cpp:373
This class shows the dialog that asks the user whether to save a url or open a url in another applica...
Definition: browseropenorsavequestion.h:41
void setError(bool error)
Definition: browserrun.h:176
void setFeatures(Features features)
Enables the given features in the dialog.
Definition: browseropenorsavequestion.cpp:305
void setIsLocalFile(bool isLocalFile)
static bool isExecutable(const QString &serviceType)
FileCopyJob * file_copy(const KUrl &src, const KUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
Result askOpenOrSave()
Ask the user whether to save or open a url in another application.
Definition: browseropenorsavequestion.cpp:198
void setModificationTime(const QDateTime &mtime)
This watcher is notified when the "download" job is done, so we can remember where a downloaded file ...
Definition: browserrun_p.h:41
QString contentDisposition() const
Definition: browserrun.cpp:583
QString protocol() const
QWidget * window() const
static bool runCommand(const QString &cmd, QWidget *window)
virtual void slotStatResult(KJob *)
void setPass(const QString &pass)
KIO::Job * job()
void slotBrowserMimetype(KIO::Job *job, const QString &type)
Definition: browserrun.cpp:214
virtual void slotStatResult(KJob *job)
Definition: browserrun.cpp:482
static QString proxiedBy(const QString &protocol)
Definition: browserrun.h:176
void setSuggestedFileName(const QString &fileName)
static bool isTextExecutable(const QString &mimeType)
Definition: browserrun.cpp:572
void slotScanFinished(KJob *)
bool serverSuggestsSave() const
Definition: browserrun.cpp:588
virtual void save(const KUrl &url, const QString &suggestedFileName)
Definition: browserrun.cpp:385
Definition: browserrun.h:80
static void saveUrl(const KUrl &url, const QString &suggestedFileName, QWidget *window, const KParts::OpenUrlArguments &args)
If kget integration is enabled, passes the url to kget.
Definition: browserrun.cpp:397
BrowserRun(const KUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs, KParts::ReadOnlyPart *part, QWidget *window, bool removeReferrer, bool trustedSource, bool hideErrorDialog=false)
Definition: browserrun.cpp:57
void mimeTypeDetermined(const QString &mimeType)
QString quoteArg(const QString &arg)
void setMode(mode_t mode)
static void simpleSave(const KUrl &url, const QString &suggestedFileName, QWidget *window=0)
Definition: browserrun.cpp:391
Definition: browserrun.h:176
static QString slaveProtocol(const KUrl &url, QString &proxy)
Result askEmbedOrSave(int flags=0)
Ask the user whether to save or open a url in another application.
Definition: browseropenorsavequestion.cpp:285
void setPreferredService(const QString &desktopEntryName)
static bool runUrl(const KUrl &url, const QString &mimetype, QWidget *window, bool tempFile=false, bool runExecutables=true, const QString &suggestedFileName=QString(), const QByteArray &asn=QByteArray())
Definition: browserrun.h:80
bool isLocalFile() const
TransferJob * http_post(const KUrl &url, const QByteArray &postData, JobFlags flags=DefaultFlags)
QString suggestedFileName() const
KParts::BrowserArguments & browserArguments()
Definition: browserrun.cpp:600
QString desktopEntryName() const
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
void setJob(KIO::Job *job)
static QString findExe(const QString &appname, const QString &pathstr=QString(), SearchOptions options=NoSearchOptions)
void setFinished(bool finished)
static void detailedSorry(QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Notify)
virtual void init()
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KService::Ptr selectedService() const
Definition: browseropenorsavequestion.cpp:254
Definition: browserrun.h:80
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
void sync()
void slotCopyToTempFileResult(KJob *job)
Definition: browserrun.cpp:560
void slotBrowserScanFinished(KJob *job)
Definition: browserrun.cpp:182
NonEmbeddableResult handleNonEmbeddable(const QString &mimeType)
Helper for foundMimeType: call this if the mimetype couldn't be embedded.
Definition: browserrun.cpp:265
static void publishSlaveOnHold()
bool isLocalFile() const
static KUrl makeErrorUrl(int error, const QString &errorText, const QString &initialUrl)
KDE webbrowsing kparts support error urls to display errors in-line in the browser component...
Definition: browserrun.cpp:520
static KMimeType::Ptr fixupMimeType(const QString &mimeType, const QString &fileName)
Definition: browserrun.cpp:205
Shows "Open With..." with the associated applications for the mimetype.
Definition: browseropenorsavequestion.h:65
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
Definition: part.h:404
bool hasFinished() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.