[TD]CI clang warnings

This commit is contained in:
wandererfan
2022-08-23 15:32:13 -04:00
committed by WandererFan
parent 181b5af6a6
commit acf17905ed
246 changed files with 3944 additions and 4241 deletions

View File

@@ -59,20 +59,20 @@ DrawViewAnnotation::DrawViewAnnotation()
{
static const char *vgroup = "Annotation";
ADD_PROPERTY_TYPE(Text ,("Default Text"),vgroup,App::Prop_None,"Annotation text");
ADD_PROPERTY_TYPE(Text ,("Default Text"), vgroup, App::Prop_None, "Annotation text");
ADD_PROPERTY_TYPE(Font ,(Preferences::labelFont().c_str()),
vgroup,App::Prop_None, "Font name");
ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"Text color");
vgroup, App::Prop_None, "Font name");
ADD_PROPERTY_TYPE(TextColor, (0.0f, 0.0f, 0.0f), vgroup, App::Prop_None, "Text color");
ADD_PROPERTY_TYPE(TextSize, (Preferences::labelFontSizeMM()),
vgroup,App::Prop_None,"Text size");
ADD_PROPERTY_TYPE(MaxWidth,(-1.0),vgroup,App::Prop_None,"Maximum width of the annotation block.\n -1 means no maximum width.");
ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing in %. 100 means the height of a line.");
vgroup, App::Prop_None, "Text size");
ADD_PROPERTY_TYPE(MaxWidth, (-1.0), vgroup, App::Prop_None, "Maximum width of the annotation block.\n -1 means no maximum width.");
ADD_PROPERTY_TYPE(LineSpace, (80), vgroup, App::Prop_None, "Line spacing in %. 100 means the height of a line.");
TextStyle.setEnums(TextStyleEnums);
ADD_PROPERTY_TYPE(TextStyle,((long)0),vgroup,App::Prop_None,"Text style");
ADD_PROPERTY_TYPE(TextStyle, ((long)0), vgroup, App::Prop_None, "Text style");
Scale.setStatus(App::Property::Hidden,true);
ScaleType.setStatus(App::Property::Hidden,true);
Scale.setStatus(App::Property::Hidden, true);
ScaleType.setStatus(App::Property::Hidden, true);
}
DrawViewAnnotation::~DrawViewAnnotation()
@@ -100,7 +100,7 @@ void DrawViewAnnotation::handleChangedPropertyType(Base::XMLReader &reader, cons
{
// also check for changed properties of the base class
DrawView::handleChangedPropertyType(reader, TypeName, prop);
// property LineSpace had the App::PropertyInteger and was changed to App::PropertyPercent
if (prop == &LineSpace && strcmp(TypeName, "App::PropertyInteger") == 0) {
App::PropertyInteger LineSpaceProperty;
@@ -126,9 +126,9 @@ QRectF DrawViewAnnotation::getRect() const
chars = (int)l.size();
}
}
int w = chars * std::max(1,(int)tSize);
int h = lines * std::max(1,(int)tSize);
return QRectF(0,0,getScale() * w,getScale() * h);
int w = chars * std::max(1, (int)tSize);
int h = lines * std::max(1, (int)tSize);
return { 0, 0, getScale() * w, getScale() * h};
}
App::DocumentObjectExecReturn *DrawViewAnnotation::execute()