Commit Graph

18 Commits

Author SHA1 Message Date
wmayer
6f5259af26 App: Apply clang format (part 1) 2024-11-21 07:54:24 +01:00
André Caldas
89dbab9b0e Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
wmayer
af8c05c507 App: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
berniev
85170b2879 remove redundant void 2022-07-31 10:27:44 +02:00
wmayer
ab6c75fad9 Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
marioalexis
1bc43b8606 App: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
wmayer
1a20b7f119 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
wmayer
e4d1ed8366 Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
1f12dca2b4 Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
wmayer
08b77bff08 Core/Mod: modernize C++11
* use nullptr
2022-03-09 21:55:31 +01:00
Uwe
9d30b0af6a [App] Feature: remove unused includes 2022-02-27 16:37:29 +01:00
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
wmayer
3a0c3499e5 improve whitespaces 2017-09-09 18:07:46 +02:00
Stefan Tröger
8841fb0805 Make PartDesign::Boolean work with new Link structure
This is the first feature that used GeoFeatureGroupExtension and required links to the groups inside as well as to things on the same level. Hence a few modifications to link scopes have been nesseccary.
2017-09-09 16:55:55 +02:00
Stefan Tröger
b4c43df312 Allow add/remove multiple objects in a group 2017-06-19 15:37:09 +02:00
Stefan Tröger
ce9a078584 GeoFeatureGroup: Handle drag into document 2017-06-19 15:37:09 +02:00
Stefan Tröger
0ae9346b3c Extenions: Drop virtual inheritance
Due to problems onthe windows platform the virtual inheritance approach must be dropped. NExt to the already reimplemented proeprty interface the Type interface is reimplemented too. This change allows to revert some earlier changes.
2016-10-08 12:48:34 +02:00
Stefan Tröger
c0f243fa3b Extensions: bring files in correct order 2016-10-08 12:48:34 +02:00