forked from qt-creator/qt-creator
		
	Core: Algorithms for StyleAnimator
aportale's first one! Change-Id: I86ba1f36576dde19b9deb4c5686e865e7aa53a82 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
		@@ -29,17 +29,15 @@
 | 
			
		||||
 | 
			
		||||
#include "styleanimator.h"
 | 
			
		||||
 | 
			
		||||
#include <utils/algorithm.h>
 | 
			
		||||
 | 
			
		||||
#include <QStyleOption>
 | 
			
		||||
 | 
			
		||||
Animation * StyleAnimator::widgetAnimation(const QWidget *widget) const
 | 
			
		||||
{
 | 
			
		||||
    if (!widget)
 | 
			
		||||
        return 0;
 | 
			
		||||
    foreach (Animation *a, animations) {
 | 
			
		||||
        if (a->widget() == widget)
 | 
			
		||||
            return a;
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
    return Utils::findOrDefault(animations, Utils::equal(&Animation::widget, widget));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Animation::paint(QPainter *painter, const QStyleOption *option)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user