Commit c323d10e authored by Stefano Crocco's avatar Stefano Crocco Committed by David Faure
Browse files

Attempt to embed the file instead of opening when clicking on a locked view with a linked view

parent 342100e9
......@@ -111,13 +111,18 @@ void UrlLoader::start()
}
}
bool UrlLoader::isViewLocked() const
{
return m_view && m_view->isLockedLocation();
}
void UrlLoader::decideAction()
{
if (decideExecute()) {
m_action = OpenUrlAction::Execute;
m_ready = true;
} else {
if (shouldEmbedThis()) {
if (isViewLocked() || shouldEmbedThis()) {
bool success = decideEmbedOrSave();
if (success) {
return;
......
......@@ -103,6 +103,7 @@ private:
bool embedWithoutAskingToSave(const QString &mimeType);
bool shouldUseDefaultHttpMimeype() const;
void decideAction();
bool isViewLocked() const;
typedef QPair<OpenUrlAction, KService::Ptr> OpenSaveAnswer;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment