Commit 6bacfcda authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Add attempt at saving color to xml.

This fails due to me not being able to load the xml, due object-bonanza.

ref T2337
parent 3bbf025b
......@@ -302,11 +302,12 @@ KisImageWSP KisKraLoader::loadXML(const KoXmlElement& element)
if (e.hasAttribute("ColorData")) {
QByteArray colorData = QByteArray::fromBase64(e.attribute("ColorData").toLatin1());
KoColor color((const quint8*), image->colorSpace());
proofingConfig->warningColor = color;
qDebug()<<"Warning color found but can't be loaded because the loading code is incomplete, fixme!"
//how do I convert a koxmlelement to a qdomelement???
//QDomElement eq = child.toElement();
//QString depth ="U8";
//proofingConfig->warningColor = KoColor::fromXML(eq, depth, QHash<QString, QString>());
if (e.tagName().toLower() == "animation") {
......@@ -296,8 +296,9 @@ void KisKraSaver::saveWarningColor(QDomDocument& doc, QDomElement& element, KisI
if (image->proofingConfiguration()) {
QDomElement e = doc.createElement(PROOFINGWARNINGCOLOR);
KoColor color = image->proofingConfiguration()->warningColor;
QByteArray colorData = QByteArray::fromRawData((const char*), color.colorSpace()->pixelSize());
e.setAttribute("ColorData", QString(colorData.toBase64()));
color.toXML(doc, e);
//QByteArray colorData = QByteArray::fromRawData((const char*), color.colorSpace()->pixelSize());
//e.setAttribute("ColorData", QString(colorData.toBase64()));
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