diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index 54854da..2f566ff 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -30,6 +30,7 @@ #include "lrbanddesignintf.h" #include "lritemdesignintf.h" #include "lrglobal.h" +#include #include #include diff --git a/limereport/lrdatasourcemanager.h b/limereport/lrdatasourcemanager.h index 6b5fa7f..5100a83 100644 --- a/limereport/lrdatasourcemanager.h +++ b/limereport/lrdatasourcemanager.h @@ -32,7 +32,6 @@ #include #include -#include "lrdatasourcemanager.h" #include "lrdatadesignintf.h" #include "lrcollection.h" #include "lrglobal.h" diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index b61e819..976aa22 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -229,7 +229,7 @@ QScriptValue numberFormat(QScriptContext* pcontext, QScriptEngine* pengine){ pengine->newVariant(QLocale(locale).toString(value.toDouble(),format,precision)); return res; } - +#if QT_VERSION>0x040800 QScriptValue currencyFormat(QScriptContext* pcontext, QScriptEngine* pengine){ QVariant value = pcontext->argument(0).toVariant(); QString locale = (pcontext->argumentCount()>1)?pcontext->argument(1).toString():QLocale::system().name(); @@ -245,7 +245,7 @@ QScriptValue currencyUSBasedFormat(QScriptContext* pcontext, QScriptEngine* peng if (CurrencySymbol!="") vTempStr.replace("$", CurrencySymbol); return pengine->newVariant(vTempStr); } - +#endif QScriptValue dateFormat(QScriptContext* pcontext, QScriptEngine* pengine){ QVariant value = pcontext->argument(0).toVariant(); QString format = (pcontext->argumentCount()>1)?pcontext->argument(1).toString().toLatin1():"dd.MM.yyyy"; @@ -426,8 +426,10 @@ ScriptEngineManager::ScriptEngineManager() addFunction("dateTimeFormat", dateTimeFormat, "DATE&TIME", "dateTimeFormat(\""+tr("Value")+"\",\""+tr("Format")+"\")"); addFunction("date",date,"DATE&TIME","date()"); addFunction("now",now,"DATE&TIME","now()"); +#if QT_VERSION>0x040800 addFunction("currencyFormat",currencyFormat,"NUMBER","currencyFormat(\""+tr("Value")+"\",\""+tr("Locale")+"\")"); addFunction("currencyUSBasedFormat",currencyUSBasedFormat,"NUMBER","currencyUSBasedFormat(\""+tr("Value")+",\""+tr("CurrencySymbol")+"\")"); +#endif addFunction("setVariable", setVariable, "GENERAL", "setVariable(\""+tr("Name")+"\",\""+tr("Value")+"\")"); QScriptValue colorCtor = m_scriptEngine->newFunction(constructColor); diff --git a/limereport/serializators/lrxmlbasetypesserializators.cpp b/limereport/serializators/lrxmlbasetypesserializators.cpp index ac82079..dfdc208 100644 --- a/limereport/serializators/lrxmlbasetypesserializators.cpp +++ b/limereport/serializators/lrxmlbasetypesserializators.cpp @@ -179,7 +179,9 @@ void XmlFontSerializator::save(const QVariant &value, QString name) _node.setAttribute("Type","QFont"); _node.setAttribute("family",font.family()); _node.setAttribute("pointSize",font.pointSize()); +#if QT_VERSION>0x040800 _node.setAttribute("stylename",font.styleName()); +#endif _node.setAttribute("weight",font.weight()); //saveBool(_node,"bold",font.bold()); saveBool(_node,"italic",font.italic()); @@ -192,7 +194,9 @@ QVariant XmlFontSerializator::loadValue() QFont font; font.setFamily(node()->attribute("family")); font.setPointSize(node()->attribute("pointSize").toInt()); +#if QT_VERSION>0x040800 font.setStyleName(node()->attribute("stylename")); +#endif font.setWeight(node()->attribute("weight").toInt()); if (!node()->attribute("bold").isEmpty()) font.setBold(node()->attribute("bold").toInt());