From a71f49f4f61a3849e69a99daf19c79f19431889d Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 23 Jul 2024 12:13:36 +0000 Subject: [PATCH] Fix trailing newlines and minor typo fixes --- contrib/.vscode/launch.json | 4 ++-- contrib/.vscode/settings.json | 12 ++++++------ src/Gui/3Dconnexion/navlib/NavlibCmds.cpp | 2 +- src/Gui/ArcEngine.h | 2 +- src/Gui/CommandLink.cpp | 2 +- src/Gui/PreferencePages/DlgSettingsEditor.cpp | 2 +- .../PreferencePages/DlgSettingsWorkbenchesImp.cpp | 2 +- src/Gui/RemoteDebugger.py | 2 +- src/Gui/TreeParams.cpp | 2 +- src/Gui/View3DInventorViewer.cpp | 2 +- src/Mod/Draft/draftmake/make_label.py | 2 +- src/Mod/Material/App/Materials.h | 2 +- src/Mod/Measure/App/MeasureLength.cpp | 4 ++-- src/Mod/Measure/App/MeasureRadius.cpp | 4 ++-- src/Mod/Measure/Gui/CMakeLists.txt | 2 +- src/Mod/Measure/UtilsMeasure.py | 2 +- src/Mod/PartDesign/App/FeatureHelix.cpp | 2 +- src/Mod/PartDesign/PartDesignTests/TestHelix.py | 6 +++--- src/Mod/Sandbox/Gui/Overlay.cpp | 2 +- 19 files changed, 29 insertions(+), 29 deletions(-) diff --git a/contrib/.vscode/launch.json b/contrib/.vscode/launch.json index 5a61dbabec..a10227e4aa 100644 --- a/contrib/.vscode/launch.json +++ b/contrib/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "cppdbg", "request": "launch", "cwd": "${workspaceFolder}", - "program": "${command:cmake.buildDirectory}/tests/Tests_run", + "program": "${command:cmake.buildDirectory}/tests/Tests_run", "args": [], "environment": [ { @@ -33,7 +33,7 @@ "type": "cppdbg", "request": "launch", "cwd": "${workspaceFolder}", - "program": "${command:cmake.buildDirectory}/bin/FreeCAD", + "program": "${command:cmake.buildDirectory}/bin/FreeCAD", "args": ["${workspaceFolder}/.vscode/scripts/VSCodeAutostartDebug.FCMacro"], "environment": [ { diff --git a/contrib/.vscode/settings.json b/contrib/.vscode/settings.json index 39cd9cbf14..9a624ce531 100644 --- a/contrib/.vscode/settings.json +++ b/contrib/.vscode/settings.json @@ -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. // This is a vscode issue. - "C_Cpp.autoAddFileAssociations": false, + "C_Cpp.autoAddFileAssociations": false, "files.associations": { "*.c": "c", "*.h": "cpp", @@ -12,7 +12,7 @@ "*.hxx": "cpp", "*.py": "python", "*.FCMacro": "python" - }, + }, "editor.formatOnType": true, "files.autoSave": "afterDelay", @@ -20,8 +20,8 @@ // Does not quick launch the debugger, forces to select debugger config every time // Use the debug panel on the left instead - "debug.showInStatusBar": "never", - + "debug.showInStatusBar": "never", + "cmake.options.advanced": { "configurePreset": { "statusBarVisibility": "visible" diff --git a/src/Gui/3Dconnexion/navlib/NavlibCmds.cpp b/src/Gui/3Dconnexion/navlib/NavlibCmds.cpp index 75f84e7765..0afd278db2 100644 --- a/src/Gui/3Dconnexion/navlib/NavlibCmds.cpp +++ b/src/Gui/3Dconnexion/navlib/NavlibCmds.cpp @@ -115,7 +115,7 @@ void NavlibInterface::removeMarkups(std::string& text) const const char enclosingChar = *std::prev(markupEnd); textBegin = text.erase(markupBegin, ++markupEnd); - + if(enclosingChar == 'p') textBegin = text.insert(textBegin, 2, '\n'); } diff --git a/src/Gui/ArcEngine.h b/src/Gui/ArcEngine.h index fdba1b6299..b153e8b756 100644 --- a/src/Gui/ArcEngine.h +++ b/src/Gui/ArcEngine.h @@ -60,7 +60,7 @@ public: SoEngineOutput points; SoEngineOutput pointCount; SoEngineOutput midpoint; - + protected: void evaluate() override; private: diff --git a/src/Gui/CommandLink.cpp b/src/Gui/CommandLink.cpp index fae114e310..812353de6c 100644 --- a/src/Gui/CommandLink.cpp +++ b/src/Gui/CommandLink.cpp @@ -197,7 +197,7 @@ void StdCmdLinkMakeGroup::activated(int option) { Command::abortCommand(); e.ReportException(); } -} +} //////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/Gui/PreferencePages/DlgSettingsEditor.cpp b/src/Gui/PreferencePages/DlgSettingsEditor.cpp index 65b44ced5f..f260886f8d 100644 --- a/src/Gui/PreferencePages/DlgSettingsEditor.cpp +++ b/src/Gui/PreferencePages/DlgSettingsEditor.cpp @@ -52,7 +52,7 @@ namespace /** * 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 */ QFont getMonospaceFont() diff --git a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp index ab95f76874..b91c19a614 100644 --- a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp +++ b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp @@ -124,7 +124,7 @@ wbListItem::wbListItem(const QString& wbName, bool enabled, bool startupWb, bool subLayout->setContentsMargins(5, 0, 0, 5); subWidget->setMinimumSize(250, 0); subWidget->setAttribute(Qt::WA_TranslucentBackground); - + // 5: Autoloaded checkBox. autoloadCheckBox = new QCheckBox(this); autoloadCheckBox->setText(tr("Auto-load")); diff --git a/src/Gui/RemoteDebugger.py b/src/Gui/RemoteDebugger.py index 637d757074..040828f591 100644 --- a/src/Gui/RemoteDebugger.py +++ b/src/Gui/RemoteDebugger.py @@ -54,7 +54,7 @@ class RemoteDebugger(): # It does not have to be FC embedded interpreter. # By default it attempts to use Freecad's PID mistaking it for python. # https://github.com/microsoft/debugpy/issues/262 - debugpy.configure(python=get_python_exe()) + debugpy.configure(python=get_python_exe()) debugpy.listen((address, port)) debugpy.wait_for_client() diff --git a/src/Gui/TreeParams.cpp b/src/Gui/TreeParams.cpp index 50d7c0a110..ffff611458 100644 --- a/src/Gui/TreeParams.cpp +++ b/src/Gui/TreeParams.cpp @@ -179,7 +179,7 @@ public: if(it == funcs.end()) return; it->second(this); - + } diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index a54cc3bdfa..4979b07400 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -3584,7 +3584,7 @@ void View3DInventorViewer::setAxisLetterColor(const SbColor& color) for (unsigned y = 0; y < height; y++) { for (unsigned x = 0; x < width; x++) { unsigned offset = (y * width + x) * bitdepth; - + const unsigned char* src = &mask[offset]; unsigned char* dst = &data[offset]; diff --git a/src/Mod/Draft/draftmake/make_label.py b/src/Mod/Draft/draftmake/make_label.py index 72aa4ebf69..51c58e72b0 100644 --- a/src/Mod/Draft/draftmake/make_label.py +++ b/src/Mod/Draft/draftmake/make_label.py @@ -217,7 +217,7 @@ def make_label(target_point=App.Vector(0, 0, 0), placement = App.Placement(placement, App.Rotation()) elif isinstance(placement, App.Rotation): placement = App.Placement(App.Vector(), placement) - + if target_object: if isinstance(target_object, (list, tuple)): _err(translate("draft","Wrong input: target_object must not be a list.")) diff --git a/src/Mod/Material/App/Materials.h b/src/Mod/Material/App/Materials.h index 7f88aaf963..46ae8d9943 100644 --- a/src/Mod/Material/App/Materials.h +++ b/src/Mod/Material/App/Materials.h @@ -313,7 +313,7 @@ public: * 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 * no model. - * + * * These values are transient and will not be saved. */ void setLegacyValue(const QString& name, const QString& value); diff --git a/src/Mod/Measure/App/MeasureLength.cpp b/src/Mod/Measure/App/MeasureLength.cpp index 78de1389cc..05de86720f 100644 --- a/src/Mod/Measure/App/MeasureLength.cpp +++ b/src/Mod/Measure/App/MeasureLength.cpp @@ -127,7 +127,7 @@ void MeasureLength::onChanged(const App::Property* prop) if (prop == &Elements) { recalculateLength(); } - + MeasureBase::onChanged(prop); } @@ -142,7 +142,7 @@ Base::Placement MeasureLength::getPlacement() { App::SubObjectT subject{objects.front(), subElements.front().c_str()}; auto info = getMeasureInfo(subject); - + if (!info || !info->valid) { return {}; } diff --git a/src/Mod/Measure/App/MeasureRadius.cpp b/src/Mod/Measure/App/MeasureRadius.cpp index 96bf88d3af..0958a0fc1a 100644 --- a/src/Mod/Measure/App/MeasureRadius.cpp +++ b/src/Mod/Measure/App/MeasureRadius.cpp @@ -104,7 +104,7 @@ bool MeasureRadius::isPrioritizedSelection(const App::MeasureSelection& selectio //! Set properties from first item in selection. assumes a valid selection. void MeasureRadius::parseSelection(const App::MeasureSelection& selection) { auto element = selection.front(); - auto objT = element.object; + auto objT = element.object; std::vector subElementList { objT.getSubName() }; Element.setValue(objT.getObject(), subElementList); @@ -132,7 +132,7 @@ void MeasureRadius::onChanged(const App::Property* prop) if (prop == &Element) { recalculateRadius(); } - + MeasureBase::onChanged(prop); } diff --git a/src/Mod/Measure/Gui/CMakeLists.txt b/src/Mod/Measure/Gui/CMakeLists.txt index 653d53e168..a0995711af 100644 --- a/src/Mod/Measure/Gui/CMakeLists.txt +++ b/src/Mod/Measure/Gui/CMakeLists.txt @@ -64,7 +64,7 @@ SET(MeasureGui_SRCS DlgPrefsMeasureAppearanceImp.ui DlgPrefsMeasureAppearanceImp.cpp DlgPrefsMeasureAppearanceImp.h - + ) SET(MeasureGuiTaskDlgs_SRCS diff --git a/src/Mod/Measure/UtilsMeasure.py b/src/Mod/Measure/UtilsMeasure.py index 1fc5d12efe..af131d2886 100644 --- a/src/Mod/Measure/UtilsMeasure.py +++ b/src/Mod/Measure/UtilsMeasure.py @@ -31,7 +31,7 @@ class MeasureBasePython(ABC): @abstractclassmethod 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 @abstractclassmethod diff --git a/src/Mod/PartDesign/App/FeatureHelix.cpp b/src/Mod/PartDesign/App/FeatureHelix.cpp index ace36c1c81..24b727deff 100644 --- a/src/Mod/PartDesign/App/FeatureHelix.cpp +++ b/src/Mod/PartDesign/App/FeatureHelix.cpp @@ -271,7 +271,7 @@ App::DocumentObjectExecReturn* Helix::execute() if (boolOp.IsNull()) return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result is not a solid")); - + if (!isSingleSolidRuleSatisfied(boolOp)) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids")); } diff --git a/src/Mod/PartDesign/PartDesignTests/TestHelix.py b/src/Mod/PartDesign/PartDesignTests/TestHelix.py index 3be150af22..fb5c917928 100644 --- a/src/Mod/PartDesign/PartDesignTests/TestHelix.py +++ b/src/Mod/PartDesign/PartDesignTests/TestHelix.py @@ -78,7 +78,7 @@ class TestHelix(unittest.TestCase): body.addObject(helix) helix.Profile = profileSketch 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.Vector(0,0,0)) helix.Pitch = 3 @@ -119,7 +119,7 @@ class TestHelix(unittest.TestCase): helix.Height = 150 helix.Turns = 3 helix.Angle = 0 - helix.Mode = 0 + helix.Mode = 0 self.Doc.recompute() bbox = helix.Shape.BoundBox self.assertAlmostEqual(bbox.YMin,0) @@ -171,7 +171,7 @@ class TestHelix(unittest.TestCase): helix.Height = 110 helix.Turns = 2.2 helix.Angle = 30 - helix.Mode = 0 + helix.Mode = 0 helix.Reversed = True self.Doc.recompute() self.assertAlmostEqual(helix.Shape.Volume/1e5, 3.8828,places=4) diff --git a/src/Mod/Sandbox/Gui/Overlay.cpp b/src/Mod/Sandbox/Gui/Overlay.cpp index 88d104e397..d50db9df6d 100644 --- a/src/Mod/Sandbox/Gui/Overlay.cpp +++ b/src/Mod/Sandbox/Gui/Overlay.cpp @@ -66,7 +66,7 @@ public: fbo = new QtGLFramebufferObject(v->getGLWidget()->size()); fbo->bind(); fbo->release(); - + view->getSoRenderManager()->scheduleRedraw(); } #ifndef GL_MULTISAMPLE