Bug 49627 - [Qt][WK2] Make it possible to set custom user agent strings in MiniBrowser
Summary: [Qt][WK2] Make it possible to set custom user agent strings in MiniBrowser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Andras Becsi
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2010-11-16 14:57 PST by Andras Becsi
Modified: 2010-11-17 11:31 PST (History)
3 users (show)

See Also:


Attachments
proposed patch (8.47 KB, patch)
2010-11-16 15:08 PST, Andras Becsi
no flags Details | Formatted Diff | Diff
proposed patch v2 (10.21 KB, patch)
2010-11-17 08:43 PST, Andras Becsi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Becsi 2010-11-16 14:57:27 PST
It is not possible to set custom user agent strings in MiniBrowser.
Comment 1 Andras Becsi 2010-11-16 15:08:30 PST
Created attachment 74045 [details]
proposed patch
Comment 2 Andreas Kling 2010-11-17 01:14:13 PST
Comment on attachment 74045 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74045&action=review

> WebKitTools/MiniBrowser/qt/BrowserWindow.cpp:151
> +    QDialog* dialog = new QDialog(this);

Put this on the stack instead, no need for the explicit delete later.

> WebKitTools/MiniBrowser/qt/MiniBrowser.qrc:3
> +        <file>useragentlist.txt</file>

Could we share this file with QtTestBrowser somehow?
Seems unnecessary to have two copies of it.
Comment 3 Andras Becsi 2010-11-17 08:43:20 PST
Created attachment 74118 [details]
proposed patch v2

Addressed Andreas' suggestions.
Comment 4 Andreas Kling 2010-11-17 09:03:49 PST
Comment on attachment 74118 [details]
proposed patch v2

View in context: https://bugs.webkit.org/attachment.cgi?id=74118&action=review

LGTM, just one thing:

> WebKitTools/MiniBrowser/qt/BrowserWindow.cpp:141
> +    ASSERT(!m_userAgentList.isEmpty());

Use Q_ASSERT instead and remove the WTF include + JavaScriptCore path in .pro
Comment 5 Andras Becsi 2010-11-17 10:40:39 PST
Committed r72220: <http://trac.webkit.org/changeset/72220>
Comment 6 Andras Becsi 2010-11-17 10:43:04 PST
Comment on attachment 74118 [details]
proposed patch v2

Clearing flags.
Comment 7 Ryosuke Niwa 2010-11-17 10:59:46 PST
I think this broke qt release build.
Comment 8 Andras Becsi 2010-11-17 11:31:26 PST
(In reply to comment #7)
> I think this broke qt release build.
Build fixed with r72223 and r72224.