[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 115397: fix theme cache cleanup and discarding (v2)
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2014-01-30 12:18:09
Message-ID: 20140130121809.2191.74102 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115397/
-----------------------------------------------------------
(Updated Jan. 30, 2014, 12:18 p.m.)
Review request for Plasma, Martin Klapetek and Harald Sitter.
Repository: kdelibs
Description (updated)
-------
A variation of https://git.reviewboard.kde.org/r/115326 which also cleans up when the \
metadata.desktop file in the theme changes at runtime.
This resulted in moving the creation of the svg cache file into useCache(), which \
makes more sense anyways. Even if discardCache was always called before methods \
checked for d->svgElementsCache, that is obviously not only non-intuitive but hard to \
track in the code (changes are scheduled via a timer...) making that more brittle \
than necessary. Upon review of the code, there is no reason to expect there to be an \
svg elements cache if caching is turned off (the svg files need to be opened in that \
case anyways, so nothing is really being saved). This simplifies discardCaches and \
creates consistency between how the two cache files (image and svg elements) are used \
in the rest of the code base.
Fixes pulled in from Harald's patch include checking the time of the file before \
creating the image cache object to preserve correct mtime and versioning the image \
cache file name appropriately.
Note that this means that plasma themes can now be updated while in use (e.g. \
plasma-desktop is running) and the visuals will adapt accordingly.
Diffs
-----
plasma/theme.cpp cb44878
Diff: https://git.reviewboard.kde.org/r/115397/diff/
Testing
-------
changed desktop theme version in meatadata.desktop between runs of plasma-desktop: \
cache files changed to correct versions
changed config file *during* plasma-desktop running: caches files changed to correct \
versions
no change between runs: cache files retained
Thanks,
Aaron J. Seigo
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115397/">https://git.reviewboard.kde.org/r/115397/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma, Martin Klapetek and Harald Sitter.</div>
<div>By Aaron J. Seigo.</div>
<p style="color: grey;"><i>Updated Jan. 30, 2014, 12:18 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">A variation of https://git.reviewboard.kde.org/r/115326 which also \
cleans up when the metadata.desktop file in the theme changes at runtime.
This resulted in moving the creation of the svg cache file into useCache(), which \
makes more sense anyways. Even if discardCache was always called before methods \
checked for d->svgElementsCache, that is obviously not only non-intuitive but hard \
to track in the code (changes are scheduled via a timer...) making that more brittle \
than necessary. Upon review of the code, there is no reason to expect there to be an \
svg elements cache if caching is turned off (the svg files need to be opened in that \
case anyways, so nothing is really being saved). This simplifies discardCaches and \
creates consistency between how the two cache files (image and svg elements) are used \
in the rest of the code base.
Fixes pulled in from Harald's patch include checking the time of the file before \
creating the image cache object to preserve correct mtime and versioning the image \
cache file name appropriately.
Note that this means that plasma themes can now be updated while in use (e.g. \
plasma-desktop is running) and the visuals will adapt accordingly.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">changed desktop theme version in meatadata.desktop between runs of \
plasma-desktop: cache files changed to correct versions
changed config file *during* plasma-desktop running: caches files changed to correct \
versions
no change between runs: cache files retained</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasma/theme.cpp <span style="color: grey">(cb44878)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115397/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic