From a4eada744108975ac67a9731ed901be9fb1c5b4d Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 29 Apr 2020 17:21:24 +0300 Subject: [PATCH] update to PIP 1.14 --- cd_utils/cdutils_interface.cpp | 2 +- cd_utils/cdutils_types.cpp | 2 +- pip | 2 +- qad/utils/qpiconfig.h | 39 ++++++++++++++++++---------------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/cd_utils/cdutils_interface.cpp b/cd_utils/cdutils_interface.cpp index 2967801..a37d818 100644 --- a/cd_utils/cdutils_interface.cpp +++ b/cd_utils/cdutils_interface.cpp @@ -135,7 +135,7 @@ bool Interface::configure(const PIString & config) { PIConfig conf(config, PIIODevice::ReadOnly); PIConfig::Entry & e(conf.getValue(core->typeLetter(s->cd_type_))); bool ret = false; - setFileName(e.getValue("file", file(), &ret)); + setFileName(e.getValue("file", file(), &ret).toString()); return ret; } diff --git a/cd_utils/cdutils_types.cpp b/cd_utils/cdutils_types.cpp index ae8ce05..cccfb3d 100644 --- a/cd_utils/cdutils_types.cpp +++ b/cd_utils/cdutils_types.cpp @@ -524,7 +524,7 @@ void CDSection::read(const void * ep) { case CDType::cdNull: break; case CDType::cdK: c = CDType(id, e->getValue("v").comment(), e->getValue("v").type(), e->getValue("v").value(), e->getValue("f").value(), e->getValue("f").comment(), cd_type_); - ev = e->getValue("ev", ""); + ev = e->getValue("ev", "").value(); if (!ev.isEmpty()) c.enum_values = c.parseEnumComment(ev); break; diff --git a/pip b/pip index 6a6907b..3454971 160000 --- a/pip +++ b/pip @@ -1 +1 @@ -Subproject commit 6a6907b136ebdfbce020e711e71ccc8bcb138c98 +Subproject commit 3454971100a61497450c843cc6d177a523b38dbc diff --git a/qad/utils/qpiconfig.h b/qad/utils/qpiconfig.h index 00ccd9c..4c2109b 100644 --- a/qad/utils/qpiconfig.h +++ b/qad/utils/qpiconfig.h @@ -149,25 +149,28 @@ public: bool isEntryExists(const QString & name) const {return entryExists(this, name);} - bool toBool() const {return (_value.toLower().trimmed() == "true" || _value.toLower().trimmed() == "yes" || _value.toLower().trimmed() == "on" || _value.toInt() > 0);} - char toChar() const {return (_value.isEmpty() ? 0 : _value[0].toLatin1());} - short toShort() const {return _value.toShort();} - int toInt() const {return QString2int(_value);} - long toLong() const {return QString2int(_value);} - uchar toUChar() const {return QString2int(_value);} - ushort toUShort() const {return QString2int(_value);} - uint toUInt() const {return QString2int(_value);} - ulong toULong() const {return QString2int(_value);} - float toFloat() const {return _value.toFloat();} - double toDouble() const {return _value.toDouble();} - QString toString() const {return _value;} + bool toBool() const {return (_value.toLower().trimmed() == "true" + || _value.toLower().trimmed() == "yes" + || _value.toLower().trimmed() == "on" + || _value.toInt() > 0);} + char toChar() const {return (_value.isEmpty() ? 0 : _value[0].toLatin1());} + short toShort() const {return _value.toShort();} + int toInt() const {return QString2int(_value);} + long toLong() const {return QString2int(_value);} + uchar toUChar() const {return QString2int(_value);} + ushort toUShort() const {return QString2int(_value);} + uint toUInt() const {return QString2int(_value);} + ulong toULong() const {return QString2int(_value);} + float toFloat() const {return _value.toFloat();} + double toDouble() const {return _value.toDouble();} + QString toString() const {return _value;} QStringList toStringList() const {return _value.split("%|%");} - QColor toColor() const {return QString2QColor(_value);} - QRect toRect() const {return QString2QRect(_value);} - QRectF toRectF() const {return QString2QRectF(_value);} - QPoint toPoint() const {return QString2QPoint(_value);} - QPointF toPointF() const {return QString2QPointF(_value);} - QByteArray toByteArray() const {return QString2QByteArray(_value);} + QColor toColor() const {return QString2QColor(_value);} + QRect toRect() const {return QString2QRect(_value);} + QRectF toRectF() const {return QString2QRectF(_value);} + QPoint toPoint() const {return QString2QPoint(_value);} + QPointF toPointF() const {return QString2QPointF(_value);} + QByteArray toByteArray() const {return QString2QByteArray(_value);} private: static bool compare(const QPIConfig::Entry * f, const QPIConfig::Entry * s) {return f->_line < s->_line;}