Skip to content

Commit

Permalink
Fix trailing newlines and minor typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz committed Jul 23, 2024
1 parent ec58666 commit 78d97b1
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions contrib/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -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": [
{
Expand Down
12 changes: 6 additions & 6 deletions contrib/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -12,16 +12,16 @@
"*.hxx": "cpp",
"*.py": "python",
"*.FCMacro": "python"
},
},

"editor.formatOnType": true,
"files.autoSave": "afterDelay",
"debug.onTaskErrors": "abort", //to not launch the python debugger when waitforport.py fails

// 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"
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/3Dconnexion/navlib/NavlibCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/ArcEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class GuiExport ArcEngine : public SoEngine
SoEngineOutput points;
SoEngineOutput pointCount;
SoEngineOutput midpoint;

protected:
void evaluate() override;
private:
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/CommandLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void StdCmdLinkMakeGroup::activated(int option) {
Command::abortCommand();
e.ReportException();
}
}
}

////////////////////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion src/Gui/PreferencePages/DlgSettingsEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/RemoteDebugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def accept(self):
# 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()

Expand Down
2 changes: 1 addition & 1 deletion src/Gui/TreeParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class TreeParamsP: public ParameterGrp::ObserverType {
if(it == funcs.end())
return;
it->second(this);

}


Expand Down
2 changes: 1 addition & 1 deletion src/Gui/View3DInventorViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Draft/draftmake/make_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."))
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Material/App/Materials.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class MaterialsExport Material: public Base::BaseClass
* 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);
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Measure/App/MeasureLength.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void MeasureLength::onChanged(const App::Property* prop)
if (prop == &Elements) {
recalculateLength();
}

MeasureBase::onChanged(prop);
}

Expand All @@ -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 {};
}
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Measure/App/MeasureRadius.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> subElementList { objT.getSubName() };
Element.setValue(objT.getObject(), subElementList);
Expand Down Expand Up @@ -132,7 +132,7 @@ void MeasureRadius::onChanged(const App::Property* prop)
if (prop == &Element) {
recalculateRadius();
}

MeasureBase::onChanged(prop);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Measure/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ SET(MeasureGui_SRCS
DlgPrefsMeasureAppearanceImp.ui
DlgPrefsMeasureAppearanceImp.cpp
DlgPrefsMeasureAppearanceImp.h

)

SET(MeasureGuiTaskDlgs_SRCS
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Measure/UtilsMeasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def isValidSelection(cls, selection):

@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
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/PartDesign/App/FeatureHelix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/PartDesign/PartDesignTests/TestHelix.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def testCircleQ1(self):
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
Expand Down Expand Up @@ -119,7 +119,7 @@ def testRectangle(self):
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)
Expand Down Expand Up @@ -171,7 +171,7 @@ def testCone(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Sandbox/Gui/Overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MyPaintable : public Gui::GLGraphicsItem
fbo = new QtGLFramebufferObject(v->getGLWidget()->size());
fbo->bind();
fbo->release();

view->getSoRenderManager()->scheduleRedraw();
}
#ifndef GL_MULTISAMPLE
Expand Down

0 comments on commit 78d97b1

Please sign in to comment.