Chris Hennes
e2bb84fd2f
[Tools] Fix static analyis issues
...
This commit addresses issues identified by LGTM for the various
independent (and mostly-independent) files in the Tools subdirectory.
The vast majority of the issues are trivial, and are things like unused
imports or catching BaseException. There was one true bug identified, a
global variable being changed in a function where it was not marked
global, but it only affected output quantity (the variable is named
"VERBOSE"). A couple of other issues identified variables that appear to
represent no-longer-existing options in the code. The options were left,
but a deprecation printout replaces the variable in the event the option
is provided.
2021-02-28 17:53:04 +01:00
luz paz
bcb070def1
Crowdin: Startpage - add whitespace to tooltip [skip ci]
2021-02-28 17:15:08 +01:00
luz paz
2ff669e5b8
Crowdin: Startpage: remove obsolete translation [skip ci]
2021-02-28 17:15:08 +01:00
luz paz
e0b5aade34
Crowdin: StartPage - remove obsolete translation [skip ci]
...
Ticket 0004578
ref: https://crowdin.com/translate/freecad/7254/en-en?filter=basic&value=0#6572932
2021-02-28 17:15:08 +01:00
wmayer
223d7971ae
Sketcher: fixes #0004303 : Three choices in a Sketcher menu each with the same Ctrl+Shift+E 'address'
2021-02-28 13:14:48 +01:00
wmayer
f0e4265205
Image: fixes #0003959 : Created image plane is not proportional to loaded image
2021-02-28 13:14:30 +01:00
wmayer
59048fb95b
Tux: fixes #0004565 : Status bar text runs under Navigation Button
2021-02-28 13:14:05 +01:00
wmayer
957eed7d2c
Gui: [skip ci] allow to unbind() an ExpressionBinding and automatically unbind it if the observed object has been deleted
...
For more details see: https://forum.freecadweb.org/viewtopic.php?f=8&t=56097
2021-02-28 12:37:50 +01:00
Chris Hennes
2599d67c2b
Clean up various LGTM-flagged items
...
Static analysis showed some unused variables and imports, and running
the code in Python 3.9 revealed a few invalid escapes (previous versions
of Python silently "fixed" these, so the code change here will not
affect the results).
2021-02-27 18:23:15 +01:00
Chris Hennes
283d09dc1a
[DRAFT] Add call to super().__init__ where missing
...
Identified by LGTM. The toplevel superclass does initialize one data
member to an empty array, but this didn't appear to cause any problems.
2021-02-27 18:21:54 +01:00
Chris Hennes
a432480e8d
[Part] Fix signature of TempoVis dummy function
...
If the import of TempoVis fails, TaskAttachmentEditor creates s dummy
function to replace the real TempoVis function. That function's
signature did not match the real TempoVis. Caught by LGTM.
2021-02-27 18:21:05 +01:00
Chris Hennes
b1789ae7d2
[PD] Fix minor static analysis issues in FCGear
...
LGTM has identified a number of minor issues with the FCGear Part Design
scripts. This commit addresses each of them, and also corrects two minor
spelling errors in the dialog. None of the errors or their fixes are
expected to result in changes to the functionality of the script.
2021-02-27 18:20:32 +01:00
David Osterberg
16ff933b09
PartDesign: Transformded. Align the "property category" of Refine with other PD commands
2021-02-27 18:19:14 +01:00
wmayer
82354979c9
Gui: [skip ci] fix memory leak in SelectionFilter
2021-02-27 18:17:52 +01:00
wmayer
bd755b654b
Gui: [skip ci] re-add removed Py_INCREF of module
2021-02-27 11:13:30 +01:00
wmayer
df0f979f3b
App/Gui: fix memory leaks:
...
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
wmayer
5d5d05616f
App: [skip ci] AddressSanitizer: heap-use-after-free
...
When removing a dynamic property its myName member must be nullified as the memory has been de-allocated
2021-02-27 02:21:14 +01:00
wmayer
b2ca86d8d7
FEM: [skip ci] fix crash in Constraint::getDirection
2021-02-26 08:11:16 +01:00
helaslo
d29fd7d9cb
[OpenSCAD] Fix colors not working correctly when polygons are extruded
2021-02-25 15:08:19 +01:00
Yorik van Havre
29bbb5e14f
Merge branch 'master' of github.com:FreeCAD/FreeCAD
2021-02-25 13:30:09 +01:00
Yorik van Havre
958009c2ca
Merged crowdin translations
2021-02-25 13:27:48 +01:00
Aapo
7900a069c2
[TD] DrawViewPart.cpp: Fix a crash when user sets the PropertyVector Direction to zero.
2021-02-25 12:40:59 +01:00
wmayer
20bcce1544
TD: [skip ci] implement DrawView::recompute to handle all OCC exception types
2021-02-25 12:39:50 +01:00
wmayer
5b864424db
Gui: [skip ci] improve exception handling:
...
* handle all exceptions in Application::onLastWindowClosed because this method can be (indirectly) called from ~BaseView and would otherwise trigger std::terminate()
* handle exceptions in PropertyEditor::closeTransaction() because when recomputing a document while closing it leaves the editor in a bad state
2021-02-25 12:23:13 +01:00
wmayer
17a848dfe1
TD: [skip ci] explicitly nullify geometryObject in DrawViewPart::partExec to avoid to leave it a dangling pointer in case makeGeometryForShape raises an exception
2021-02-25 11:34:29 +01:00
luz paz
4e5cfec623
Crowdin: removing obsolete strings from PartDesign.ts [skip ci]
...
Uncertain to why but lupdate is not removing obsolete strings from `PartDesign.ts`. This PR manually removes obsoletes strings from it.
ref:
https://crowdin.com/translate/freecad/564/en-de?filter=basic&value=0#6500474
https://crowdin.com/translate/freecad/564/en-en?filter=basic&value=0#6500475
2021-02-25 10:41:58 +01:00
wmayer
879ab9ed84
Crowdin: Gui: move whitespace out of translation string [skip ci]
2021-02-25 10:38:52 +01:00
luz paz
2300c44451
Crowdin: fix trailing whitespace [skip ci]
...
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6577470
2021-02-25 10:31:59 +01:00
luz paz
81dbae551f
Crowdin: Gui: fix user-facing typo in Document.cpp [skip ci]
...
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6584664
2021-02-25 10:31:33 +01:00
Aapo
51194d67d5
[TD] Hotfix for Dimension label Arbitrary value regression in DrawViewDimension.cpp
2021-02-25 10:28:42 +01:00
wmayer
460426c038
Gui: [skip ci] make Save logic of text document more intuitive
2021-02-25 10:17:51 +01:00
wmayer
8be8c08b47
FEM: [skip ci] fixes #0004405 : Using PartDesign axis / plane as direction for constraints
2021-02-24 23:59:10 +01:00
wmayer
7a56781285
FEM: [skip ci] support Line and Plane objects in Constraint::getDirection()
2021-02-24 23:53:15 +01:00
wmayer
ab0a660963
FEM: [skip ci] connect onButtonDirection() slot with clicked() signal
2021-02-24 21:55:51 +01:00
wmayer
a95cd106bb
PD: [skip ci] remove invalid static_cast
2021-02-24 20:12:26 +01:00
Yorik van Havre
5ba28fa7ff
Merged crowdin translations
2021-02-24 18:07:59 +01:00
wmayer
bc5311b3ee
PD: fixes #0004567 : Pattern from a feature type UpToFace and Offset > copy whole body
2021-02-24 17:08:20 +01:00
wmayer
2389b4779a
PD: [skip ci] code refactoring
...
Move adding offset to face from getUpToFace() to addOffsetToFace()
2021-02-24 16:08:03 +01:00
sliptonic
7149c80f81
Merge pull request #4520 from sliptonic/bug/translations
...
[PATH] Bug/translation issues
2021-02-23 19:27:53 -06:00
sliptonic
a6fd02cb04
Fix whitespace error
2021-02-23 19:14:49 -06:00
sliptonic
fa5dc51491
fix trailing whitespace
2021-02-23 19:12:25 -06:00
sliptonic
315d4a8026
fix bad string formatting
2021-02-23 19:06:08 -06:00
sliptonic
b2283c5430
Make string less ambiguous
2021-02-23 19:03:18 -06:00
sliptonic
85bd1bf639
typo in string
2021-02-23 19:01:29 -06:00
sliptonic
f7c50a4d75
fix string formatting
2021-02-23 18:59:04 -06:00
Yorik van Havre
3ef181a751
AddonManager: Fixed missing WB icons
2021-02-23 18:01:04 +01:00
wmayer
1939b93fa7
Gui: [skip ci] fixes #0004104 : Void property value defaults to 1
2021-02-23 17:32:02 +01:00
luz paz
9b31018b2e
Crowdin: Gui: fix DlgSettings3DView.ui tooltip [skip ci]
...
Remove trailing whitespace
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6577482
2021-02-23 17:01:54 +01:00
wmayer
7cf4d4b01e
App: [skip ci] AddressSanitizer: heap-use-after-free
...
In Document::removeObject() do not access object after it has been possibly deleted
2021-02-23 14:30:00 +01:00
wmayer
eed7357674
PD: [skip ci] AddressSanitizer: stack-use-after-scope
...
Axis() returns a tmp. object and thus we cannot use a const reference to get its Location() method
2021-02-23 13:57:51 +01:00