Fix trailing newlines and minor typo fixes
This commit is contained in:
4
contrib/.vscode/launch.json
vendored
4
contrib/.vscode/launch.json
vendored
@@ -6,7 +6,7 @@
|
|||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"program": "${command:cmake.buildDirectory}/tests/Tests_run",
|
"program": "${command:cmake.buildDirectory}/tests/Tests_run",
|
||||||
"args": [],
|
"args": [],
|
||||||
"environment": [
|
"environment": [
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"program": "${command:cmake.buildDirectory}/bin/FreeCAD",
|
"program": "${command:cmake.buildDirectory}/bin/FreeCAD",
|
||||||
"args": ["${workspaceFolder}/.vscode/scripts/VSCodeAutostartDebug.FCMacro"],
|
"args": ["${workspaceFolder}/.vscode/scripts/VSCodeAutostartDebug.FCMacro"],
|
||||||
"environment": [
|
"environment": [
|
||||||
{
|
{
|
||||||
|
|||||||
12
contrib/.vscode/settings.json
vendored
12
contrib/.vscode/settings.json
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
// This disables vscode from adding lines to files.associations,
|
// This disables vscode from adding lines to files.associations,
|
||||||
// some files might not be recognized though.
|
// some files might not be recognized though.
|
||||||
// This is a vscode issue.
|
// This is a vscode issue.
|
||||||
"C_Cpp.autoAddFileAssociations": false,
|
"C_Cpp.autoAddFileAssociations": false,
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.c": "c",
|
"*.c": "c",
|
||||||
"*.h": "cpp",
|
"*.h": "cpp",
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"*.hxx": "cpp",
|
"*.hxx": "cpp",
|
||||||
"*.py": "python",
|
"*.py": "python",
|
||||||
"*.FCMacro": "python"
|
"*.FCMacro": "python"
|
||||||
},
|
},
|
||||||
|
|
||||||
"editor.formatOnType": true,
|
"editor.formatOnType": true,
|
||||||
"files.autoSave": "afterDelay",
|
"files.autoSave": "afterDelay",
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
// Does not quick launch the debugger, forces to select debugger config every time
|
// Does not quick launch the debugger, forces to select debugger config every time
|
||||||
// Use the debug panel on the left instead
|
// Use the debug panel on the left instead
|
||||||
"debug.showInStatusBar": "never",
|
"debug.showInStatusBar": "never",
|
||||||
|
|
||||||
"cmake.options.advanced": {
|
"cmake.options.advanced": {
|
||||||
"configurePreset": {
|
"configurePreset": {
|
||||||
"statusBarVisibility": "visible"
|
"statusBarVisibility": "visible"
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ void NavlibInterface::removeMarkups(std::string& text) const
|
|||||||
|
|
||||||
const char enclosingChar = *std::prev(markupEnd);
|
const char enclosingChar = *std::prev(markupEnd);
|
||||||
textBegin = text.erase(markupBegin, ++markupEnd);
|
textBegin = text.erase(markupBegin, ++markupEnd);
|
||||||
|
|
||||||
if(enclosingChar == 'p')
|
if(enclosingChar == 'p')
|
||||||
textBegin = text.insert(textBegin, 2, '\n');
|
textBegin = text.insert(textBegin, 2, '\n');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
SoEngineOutput points;
|
SoEngineOutput points;
|
||||||
SoEngineOutput pointCount;
|
SoEngineOutput pointCount;
|
||||||
SoEngineOutput midpoint;
|
SoEngineOutput midpoint;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void evaluate() override;
|
void evaluate() override;
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ void StdCmdLinkMakeGroup::activated(int option) {
|
|||||||
Command::abortCommand();
|
Command::abortCommand();
|
||||||
e.ReportException();
|
e.ReportException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace
|
|||||||
/**
|
/**
|
||||||
* Get some kind of font that is monospaced, suitable for coding.
|
* Get some kind of font that is monospaced, suitable for coding.
|
||||||
*
|
*
|
||||||
* Based on
|
* Based on
|
||||||
* https://stackoverflow.com/questions/18896933/qt-qfont-selection-of-a-monospace-font-doesnt-work
|
* https://stackoverflow.com/questions/18896933/qt-qfont-selection-of-a-monospace-font-doesnt-work
|
||||||
*/
|
*/
|
||||||
QFont getMonospaceFont()
|
QFont getMonospaceFont()
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ wbListItem::wbListItem(const QString& wbName, bool enabled, bool startupWb, bool
|
|||||||
subLayout->setContentsMargins(5, 0, 0, 5);
|
subLayout->setContentsMargins(5, 0, 0, 5);
|
||||||
subWidget->setMinimumSize(250, 0);
|
subWidget->setMinimumSize(250, 0);
|
||||||
subWidget->setAttribute(Qt::WA_TranslucentBackground);
|
subWidget->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
||||||
// 5: Autoloaded checkBox.
|
// 5: Autoloaded checkBox.
|
||||||
autoloadCheckBox = new QCheckBox(this);
|
autoloadCheckBox = new QCheckBox(this);
|
||||||
autoloadCheckBox->setText(tr("Auto-load"));
|
autoloadCheckBox->setText(tr("Auto-load"));
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class RemoteDebugger():
|
|||||||
# It does not have to be FC embedded interpreter.
|
# It does not have to be FC embedded interpreter.
|
||||||
# By default it attempts to use Freecad's PID mistaking it for python.
|
# By default it attempts to use Freecad's PID mistaking it for python.
|
||||||
# https://github.com/microsoft/debugpy/issues/262
|
# https://github.com/microsoft/debugpy/issues/262
|
||||||
debugpy.configure(python=get_python_exe())
|
debugpy.configure(python=get_python_exe())
|
||||||
debugpy.listen((address, port))
|
debugpy.listen((address, port))
|
||||||
debugpy.wait_for_client()
|
debugpy.wait_for_client()
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
if(it == funcs.end())
|
if(it == funcs.end())
|
||||||
return;
|
return;
|
||||||
it->second(this);
|
it->second(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3584,7 +3584,7 @@ void View3DInventorViewer::setAxisLetterColor(const SbColor& color)
|
|||||||
for (unsigned y = 0; y < height; y++) {
|
for (unsigned y = 0; y < height; y++) {
|
||||||
for (unsigned x = 0; x < width; x++) {
|
for (unsigned x = 0; x < width; x++) {
|
||||||
unsigned offset = (y * width + x) * bitdepth;
|
unsigned offset = (y * width + x) * bitdepth;
|
||||||
|
|
||||||
const unsigned char* src = &mask[offset];
|
const unsigned char* src = &mask[offset];
|
||||||
unsigned char* dst = &data[offset];
|
unsigned char* dst = &data[offset];
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ def make_label(target_point=App.Vector(0, 0, 0),
|
|||||||
placement = App.Placement(placement, App.Rotation())
|
placement = App.Placement(placement, App.Rotation())
|
||||||
elif isinstance(placement, App.Rotation):
|
elif isinstance(placement, App.Rotation):
|
||||||
placement = App.Placement(App.Vector(), placement)
|
placement = App.Placement(App.Vector(), placement)
|
||||||
|
|
||||||
if target_object:
|
if target_object:
|
||||||
if isinstance(target_object, (list, tuple)):
|
if isinstance(target_object, (list, tuple)):
|
||||||
_err(translate("draft","Wrong input: target_object must not be a list."))
|
_err(translate("draft","Wrong input: target_object must not be a list."))
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ public:
|
|||||||
* Legacy values are thosed contained in old format files that don't fit in the new
|
* Legacy values are thosed contained in old format files that don't fit in the new
|
||||||
* property format. It should not be used as a catch all for defining a property with
|
* property format. It should not be used as a catch all for defining a property with
|
||||||
* no model.
|
* no model.
|
||||||
*
|
*
|
||||||
* These values are transient and will not be saved.
|
* These values are transient and will not be saved.
|
||||||
*/
|
*/
|
||||||
void setLegacyValue(const QString& name, const QString& value);
|
void setLegacyValue(const QString& name, const QString& value);
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ void MeasureLength::onChanged(const App::Property* prop)
|
|||||||
if (prop == &Elements) {
|
if (prop == &Elements) {
|
||||||
recalculateLength();
|
recalculateLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
MeasureBase::onChanged(prop);
|
MeasureBase::onChanged(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ Base::Placement MeasureLength::getPlacement() {
|
|||||||
|
|
||||||
App::SubObjectT subject{objects.front(), subElements.front().c_str()};
|
App::SubObjectT subject{objects.front(), subElements.front().c_str()};
|
||||||
auto info = getMeasureInfo(subject);
|
auto info = getMeasureInfo(subject);
|
||||||
|
|
||||||
if (!info || !info->valid) {
|
if (!info || !info->valid) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ bool MeasureRadius::isPrioritizedSelection(const App::MeasureSelection& selectio
|
|||||||
//! Set properties from first item in selection. assumes a valid selection.
|
//! Set properties from first item in selection. assumes a valid selection.
|
||||||
void MeasureRadius::parseSelection(const App::MeasureSelection& selection) {
|
void MeasureRadius::parseSelection(const App::MeasureSelection& selection) {
|
||||||
auto element = selection.front();
|
auto element = selection.front();
|
||||||
auto objT = element.object;
|
auto objT = element.object;
|
||||||
|
|
||||||
std::vector<std::string> subElementList { objT.getSubName() };
|
std::vector<std::string> subElementList { objT.getSubName() };
|
||||||
Element.setValue(objT.getObject(), subElementList);
|
Element.setValue(objT.getObject(), subElementList);
|
||||||
@@ -132,7 +132,7 @@ void MeasureRadius::onChanged(const App::Property* prop)
|
|||||||
if (prop == &Element) {
|
if (prop == &Element) {
|
||||||
recalculateRadius();
|
recalculateRadius();
|
||||||
}
|
}
|
||||||
|
|
||||||
MeasureBase::onChanged(prop);
|
MeasureBase::onChanged(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ SET(MeasureGui_SRCS
|
|||||||
DlgPrefsMeasureAppearanceImp.ui
|
DlgPrefsMeasureAppearanceImp.ui
|
||||||
DlgPrefsMeasureAppearanceImp.cpp
|
DlgPrefsMeasureAppearanceImp.cpp
|
||||||
DlgPrefsMeasureAppearanceImp.h
|
DlgPrefsMeasureAppearanceImp.h
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(MeasureGuiTaskDlgs_SRCS
|
SET(MeasureGuiTaskDlgs_SRCS
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class MeasureBasePython(ABC):
|
|||||||
|
|
||||||
@abstractclassmethod
|
@abstractclassmethod
|
||||||
def isPrioritySelection(cls, selection):
|
def isPrioritySelection(cls, selection):
|
||||||
"""Returns True if creation of this measurement should be priorized over other measurements for the given selection"""
|
"""Returns True if creation of this measurement should be prioritized over other measurements for the given selection"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractclassmethod
|
@abstractclassmethod
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ App::DocumentObjectExecReturn* Helix::execute()
|
|||||||
if (boolOp.IsNull())
|
if (boolOp.IsNull())
|
||||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result is not a solid"));
|
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result is not a solid"));
|
||||||
|
|
||||||
|
|
||||||
if (!isSingleSolidRuleSatisfied(boolOp)) {
|
if (!isSingleSolidRuleSatisfied(boolOp)) {
|
||||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
|
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class TestHelix(unittest.TestCase):
|
|||||||
body.addObject(helix)
|
body.addObject(helix)
|
||||||
helix.Profile = profileSketch
|
helix.Profile = profileSketch
|
||||||
helix.ReferenceAxis = (profileSketch,"V_Axis")
|
helix.ReferenceAxis = (profileSketch,"V_Axis")
|
||||||
helix.Placement = FreeCAD.Placement(FreeCAD.Vector(0,0,0),
|
helix.Placement = FreeCAD.Placement(FreeCAD.Vector(0,0,0),
|
||||||
FreeCAD.Rotation(FreeCAD.Vector(0,0,1),0),
|
FreeCAD.Rotation(FreeCAD.Vector(0,0,1),0),
|
||||||
FreeCAD.Vector(0,0,0))
|
FreeCAD.Vector(0,0,0))
|
||||||
helix.Pitch = 3
|
helix.Pitch = 3
|
||||||
@@ -119,7 +119,7 @@ class TestHelix(unittest.TestCase):
|
|||||||
helix.Height = 150
|
helix.Height = 150
|
||||||
helix.Turns = 3
|
helix.Turns = 3
|
||||||
helix.Angle = 0
|
helix.Angle = 0
|
||||||
helix.Mode = 0
|
helix.Mode = 0
|
||||||
self.Doc.recompute()
|
self.Doc.recompute()
|
||||||
bbox = helix.Shape.BoundBox
|
bbox = helix.Shape.BoundBox
|
||||||
self.assertAlmostEqual(bbox.YMin,0)
|
self.assertAlmostEqual(bbox.YMin,0)
|
||||||
@@ -171,7 +171,7 @@ class TestHelix(unittest.TestCase):
|
|||||||
helix.Height = 110
|
helix.Height = 110
|
||||||
helix.Turns = 2.2
|
helix.Turns = 2.2
|
||||||
helix.Angle = 30
|
helix.Angle = 30
|
||||||
helix.Mode = 0
|
helix.Mode = 0
|
||||||
helix.Reversed = True
|
helix.Reversed = True
|
||||||
self.Doc.recompute()
|
self.Doc.recompute()
|
||||||
self.assertAlmostEqual(helix.Shape.Volume/1e5, 3.8828,places=4)
|
self.assertAlmostEqual(helix.Shape.Volume/1e5, 3.8828,places=4)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
fbo = new QtGLFramebufferObject(v->getGLWidget()->size());
|
fbo = new QtGLFramebufferObject(v->getGLWidget()->size());
|
||||||
fbo->bind();
|
fbo->bind();
|
||||||
fbo->release();
|
fbo->release();
|
||||||
|
|
||||||
view->getSoRenderManager()->scheduleRedraw();
|
view->getSoRenderManager()->scheduleRedraw();
|
||||||
}
|
}
|
||||||
#ifndef GL_MULTISAMPLE
|
#ifndef GL_MULTISAMPLE
|
||||||
|
|||||||
Reference in New Issue
Block a user