[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Review Request 115397: fix theme cache cleanup and discarding (v2)
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2014-01-30 12:08:54
Message-ID: 20140130120854.32672.77368 () 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/
-----------------------------------------------------------

Review request for Plasma, Martin Klapetek and Harald Sitter.


Repository: kdelibs


Description
-------

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. 


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>










<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 </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-&gt;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&#39;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. 

</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