update to PIP 1.14

This commit is contained in:
2020-04-29 17:21:24 +03:00
parent 2c7528fe6d
commit a4eada7441
4 changed files with 24 additions and 21 deletions

View File

@@ -135,7 +135,7 @@ bool Interface::configure(const PIString & config) {
PIConfig conf(config, PIIODevice::ReadOnly); PIConfig conf(config, PIIODevice::ReadOnly);
PIConfig::Entry & e(conf.getValue(core->typeLetter(s->cd_type_))); PIConfig::Entry & e(conf.getValue(core->typeLetter(s->cd_type_)));
bool ret = false; bool ret = false;
setFileName(e.getValue("file", file(), &ret)); setFileName(e.getValue("file", file(), &ret).toString());
return ret; return ret;
} }

View File

@@ -524,7 +524,7 @@ void CDSection::read(const void * ep) {
case CDType::cdNull: break; case CDType::cdNull: break;
case CDType::cdK: 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_); 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()) if (!ev.isEmpty())
c.enum_values = c.parseEnumComment(ev); c.enum_values = c.parseEnumComment(ev);
break; break;

2
pip

Submodule pip updated: 6a6907b136...3454971100

View File

@@ -149,25 +149,28 @@ public:
bool isEntryExists(const QString & name) const {return entryExists(this, name);} 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);} bool toBool() const {return (_value.toLower().trimmed() == "true"
char toChar() const {return (_value.isEmpty() ? 0 : _value[0].toLatin1());} || _value.toLower().trimmed() == "yes"
short toShort() const {return _value.toShort();} || _value.toLower().trimmed() == "on"
int toInt() const {return QString2int(_value);} || _value.toInt() > 0);}
long toLong() const {return QString2int(_value);} char toChar() const {return (_value.isEmpty() ? 0 : _value[0].toLatin1());}
uchar toUChar() const {return QString2int(_value);} short toShort() const {return _value.toShort();}
ushort toUShort() const {return QString2int(_value);} int toInt() const {return QString2int(_value);}
uint toUInt() const {return QString2int(_value);} long toLong() const {return QString2int(_value);}
ulong toULong() const {return QString2int(_value);} uchar toUChar() const {return QString2int(_value);}
float toFloat() const {return _value.toFloat();} ushort toUShort() const {return QString2int(_value);}
double toDouble() const {return _value.toDouble();} uint toUInt() const {return QString2int(_value);}
QString toString() const {return _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("%|%");} QStringList toStringList() const {return _value.split("%|%");}
QColor toColor() const {return QString2QColor(_value);} QColor toColor() const {return QString2QColor(_value);}
QRect toRect() const {return QString2QRect(_value);} QRect toRect() const {return QString2QRect(_value);}
QRectF toRectF() const {return QString2QRectF(_value);} QRectF toRectF() const {return QString2QRectF(_value);}
QPoint toPoint() const {return QString2QPoint(_value);} QPoint toPoint() const {return QString2QPoint(_value);}
QPointF toPointF() const {return QString2QPointF(_value);} QPointF toPointF() const {return QString2QPointF(_value);}
QByteArray toByteArray() const {return QString2QByteArray(_value);} QByteArray toByteArray() const {return QString2QByteArray(_value);}
private: private:
static bool compare(const QPIConfig::Entry * f, const QPIConfig::Entry * s) {return f->_line < s->_line;} static bool compare(const QPIConfig::Entry * f, const QPIConfig::Entry * s) {return f->_line < s->_line;}