Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
if (aRefFea->getKind() == SketchPlugin_Line::ID()) {
if (aOtherFea->getKind() != SketchPlugin_Arc::ID() &&
aOtherFea->getKind() != SketchPlugin_Circle::ID()) {
- theError = "It refers to a " + SketchPlugin_Line::ID() + ", but " + aParamA + " is neither an "
- + SketchPlugin_Arc::ID() + " nor " + SketchPlugin_Circle::ID();
+ theError = "It refers to a %1, but %2 is neither an %3 nor %4";
+ theError.arg(SketchPlugin_Line::ID()).arg(aParamA)
+ .arg(SketchPlugin_Arc::ID()).arg(SketchPlugin_Circle::ID());
return false;
}
}
else if (aRefFea->getKind() == SketchPlugin_Arc::ID()) {
if (aOtherFea->getKind() != SketchPlugin_Line::ID() &&
aOtherFea->getKind() != SketchPlugin_Arc::ID()) {
- theError = "It refers to an " + SketchPlugin_Arc::ID() + ", but " + aParamA + " is not a "
- + SketchPlugin_Line::ID() + " or an " + SketchPlugin_Arc::ID();
+ theError = "It refers to an %1, but %2 is not a %3 or an %4";
+ theError.arg(SketchPlugin_Arc::ID()).arg(aParamA)
+ .arg(SketchPlugin_Line::ID()).arg(SketchPlugin_Arc::ID());
return false;
}
}
else if (aRefFea->getKind() == SketchPlugin_Circle::ID()) {
if (aOtherFea->getKind() != SketchPlugin_Line::ID()) {
- theError = "It refers to an " + SketchPlugin_Circle::ID() + ", but " + aParamA + " is not a "
- + SketchPlugin_Line::ID();
+ theError = "It refers to an %1, but %2 is not a %3";
+ theError.arg(SketchPlugin_Circle::ID()).arg(aParamA)
+ .arg(SketchPlugin_Line::ID());
return false;
}
}
else {
- theError = "It refers to " + aRefFea->getKind() + ", but should refer to " + SketchPlugin_Line::ID()
- + " or " + SketchPlugin_Arc::ID() + " or " + SketchPlugin_Circle::ID();
+ theError = "It refers to %1, but should refer to %2 or %3 or %4";
+ theError.arg(aRefFea->getKind()).arg(SketchPlugin_Line::ID())
+ .arg(SketchPlugin_Arc::ID()).arg(SketchPlugin_Circle::ID());
return false;
}
return true;
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
if (aRefAttr->object() == aRAttr->object()) {
ObjectPtr anObject = aRefAttr->object();
std::string aName = anObject.get() ? anObject->data()->name() : "";
- theError = "The object " + aName + " has been already fixed.";
+ theError = "The object %1 has been already fixed.";
+ theError.arg(aName);
return false;
}
}
else if (aRefAttr->attr() == aRAttr->attr()) {
AttributePtr anAttribute = aRefAttr->attr();
std::string aName = anAttribute.get() ? anAttribute->id() : "";
- theError = "The attribute " + aName + " has been already fixed.";
+ theError = "The attribute %1 has been already fixed.";
+ theError.arg(aName);
return false;
}
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
if (aFeature->getKind() != SketchPlugin_Line::ID() &&
aFeature->getKind() != SketchPlugin_Circle::ID() &&
aFeature->getKind() != SketchPlugin_Arc::ID()) {
- theError = "The " + aFeature->getKind() + " feature kind of attribute is wrong. It should be " +
- SketchPlugin_Line::ID() + " or " + SketchPlugin_Circle::ID() + " or " +
- SketchPlugin_Arc::ID();
+ theError = "The %1 feature kind of attribute is wrong. It should be %2 or %3 or %4";
+ theError.arg(aFeature->getKind()).arg(SketchPlugin_Line::ID())
+ .arg(SketchPlugin_Circle::ID()).arg(SketchPlugin_Arc::ID());
// wrong type of attribute
return false;
}
if ((aType[0] == SketchPlugin_Line::ID() || aType[1] == SketchPlugin_Line::ID()) &&
aType[0] != aType[1]) {
- theError = "Feature with kinds " + aType[0] + " and " + aType[1] + "can not be equal.";
+ theError = "Feature with kinds %1 and %2 can not be equal.";
+ theError.arg(aType[0]).arg(aType[1]);
return false;
}
return true;
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefList::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
std::list<ObjectPtr>::iterator aMirIter = aMirroredObjects.begin();
for (; aMirIter != aMirroredObjects.end(); aMirIter++)
if (aSelObject == *aMirIter) {
- theError = "The object " + aName + " is a result of mirror";
+ theError = "The object %1 is a result of mirror";
+ theError.arg(aName);
return false;
}
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
FeaturePtr aConstraint = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
AttributeRefAttrPtr aRefAttrA = aConstraint->data()->refattr(aParamA);
if (!aRefAttrA) {
- theError = "The " + aParamA + " attribute " + " should be " + ModelAPI_AttributeRefAttr::typeId();
+ theError = "The %1 attribute should be %2";
+ theError.arg(aParamA).arg(ModelAPI_AttributeRefAttr::typeId());
return false;
}
else {
ObjectPtr anObject = aRefAttrA->object();
if (!anObject.get()) {
- theError = aParamA + " attribute has an empty object";
+ theError = "%1 attribute has an empty object";
+ theError.arg(aParamA);
return false;
}
FeaturePtr aFeature = ModelAPI_Feature::feature(aRefAttrA->object());
if (!aFeature.get()) {
- theError = aParamA + " attribute has an empty feature";
+ theError = "%1 attribute has an empty feature";
+ theError.arg(aParamA);
return false;
}
else {
FeaturePtr aFeature = ModelAPI_Feature::feature(aRefAttrB->object());
if (!aFeature) {
- theError = theAttribute->id() + " attribute has an empty object";
+ theError = "%1 attribute has an empty object";
+ theError.arg(theAttribute->id());
return false;
}
if (aFeature->getKind() == SketchPlugin_Point::ID())
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefList::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
for (; anObjIter != aCopiedObjects.end(); anObjIter++)
if (aSelObject == *anObjIter) {
std::string aName = aSelObject.get() ? aSelObject->data()->name() : "";
- theError = "The object " + aName + " is a result of copy";
+ theError = "The object %1 is a result of copy";
+ theError.arg(aName);
return false;
}
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeRefAttr::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
AttributePtr anAttr = aRefAttr->attr();
if (!anAttr) {
- theError = "The attribute " + theAttribute->id() + " should be a point";
+ theError = "The attribute %1 should be a point";
+ theError.arg(theAttribute->id());
return false;
}
// selected point should not be a center of arc
const std::string& aPntId = anAttr->id();
if (aPntId != SketchPlugin_Arc::START_ID() && aPntId != SketchPlugin_Arc::END_ID()) {
- theError = "The attribute " + aPntId + " is not supported";
+ theError = "The attribute %1 is not supported";
+ theError.arg(aPntId);
return false;
}
}
// selected point should be bound point of line
const std::string& aPntId = anAttr->id();
if (aPntId != SketchPlugin_Line::START_ID() && aPntId != SketchPlugin_Line::END_ID()) {
- theError = "The attribute " + aPntId + " is not supported";
+ theError = "The attribute %1 is not supported";
+ theError.arg(aPntId);
return false;
}
}
else {
- theError = "Unable to build tangent arc on " + anAttrFeature->getKind();
+ theError = "Unable to build tangent arc on %1";
+ theError.arg(anAttrFeature->getKind());
return false;
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeSelection::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
AttributeSelectionPtr aLineAttr =
}
if (!anEdge || !anEdge->isLine()) {
- theError = "The attribute " + theAttribute->id() + " should be a line";
+ theError = "The attribute %1 should be a line";
+ theError.arg(theAttribute->id());
return false;
}
Events_InfoMessage& theError) const
{
if (theAttribute->attributeType() != ModelAPI_AttributeSelection::typeId()) {
- theError = "The attribute with the " + theAttribute->attributeType() + " type is not processed";
+ theError = "The attribute with the %1 type is not processed";
+ theError.arg(theAttribute->attributeType());
return false;
}
}
if (!anEdge) {
- theError = "The attribute " + theAttribute->id() + " should be an edge";
+ theError = "The attribute %1 should be an edge";
+ theError.arg(theAttribute->id());
return false;
}