From 9359caaf30d330ff9a70b507fc9d4e71a58865c2 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 27 May 2016 00:05:33 +0400 Subject: [PATCH] Font stylename property is now saved by XmlFontSerializator --- limereport/serializators/lrxmlbasetypesserializators.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/limereport/serializators/lrxmlbasetypesserializators.cpp b/limereport/serializators/lrxmlbasetypesserializators.cpp index 29aaa0e..47048d3 100644 --- a/limereport/serializators/lrxmlbasetypesserializators.cpp +++ b/limereport/serializators/lrxmlbasetypesserializators.cpp @@ -169,28 +169,27 @@ QVariant XmlBoolSerializator::loadValue() void XmlFontSerializator::save(const QVariant &value, QString name) { - QFont font = value.value(); QDomElement _node = doc()->createElement(name); _node.setAttribute("Type","QFont"); _node.setAttribute("family",font.family()); _node.setAttribute("pointSize",font.pointSize()); + _node.setAttribute("stylename",font.styleName()); saveBool(_node,"bold",font.bold()); saveBool(_node,"italic",font.italic()); saveBool(_node,"underline",font.underline()); - node()->appendChild(_node); } QVariant XmlFontSerializator::loadValue() { QFont font; - font.setFamily(node()->attribute("family")); font.setPointSize(node()->attribute("pointSize").toInt()); font.setBold(node()->attribute("bold").toInt()); font.setItalic(node()->attribute("italic").toInt()); font.setUnderline(node()->attribute("underline").toInt()); + font.setStyleName(node()->attribute("stylename")); return font; }