linelength=100
-filter=-whitespace,+whitespace/empty_loop_body,-readability,-build,-runtime
+filter=-,+readability/multiline_string
root=src
-#+whitespace/line_length
-#+whitespace/end_of_line
+# whitespace/line_length
+# whitespace/end_of_line
+# whitespace/empty_loop_body
if (!aValid) {
std::string aResultGroupName = isPartSetDocument ? ModelAPI_ResultPart::group()
: ModelAPI_ResultBody::group();
- theError = "Objects from the %1 group can be selected in the %2 document, \
- but an objects from the %3 group is selected.";
+ theError = "Objects from the %1 group can be selected in the %2 document, "
+ "but an objects from the %3 group is selected.";
theError.arg(aResultGroupName).arg(aDocument->kind()).arg(anErrorGroupName);
}
return aValid;
// Whole sketch selected.
if(aSelectedSketchesFromObjects.find(aResultConstruction) !=
aSelectedSketchesFromObjects.cend()) {
- theError = "Error: Object from this sketch is already selected. \
- Sketch is not allowed for selection.";
+ theError = "Error: Object from this sketch is already selected. "
+ "Sketch is not allowed for selection.";
return false;
}
} else {
// Object from sketch selected.
if(aSelectedSketches.find(aResultConstruction) != aSelectedSketches.cend()) {
- theError = "Error: Whole sketch with this object is already selected. \
- Don't allow to select this object.";
+ theError = "Error: Whole sketch with this object is already selected. "
+ "Don't allow to select this object.";
return false;
}
// Check that object is a shape with allowed type.
GeomValidators_ShapeType aShapeTypeValidator;
if(!aShapeTypeValidator.isValid(anAttr, theArguments, theError)) {
- theError = "Error: Selected shape has unacceptable type. Acceptable types are: faces or \
- wires on sketch, whole sketch(if it has at least one face), \
- and whole objects with shape types: %1";
+ theError = "Error: Selected shape has unacceptable type. Acceptable types are: faces or "
+ "wires on sketch, whole sketch(if it has at least one face), "
+ "and whole objects with shape types: %1";
std::string anArgumentString;
for(auto anIt = theArguments.cbegin(); anIt != theArguments.cend(); ++anIt) {
if (!anArgumentString.empty())
if(!aDirShape.get()) {
// Check that dir can be empty.
if(!isShapesCanBeEmpty(aCheckAttribute, theError)) {
- theError = "Error: Base objects list contains vertex or edge, so attribute \"%1\" \
- can not be used with default value. Select direction for extrusion.";
+ theError = "Error: Base objects list contains vertex or edge, so attribute \"%1\" "
+ "can not be used with default value. Select direction for extrusion.";
theError.arg(*anArgsIt);
return false;
} else {
if (!aTypes.empty())
aTypes += ", ";
}
- theError = "It does not contain element with acceptable shape type. \
- The type should be one of the next: %1";
+ theError = "It does not contain element with acceptable shape type. "
+ "The type should be one of the next: %1";
theError.arg(aTypes);
}
if (!aNotActivatedDocWrn.isEmpty())
aText += aNotActivatedDocWrn;
if (!anOtherFeatureNames.empty()) {
- const char* aMsg = "Features are used in the following features: %1.\nThese \
- features will be deleted.\n";
+ const char* aMsg = "Features are used in the following features: %1.\nThese "
+ "features will be deleted.\n";
aText += QString(QObject::tr(aMsg))
.arg(anOtherFeatureNames.join(aSep));
}
if (!aParamFeatureNames.empty()) {
- const char* aMsg = "Parameters are used in the following features: %1.\nThese features will \
- be deleted.\nOr parameters could be replaced by their values.\n";
+ const char* aMsg = "Parameters are used in the following features: %1.\nThese features will "
+ "be deleted.\nOr parameters could be replaced by their values.\n";
aText += QString(QObject::tr(aMsg))
.arg(aParamFeatureNames.join(aSep));
QPushButton *aReplaceButton =
std::string aNotActivatedNames;
if (!ModelAPI_Tools::allDocumentsActivated(aNotActivatedNames)) {
QMessageBox::StandardButton aRes = QMessageBox::warning(0, QObject::tr("Warning"),
- QObject::tr("Selected objects can be used in Part documents which are not loaded: \
-%1. Whould you like to continue?").arg(aNotActivatedNames.c_str()),
+ QObject::tr("Selected objects can be used in Part documents which are not loaded: "
+ "%1. Whould you like to continue?").arg(aNotActivatedNames.c_str()),
QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
if (aRes != QMessageBox::Yes) {
setParameterName(aResultParameter, aMessage->oldName());
QString aCurrentInfoStr = getObjectsInfo(myConflictingObjects);
- QString aMsg("PartSet_OverconstraintListener::processEvent: %1,\nobjects \
- count = %2:%3\ncurrent objects count = %4:%5");
+ QString aMsg("PartSet_OverconstraintListener::processEvent: %1,\nobjects "
+ "count = %2:%3\ncurrent objects count = %4:%5");
qDebug(aMsg.arg(isRepaired ? "REPAIRED" : "FAILED")
.arg(aCount).arg(anInfoStr).arg(myConflictingObjects.size())
.arg(aCurrentInfoStr).toStdString().c_str());
/// The value parameter for the constraint
inline static const std::string& CONSTRAINTS()
{
- static const std::string MY_ERROR_VALUE("The constraint is conflicting with others. \
- To fix this, you can either undo your operation or remove a conflicting constraint.");
+ static const std::string MY_ERROR_VALUE("The constraint is conflicting with others. "
+ "To fix this, you can either undo your operation or remove a conflicting constraint.");
return MY_ERROR_VALUE;
}
/// Constraints should use objects instead of features as attributes
if (!ModelAPI_Tools::allDocumentsActivated(aNotActivatedNames)) {
bool aFoundPartSetObject = ModuleBase_Tools::hasModuleDocumentFeature(theFeatures);
if (aFoundPartSetObject) {
+ const char* aKeyStr = "Selected objects can be used in Part documents which are not loaded: "
+ "%1. Whould you like to continue?";
QMessageBox::StandardButton aRes = QMessageBox::warning(theParent, QObject::tr("Warning"),
- QObject::tr("Selected objects can be used in Part documents which are not loaded: \
-%1. Whould you like to continue?").arg(aNotActivatedNames.c_str()),
+ QObject::tr(aKeyStr).arg(aNotActivatedNames.c_str()),
QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
aResult = aRes == QMessageBox::Yes;
}
ResultParameterPtr aParam;
if (ModelAPI_Tools::findVariable(theObject->document(),
FeaturePtr(), qPrintable(theName), aValue, aParam)) {
- QString aErrMsg(QObject::tr("Selected parameter can not be renamed to: %1. \
- There is a parameter with the same name. Its value is: %2.")
- .arg(qPrintable(theName)).arg(aValue));
+ const char* aKeyStr = "Selected parameter can not be renamed to: %1. "
+ "There is a parameter with the same name. Its value is: %2.";
+ QString aErrMsg(QObject::tr(aKeyStr).arg(qPrintable(theName)).arg(aValue));
// We can not use here a dialog box for message -
// it will crash editing process in ObjectBrowser
Events_InfoMessage("XGUI_Tools", aErrMsg.toStdString()).send();
aMessageBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
aMessageBox.setDefaultButton(QMessageBox::No);
- QString aText = QString(tr("Unused features are the following: \
-%1.\nThese features will be deleted.\nWould you like to continue?").arg(anUnusedNames));
+ const char* aKeyStr = "Unused features are the following: "
+ "%1.\nThese features will be deleted.\nWould you like to continue?";
+ QString aText = QString(tr(aKeyStr).arg(anUnusedNames));
aMessageBox.setText(aText);
if (aMessageBox.exec() == QMessageBox::No)
return;