mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Wrap code for better readability
This commit is contained in:
@@ -49,13 +49,24 @@ void NumerotationContext::clear () {
|
||||
@param initialvalue
|
||||
@return true if value is append
|
||||
*/
|
||||
bool NumerotationContext::addValue(const QString &type, const QVariant &value, const int increase, const int initialvalue) {
|
||||
if (!keyIsAcceptable(type) && !value.canConvert(QVariant::String)) return false;
|
||||
if (keyIsNumber(type) && !value.canConvert(QVariant::Int)) return false;
|
||||
bool NumerotationContext::addValue(const QString &type,
|
||||
const QVariant &value,
|
||||
const int increase,
|
||||
const int initialvalue) {
|
||||
if (!keyIsAcceptable(type) && !value.canConvert(QVariant::String))
|
||||
return false;
|
||||
if (keyIsNumber(type) && !value.canConvert(QVariant::Int))
|
||||
return false;
|
||||
|
||||
QString valuestr = value.toString();
|
||||
valuestr.remove("|");
|
||||
content_ << type + "|" + valuestr + "|" + QString::number(increase) + "|" + QString::number(initialvalue);
|
||||
content_ << type
|
||||
+ "|"
|
||||
+ valuestr
|
||||
+ "|"
|
||||
+ QString::number(increase)
|
||||
+ "|"
|
||||
+ QString::number(initialvalue);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user