Bug 35155 - [Qt] Allow QtLauncher to be started without Plugin support
Summary: [Qt] Allow QtLauncher to be started without Plugin support
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P3 Enhancement
Assignee: Nobody
URL:
Keywords: EasyFix, Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-02-19 06:35 PST by Casper van Donderen
Modified: 2014-02-03 03:16 PST (History)
7 users (show)

See Also:


Attachments
Patch to start without plugins with -no-plugins switch (1.44 KB, patch)
2010-02-19 06:35 PST, Casper van Donderen
no flags Details | Formatted Diff | Diff
Patch to allow loading the QtLauncher with a -no-plugins option (1.73 KB, patch)
2010-02-19 06:51 PST, Casper van Donderen
no flags Details | Formatted Diff | Diff
Patch including ChangeLog entry allowing starting QtLauncher without plugins (2.75 KB, patch)
2010-02-22 03:53 PST, Casper van Donderen
kenneth: review-
Details | Formatted Diff | Diff
Patch with reviewers comments applied. (2.65 KB, patch)
2010-02-22 08:36 PST, Casper van Donderen
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Casper van Donderen 2010-02-19 06:35:39 PST
Created attachment 49073 [details]
Patch to start without plugins with -no-plugins switch

Add a -no-plugins switch to start the QtLauncher without plugins.

The attached patch does not interfere with applyDefaultSettings(); since there are no settings that will be overwritten.
Comment 1 Casper van Donderen 2010-02-19 06:50:11 PST
Comment on attachment 49073 [details]
Patch to start without plugins with -no-plugins switch

Forgot to add the new flag in the usage string
Comment 2 Casper van Donderen 2010-02-19 06:51:33 PST
Created attachment 49077 [details]
Patch to allow loading the QtLauncher with a -no-plugins option
Comment 3 Eric Seidel (no email) 2010-02-19 16:24:06 PST
Comment on attachment 49077 [details]
Patch to allow loading the QtLauncher with a -no-plugins option

Did you mean to set review=?  You are not a reviewer. :)  Reviewers set r+.
Comment 4 Eric Seidel (no email) 2010-02-19 16:25:37 PST
Comment on attachment 49077 [details]
Patch to allow loading the QtLauncher with a -no-plugins option

Every change requires a ChangeLog, please see:
http://webkit.org/coding/contributing.html
Comment 5 Casper van Donderen 2010-02-22 03:53:07 PST
Created attachment 49199 [details]
Patch including ChangeLog entry allowing starting QtLauncher without plugins
Comment 6 Kenneth Rohde Christiansen 2010-02-22 08:00:13 PST
Comment on attachment 49199 [details]
Patch including ChangeLog entry allowing starting QtLauncher without plugins


> +    if (gNoPlugins)
> +        QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, false);
> +    else
> +        QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);

QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, !gNoPlugins); would be preferred
Comment 7 Casper van Donderen 2010-02-22 08:36:17 PST
Created attachment 49218 [details]
Patch with reviewers comments applied.
Comment 8 Kenneth Rohde Christiansen 2010-02-22 08:45:31 PST
Comment on attachment 49218 [details]
Patch with reviewers comments applied.


> +    handleUserOptions();
> +
>      applyDefaultSettings();
>  
> -    handleUserOptions();

This change was not mentioned in the ChangeLog and could overwrite user set options by the defaults, which I don't this is what we want. Please clarify.
Comment 9 Casper van Donderen 2010-02-22 08:47:04 PST
As readable in Comment 1 it is at this time not possible to overwrite user enabled settings with default ones, since non of the default settings are settable by the user.
Comment 10 Kenneth Rohde Christiansen 2010-02-22 08:56:27 PST
(In reply to comment #9)
> As readable in Comment 1 it is at this time not possible to overwrite user
> enabled settings with default ones, since non of the default settings are
> settable by the user.

That was in Comment 0 :-) Btw, that still does not explain why you changes those lines. Please do not make changes not related to your patch.
Comment 11 Casper van Donderen 2010-02-22 10:01:16 PST
Well,

if I first enable the default settings (when gNoPlugins = 0) you can never start the application without the plugins.

So either it became:
if (args.contains("-no-plugins"))
    QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, false);

or change the order to

handleUserOptions();
applyDefaultSettings();

Since there will be no harm from the second option and the first option seemed slower (which would set the attribute twice) I decided to do it like this.
Comment 12 Kenneth Rohde Christiansen 2010-02-22 11:02:08 PST
You should be able to override the setting per page. Only if the setting is not set on the page it will use the global one.
Comment 13 Robert Hogan 2010-03-08 12:01:36 PST
Wouldn't this be better under Develop->Enable Plugins, or even better Edit->Settings->Enable Plugins?

Seems what's really missing is a way of changing page settings on the fly.
Comment 14 Adam Barth 2010-03-22 10:37:48 PDT
Comment on attachment 49218 [details]
Patch with reviewers comments applied.

We now have the technology to enable/disable plugins on a per-frame basis.  Please use FrameLoaderClient::allowPlugins instead (as suggested above).
Comment 15 Srikumar B 2011-03-27 18:09:45 PDT
Now i see the option to disable/enable plugins per page using Settings->Disable Plugins in QtTestBrowser. Does adding "no-plugins" to command line still make sense as a global option? 

If so, kindly reply by which i would like to work on making this change

-Sri
Comment 16 Jocelyn Turcotte 2014-02-03 03:16:12 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.