tools/shared/qtgradienteditor/qtgradientutils.cpp
changeset 7 f7bc934e204c
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the tools applications of the Qt Toolkit.
     7 ** This file is part of the tools applications of the Qt Toolkit.
     8 **
     8 **
   393 }
   393 }
   394 
   394 
   395 static QStringList styleSheetStops(const QGradient &gradient)
   395 static QStringList styleSheetStops(const QGradient &gradient)
   396 {
   396 {
   397     QStringList result;
   397     QStringList result;
   398     foreach (QGradientStop stop, gradient.stops()) {
   398     foreach (const QGradientStop &stop, gradient.stops()) {
   399         const QColor color = stop.second;
   399         const QColor color = stop.second;
   400 
   400 
   401         const QString stopDescription = QLatin1String("stop:") + QString::number(stop.first) + QLatin1String(" rgba(")
   401         const QString stopDescription = QLatin1String("stop:") + QString::number(stop.first) + QLatin1String(" rgba(")
   402                 + QString::number(color.red()) + QLatin1String(", ")
   402                 + QString::number(color.red()) + QLatin1String(", ")
   403                 + QString::number(color.green()) + QLatin1String(", ")
   403                 + QString::number(color.green()) + QLatin1String(", ")