Commit c92784bc authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove unused parameter

parent 56a0b085
......@@ -255,7 +255,7 @@ KoColor KisPropertiesConfiguration::getColor(const QString& name, const KoColor&
QDomDocument doc;
doc.setContent(v.toString());
QDomElement e = doc.documentElement().firstChild().toElement();
return KoColor::fromXML(e, Integer16BitsColorDepthID.id(), QHash<QString, QString>());
return KoColor::fromXML(e, Integer16BitsColorDepthID.id());
}
} else {
return color;
......
......@@ -437,7 +437,7 @@ KoColor KisRecordedPaintActionFactory::colorFromXML(const QDomElement& elt, cons
KoColor bC;
if (!colorElt.isNull()) {
bC = KoColor::fromXML(colorElt.firstChildElement(), Integer8BitsColorDepthID.id(), QHash<QString, QString>());
bC = KoColor::fromXML(colorElt.firstChildElement(), Integer8BitsColorDepthID.id());
bC.setOpacity(quint8(255));
dbgImage << elementName << " color : " << bC.toQColor();
} else {
......
......@@ -283,7 +283,7 @@ qreal KoColor::opacityF() const
return d->colorSpace->opacityF(d->data);
}
KoColor KoColor::fromXML(const QDomElement& elt, const QString & bitDepthId, const QHash<QString, QString> & aliases)
KoColor KoColor::fromXML(const QDomElement& elt, const QString & bitDepthId)
{
QString modelId;
if (elt.tagName() == "CMYK") {
......@@ -304,10 +304,6 @@ KoColor KoColor::fromXML(const QDomElement& elt, const QString & bitDepthId, con
QString profileName;
if (elt.tagName() != "sRGB") {
profileName = elt.attribute("space", "");
const QHash<QString, QString>::ConstIterator it = aliases.find(profileName);
if (it != aliases.end()) {
profileName = it.value();
}
if (!KoColorSpaceRegistry::instance()->profileByName(profileName)) {
profileName.clear();
}
......
......@@ -151,12 +151,10 @@ public:
* a preferred bit depth for creating the KoColor object (if that
* bit depth isn't available, this function will randomly select
* an other bit depth)
* @param profileAliases alias between the profile name specified by the "space"
* attribute and the profile name used inside pigment
* @return the unserialize color, or an empty color object if the function failed
* to unserialize the color
*/
static KoColor fromXML(const QDomElement& elt, const QString & bitDepthId, const QHash<QString, QString> & aliases);
static KoColor fromXML(const QDomElement& elt, const QString & bitDepthId);
static QString toQString(const KoColor &color);
......
......@@ -49,7 +49,7 @@ void TestKoColor::testForModel(QString model)
kc.toXML(doc, elt);
doc.appendChild(elt);
dbgPigment << doc.toString();
KoColor kcu = KoColor::fromXML(elt.firstChildElement(), depthId.id(), QHash<QString, QString>());
KoColor kcu = KoColor::fromXML(elt.firstChildElement(), depthId.id());
QVERIFY2(*(kc.colorSpace()) == *(kcu.colorSpace()),
QString("Not identical color space (colorModelId = %1 depthId = %2) != (colorModelId = %3 depthId = %4) ")
.arg(kc.colorSpace()->colorModelId().id())
......
......@@ -1743,12 +1743,12 @@ KoColor KisConfig::readKoColor(const QString& name, const KoColor& color) const
if (!m_cfg.readEntry(name).isNull()) {
doc.setContent(m_cfg.readEntry(name));
QDomElement e = doc.documentElement().firstChild().toElement();
return KoColor::fromXML(e, Integer16BitsColorDepthID.id(), QHash<QString, QString>());
return KoColor::fromXML(e, Integer16BitsColorDepthID.id());
} else {
QString blackColor = "<!DOCTYPE Color>\n<Color>\n <RGB r=\"0\" space=\"sRGB-elle-V2-srgbtrc.icc\" b=\"0\" g=\"0\"/>\n</Color>\n";
doc.setContent(blackColor);
QDomElement e = doc.documentElement().firstChild().toElement();
return KoColor::fromXML(e, Integer16BitsColorDepthID.id(), QHash<QString, QString>());
return KoColor::fromXML(e, Integer16BitsColorDepthID.id());
}
return color;
......
......@@ -314,7 +314,7 @@ KisImageSP KisKraLoader::loadXML(const KoXmlElement& element)
QDomDocument dom;
KoXml::asQDomElement(dom, e);
QDomElement eq = dom.firstChildElement();
proofingConfig->warningColor = KoColor::fromXML(eq.firstChildElement(), Integer8BitsColorDepthID.id(), QHash<QString, QString>());
proofingConfig->warningColor = KoColor::fromXML(eq.firstChildElement(), Integer8BitsColorDepthID.id());
}
if (e.tagName().toLower() == "animation") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment