From 170e38756feec773bafb85ebbe846b8ac338b0fe Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 13 May 2009 16:13:56 +0000 Subject: [PATCH] usingDiskCache -> usingRenderingCache; removes the implementation detail that it's caching to a disk from the method names; also revert the eroneous setter i added to Wallpaper, it was already there as isUsingRenderingCache svn path=/trunk/KDE/kdelibs/; revision=967627 --- svg.cpp | 4 ++-- svg.h | 6 +++--- wallpaper.cpp | 9 ++------- wallpaper.h | 13 ++++--------- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/svg.cpp b/svg.cpp index dcf5a7e37..bbded524f 100644 --- a/svg.cpp +++ b/svg.cpp @@ -607,12 +607,12 @@ QString Svg::imagePath() const return d->themed ? d->themePath : d->path; } -void Svg::setUsingDiskCache(bool useCache) +void Svg::setUsingRenderingCache(bool useCache) { d->cacheRendering = useCache; } -bool Svg::usingDiskCache() const +bool Svg::isUsingRenderingCache() const { return d->cacheRendering; } diff --git a/svg.h b/svg.h index 93d2d3670..900a16891 100644 --- a/svg.h +++ b/svg.h @@ -59,7 +59,7 @@ class PLASMA_EXPORT Svg : public QObject Q_PROPERTY(QSize size READ size) Q_PROPERTY(bool multipleImages READ containsMultipleImages WRITE setContainsMultipleImages) Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath) - Q_PROPERTY(bool usingDiskCache READ usingDiskCache WRITE setUsingDiskCache) + Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache) public: @@ -232,12 +232,12 @@ class PLASMA_EXPORT Svg : public QObject * @param useCache true to cache rendered pixmaps * @since 4.3 */ - void setUsingDiskCache(bool useCache); + void setUsingRenderingCache(bool useCache); /** * @return true if the Svgis using caching for rendering results */ - bool usingDiskCache() const; + bool isUsingRenderingCache() const; Q_SIGNALS: void repaintNeeded(); diff --git a/wallpaper.cpp b/wallpaper.cpp index 549a792ca..23064f604 100644 --- a/wallpaper.cpp +++ b/wallpaper.cpp @@ -288,21 +288,16 @@ void Wallpaper::setConfigurationRequired(bool needsConfig, const QString &reason emit configurationRequired(needsConfig); } -bool Wallpaper::isUsingDiskCache() const +bool Wallpaper::isUsingRenderingCache() const { return d->cacheRendering; } -void Wallpaper::setUsingDiskCache(bool useCache) +void Wallpaper::setUsingRenderingCache(bool useCache) { d->cacheRendering = useCache; } -bool Wallpaper::usingDiskCache() const -{ - return d->cacheRendering; -} - void Wallpaper::setResizeMethodHint(Wallpaper::ResizeMethod resizeMethod) { d->lastResizeMethod = resizeMethod; diff --git a/wallpaper.h b/wallpaper.h index ddcd9bbbc..bcb412081 100644 --- a/wallpaper.h +++ b/wallpaper.h @@ -60,7 +60,7 @@ class PLASMA_EXPORT Wallpaper : public QObject Q_PROPERTY(QString icon READ icon) Q_PROPERTY(KServiceAction renderingMode READ renderingMode) Q_PROPERTY(QList listRenderingModes READ listRenderingModes) - Q_PROPERTY(bool usingDiskCache READ usingDiskCache WRITE setUsingDiskCache) + Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache) public: /** @@ -275,7 +275,7 @@ class PLASMA_EXPORT Wallpaper : public QObject * @return true if disk caching is turned on. * @since 4.3 */ - bool isUsingDiskCache() const; + bool isUsingRenderingCache() const; /** * Allows one to set rendering hints that may differ from the actualities of the @@ -397,12 +397,7 @@ class PLASMA_EXPORT Wallpaper : public QObject * @param useCache true to cache rendered papers on disk, false not to cache * @since 4.3 */ - void setUsingDiskCache(bool useCache); - - /** - * @return true if the wallpaper is using disk caching for render results - */ - bool usingDiskCache() const; + void setUsingRenderingCache(bool useCache); /** * Tries to load pixmap with the specified key from cache. @@ -418,7 +413,7 @@ class PLASMA_EXPORT Wallpaper : public QObject bool findInCache(const QString &key, QImage &image, unsigned int lastModified = 0); /** - * Insert specified pixmap into the cache if usingDiskCache. + * Insert specified pixmap into the cache if usingRenderingCache. * If the cache already contains pixmap with the specified key then it is * overwritten. *