Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/kis_config.cc
Show First 20 Lines • Show All 1804 Lines • ▼ Show 20 Line(s) | |||||
1805 | 1805 | | |||
1806 | //ported from kispropertiesconfig. | 1806 | //ported from kispropertiesconfig. | ||
1807 | KoColor KisConfig::readKoColor(const QString& name, const KoColor& color) const | 1807 | KoColor KisConfig::readKoColor(const QString& name, const KoColor& color) const | ||
1808 | { | 1808 | { | ||
1809 | QDomDocument doc; | 1809 | QDomDocument doc; | ||
1810 | if (!m_cfg.readEntry(name).isNull()) { | 1810 | if (!m_cfg.readEntry(name).isNull()) { | ||
1811 | doc.setContent(m_cfg.readEntry(name)); | 1811 | doc.setContent(m_cfg.readEntry(name)); | ||
1812 | QDomElement e = doc.documentElement().firstChild().toElement(); | 1812 | QDomElement e = doc.documentElement().firstChild().toElement(); | ||
1813 | return KoColor::fromXML(e, Integer16BitsColorDepthID.id(), QHash<QString, QString>()); | 1813 | return KoColor::fromXML(e, Integer16BitsColorDepthID.id()); | ||
1814 | } else { | 1814 | } else { | ||
1815 | QString blackColor = "<!DOCTYPE Color>\n<Color>\n <RGB r=\"0\" space=\"sRGB-elle-V2-srgbtrc.icc\" b=\"0\" g=\"0\"/>\n</Color>\n"; | 1815 | QString blackColor = "<!DOCTYPE Color>\n<Color>\n <RGB r=\"0\" space=\"sRGB-elle-V2-srgbtrc.icc\" b=\"0\" g=\"0\"/>\n</Color>\n"; | ||
1816 | doc.setContent(blackColor); | 1816 | doc.setContent(blackColor); | ||
1817 | QDomElement e = doc.documentElement().firstChild().toElement(); | 1817 | QDomElement e = doc.documentElement().firstChild().toElement(); | ||
1818 | return KoColor::fromXML(e, Integer16BitsColorDepthID.id(), QHash<QString, QString>()); | 1818 | return KoColor::fromXML(e, Integer16BitsColorDepthID.id()); | ||
1819 | } | 1819 | } | ||
1820 | return color; | 1820 | return color; | ||
1821 | 1821 | | |||
1822 | } | 1822 | } |