[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdereview/plasma/wallpapers/mandelbrot
From: BenoƮt Jacob <jacob.benoit.1 () gmail ! com>
Date: 2009-04-14 15:09:19
Message-ID: 1239721759.713128.7569.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 953810 by bjacob:
* fix determination of whether need to rerender in init() -- now
key-based. The problem was the little imprecision introduced by
storing qreal's in base 10 ascii.
* don't moc a class that doesn't need it
M +10 -17 mandelbrot.cpp
M +0 -2 tile.cpp
--- trunk/kdereview/plasma/wallpapers/mandelbrot/mandelbrot.cpp #953809:953810
@@ -102,28 +102,21 @@
void Mandelbrot::init(const KConfigGroup &config)
{
- QPointF center = config.readEntry("mandelbrotcenter", QPointF(0,0));
- qreal zoom = config.readEntry("mandelbrotzoom", qreal(2));
- QColor color1 = config.readEntry("mandelbrotcolor1", QColor(255,255,255));
- QColor color2 = config.readEntry("mandelbrotcolor2", QColor(64,255,255));
- QColor color3 = config.readEntry("mandelbrotcolor3", QColor(0,0,255));
- int quality = config.readEntry("mandelbrotquality", 1);
- if(quality > 4) quality = 4;
+ QString old_key = key();
+
+ m_center = config.readEntry("mandelbrotcenter", QPointF(0,0));
+ m_zoom = config.readEntry("mandelbrotzoom", qreal(2));
+ m_color1 = config.readEntry("mandelbrotcolor1", QColor(255,255,255));
+ m_color2 = config.readEntry("mandelbrotcolor2", QColor(64,255,255));
+ m_color3 = config.readEntry("mandelbrotcolor3", QColor(0,0,255));
+ m_quality = config.readEntry("mandelbrotquality", 1);
+ if(m_quality > 4) m_quality = 4;
m_lock = Qt::CheckState(config.readEntry("mandelbrotlock", int(Qt::Unchecked)));
- if(center != m_center || zoom != m_zoom
- || color1 != m_color1 || color2 != m_color2 || color3 != m_color3
- || quality != m_quality || !m_image || m_image->size() != boundingRect().size())
+ if(key() != old_key)
{
abortRendering();
- m_center = center;
- m_zoom = zoom;
- m_color1 = color1;
- m_color2 = color2;
- m_color3 = color3;
- m_quality = quality;
-
if(!m_image || m_image->size() != boundingRect().size())
{
delete m_image;
--- trunk/kdereview/plasma/wallpapers/mandelbrot/tile.cpp #953809:953810
@@ -76,5 +76,3 @@
int next_top = (m_y+1)*m_mandelbrot->height()/8;
return QRect(left, top, next_left-left, next_top-top);
}
-
-#include "tile.moc"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic