Commit Graph

1150 Commits

Author SHA1 Message Date
wmayer
51585ac4a1 Coverity: Not restoring ostream format 2020-07-20 17:34:29 +02:00
wmayer
6dc9a89d97 Coverity: Empty virtual destructor 2020-07-20 17:34:27 +02:00
wmayer
43d9e82f97 Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
wmayer
421f6c52cb Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
aa3fde2dae Coverity: Big parameter passed by value 2020-07-20 17:34:25 +02:00
wmayer
0e279348f1 Coverity: Use after free (_removeObject may delete the DocumentObject) 2020-07-20 17:34:24 +02:00
wmayer
d562c52fdc PVS: V571 Recurring check. A condition was already verified in previous line 2020-07-18 10:59:28 +02:00
wmayer
6e00846cdd PVS: V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing. 2020-07-18 10:59:28 +02:00
wmayer
af9c5274b4 PVS: V688 The local variable possesses the same name as one of the class members, which can result in a confusion 2020-07-18 10:59:28 +02:00
wmayer
16f953ad65 PVS: V1004 A pointer was used unsafely after it was verified against nullptr 2020-07-18 10:59:27 +02:00
wmayer
e785f9527e PVS: V529 Odd semicolon ';' after 'for' operator. 2020-07-18 10:59:27 +02:00
wmayer
53a4cb9919 PVS: V501 There are identical sub-expressions to the left and to the right 2020-07-18 10:59:27 +02:00
wmayer
cbb5f99ade PVS: V730 Not all members of a class are initialized inside the constructor 2020-07-18 10:59:27 +02:00
wmayer
17a25e0903 fix docstring and segmentation fault in Application::sNewDocument 2020-07-14 19:46:17 +02:00
Zheng, Lei
536051179b App/Gui: introduce temporary document
Add new argument to Application::newDocument() to create a temporary
    document. Also exposed to Python API App.newDocument() with a named
    argument 'temp'.

    The temporary document is marked with status bit 'TempDoc'. The user
    will not be prompt for saving when closing. The undo/redo is disabled.
    The AutoSaver skips it. And the tree view will not show it.
    PropertyXLink allows linking to/from object within a temporary document
    without saving.
2020-07-14 19:36:05 +02:00
luz paz
83f34a1e5b Fix Crowdin typos and various other typos/grammar [skip ci]
Found via codespell v2.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-07-12 11:42:27 +02:00
Zheng, Lei
750c169a6c App: fix Material comparison operator 2020-07-05 16:25:17 +02:00
luz.paz
1da81df756 Fix typos [skip-ci]
Found via codespell v1.18.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-06-29 20:52:23 +02:00
wmayer
962f3e0504 App: [skip ci] extend doc string of Document.findObjects 2020-06-29 18:51:01 +02:00
Bernd Hahnebach
fe93f6027e App: properties, add vacuum permittivity 2020-06-29 17:46:41 +02:00
wmayer
79e11ce8a1 App: extend Document::findObject to allow to search by label 2020-06-27 15:58:23 +02:00
wmayer
771b4738a1 Gui: implement property editor for vector list 2020-06-22 22:28:15 +02:00
wmayer
daec778694 [skip ci] improve possibility to create a QApplication in a thread 2020-06-21 00:07:21 +02:00
wmayer
76aac3a221 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4a64679422 Gui: [skip ci] show program version a file was created with in project information dialog 2020-06-14 17:52:02 +02:00
Abdullah Tahiri
df4a8eb7ab Document/DocumentObject: onUndoRedoFinished()
=============================================

New mechanism for on-demand signaling of undo/redo transaction finalisation.

The mechanism consists of:
1) A status bit that is set, when an object should receive this signaling (e.g. because changes during transaction have been inhibited)
2) The new function to be called by the Document undo/redo actions when the transaction is over (for those objects having the status bit set).

Note 1: The undo/redo signals are now outside the undoing FlagToggler, this means that:
1) a call to isPerformingTransaction will return false.
2) a recompute the slot of such a signal will not be inhibited.

Note 2: The undo/redo signals are called once the documentobjects that requested to be notified after the trasaction is over have been notified.
The consequence is that the viewprovider can rely on the documentobject having a correct status.

I think that the behaviour of Note and Note 2 is the wanted behaviour of this signals, I cannot rule out that other parts of FC rely on the old
implementation.
2020-06-14 14:44:28 +02:00
wmayer
033ddff089 cast between incompatible function types from 'PyObject* (*)(PyObject*, PyObject*, PyObject*)' {aka '_object* (*)(_object*, _object*, _object*)'} to 'PyCFunction' {aka '_object* (*)(_object*, _object*)'} [-Wcast-function-type] 2020-06-12 17:51:33 +02:00
wmayer
db3f9008c0 boost: remove broken define that causes a warning: ISO C++11 requires whitespace after the macro name 2020-06-12 17:51:33 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
97701e3a73 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-12 17:51:33 +02:00
wmayer
d14e17c558 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-12 17:51:33 +02:00
donovaly
fe6dfabbb4 [App] fix a typo 2020-06-09 12:03:07 +02:00
wmayer
89ddab33f6 Expression: move handling of invalid quantities (NaN) from FunctionExpression to DlgExpressionInput 2020-06-07 18:00:35 +02:00
wmayer
0a8c6e36a1 [skip ci] include missing boost header 2020-06-07 15:54:34 +02:00
wmayer
e911974159 App: [skip ci] handle XMLAttributeError in Document::readObjects 2020-06-07 14:25:32 +02:00
wmayer
f98b948866 Revert "App: [skip ci] avoid that Origin makes persistent any properties of its extension"
This reverts commit 457dba4fee.
2020-06-07 10:44:12 +02:00
Abdullah Tahiri
ac4196fb66 Expressions: Avoid multiline error messages
===========================================

fixes #4324

A multiline error message produces poor visualisation when used in the UI, while
there is no need for it to be multiline.
2020-06-06 20:20:10 +02:00
wmayer
9801519409 App: [skip ci] correctly mapping of sub-feature name to role name of an Origin feature 2020-06-06 15:46:48 +02:00
wmayer
b7f56e43be App: [skip ci] in dependency graph make sure that an Origin stays inside the Body or Part container 2020-06-06 13:48:25 +02:00
wmayer
45c2e5cb21 App: [skip ci] throw an exception if the expression gives NaN 2020-06-06 13:04:01 +02:00
wmayer
5b5ea24b63 App: [skip ci] suppress false warning 2020-06-06 10:54:16 +02:00
wmayer
457dba4fee App: [skip ci] avoid that Origin makes persistent any properties of its extension 2020-06-05 18:27:56 +02:00
wmayer
1521b256bc App: [skip ci] implement the private class OriginExtension to simulate a geometric group behaviour 2020-06-05 18:24:17 +02:00
wmayer
229e8dd375 App: implement the private class OriginExtension to simulate a geometric group behaviour 2020-06-05 18:17:40 +02:00
Zheng, Lei
3beb1bff21 App: improve FunctionExpression forward compatibility
Remove runtime check when constructing FunctionExpression, in order to
support future built-in function. Exception will be thrown when
evaluating the expression to inform user about the error.
2020-06-03 22:18:39 +02:00
Zheng, Lei
516a005ced App: fix PropertyXLinkList/SubList::getValues() 2020-06-03 14:34:20 +02:00
Zheng, Lei
e0199b3a8f App: fix PropertyXLink(Sub) python input/output 2020-06-03 14:34:20 +02:00
wmayer
300e887480 Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
2020-05-25 15:34:43 +02:00
Syres916
fe2664ec65 [Gui] Material, Appearance, make Chrome colour..
..lighter and therefore more realistic. See discussion on French forum https://forum.freecadweb.org/viewtopic.php?f=12&t=46581
2020-05-25 13:38:30 +02:00