-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128884/
-----------------------------------------------------------

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

Reply via email to