Review Request 128884: Disable QWebView's object cache when the "disableStyleCache" option is set
Mariusz Glebocki
mglb at arccos-1.net
Sat Sep 10 21:18:37 UTC 2016
> On Wrz 10, 2016, 10:50 po południu, Alexandr Akulich wrote:
> > lib/adium-theme-view.cpp, line 81
> > <https://git.reviewboard.kde.org/r/128884/diff/1/?file=476708#file476708line81>
> >
> > Please, use KTpStyleDebug here.
OK. Wouldn't it be a good idea to also change it in chat-window-style-manager.cpp?
- Mariusz
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128884/#review99065
-----------------------------------------------------------
On Wrz 10, 2016, 9:56 po południu, Mariusz Glebocki wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128884/
> -----------------------------------------------------------
>
> (Updated Wrz 10, 2016, 9:56 po południu)
>
>
> Review request for Telepathy.
>
>
> Repository: ktp-text-ui
>
>
> Description
> -------
>
> The patch disables QWebView's object cache when the "disableStyleCache" option is set.
>
> When the style cache is disabled (see https://github.com/KDE/ktp-text-ui/blob/master/lib/chat-window-style-manager.cpp#L310) all style files should be reloaded on a style change. This is done for at least all .html files. However, .css (and possibly .js) files are cached in QWebView, so they are read from the cache when referenced by `@import`.
>
> ## How to reproduce the problem
>
> - Append following setting to `~/.config/ktp-text-uirc`:
> ```
> [KopeteStyleDebug]
> disableStyleCache=true
> ```
>
> - Run ktp-text-ui, open any chat
>
> - optionally, change the chat style to one which uses main.css file (like SimKete)
>
> - without closing the chat window, backup the style's main.css file (`~/.local/share/ktelepathy/styles/<style-name>.AdiumMessageStyle/Contents/Resources/main.css` or `/usr/share/ktelepathy/styles/<style-name>.AdiumMessageStyle/Contents/Resources/main.css`) and modify it in some noticeable way. Example modification for SimKete:
> ```
> body {
> font-size: 12px;
> /* background-color: #e3e3e3; */
> background-color: red;
> }
> ```
>
> - reload the style in ktp-text-ui by changing it to another one and back in the settings
>
> - the result is visible in a chat preview
>
> - optionally, click apply/ok to verify results in real chat window
>
> ### Results:
>
> - without patch: the style looks like before; ktp-text-ui needs restart to use a new stylesheet
>
> - with patch: the style uses changed main.css file (red background for SimKete example)
>
> *NOTE:* Don't forget to restore original main.css
>
>
> Diffs
> -----
>
> lib/adium-theme-view.cpp 26e6d50
>
> Diff: https://git.reviewboard.kde.org/r/128884/diff/
>
>
> Testing
> -------
>
> - compile/run: OK
> - use case from the description gives expected result: OK
> - multiple similar tests with own style: OK
> - the cache is not disabled when "disableStyleCache" is not set: OK
>
>
> Thanks,
>
> Mariusz Glebocki
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20160910/a8c5839c/attachment-0001.html>
More information about the KDE-Telepathy
mailing list