From kde-panel-devel Thu Jan 30 17:31:23 2014 From: "Commit Hook" Date: Thu, 30 Jan 2014 17:31:23 +0000 To: kde-panel-devel Subject: Re: Review Request 115397: fix theme cache cleanup and discarding (v2) Message-Id: <20140130173123.21753.15848 () probe ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=139110311204781 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============4783806434322594810==" --===============4783806434322594810== Content-Type: multipart/alternative; boundary="===============3930061375943142353==" --===============3930061375943142353== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115397/#review48648 ----------------------------------------------------------- This review has been submitted with commit f3525baec4f867f88298331f11d69a0ce151ce72 by Aaron Seigo to branch KDE/4.12. - Commit Hook On Jan. 30, 2014, 5:05 p.m., Aaron J. Seigo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/115397/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2014, 5:05 p.m.) > > > 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. > > 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 > > --===============3930061375943142353== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115397/

This review has been submitted with commit f3525baec4f867f88298331f11d69a0ce151ce72 by Aaron Seigo to branch KDE/4.12.

- Commit Hook


On January 30th, 2014, 5:05 p.m. UTC, Aaron J. Seigo wrote:

Review request for Plasma, Martin Klapetek and Harald Sitter.
By Aaron J. Seigo.

Updated Jan. 30, 2014, 5:05 p.m.

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. 

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.

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

Diffs

  • plasma/theme.cpp (cb44878)

View Diff

--===============3930061375943142353==-- --===============4783806434322594810== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============4783806434322594810==--