Commit Graph

327 Commits

Author SHA1 Message Date
PaddleStroke
5f4dd814ea Core: Add getRootObjectsIgnoreLinks and fix bugs in tree.cpp and AssemblyObject.cpp, CommandInsertLink.py, UtilsAssembly.py 2024-05-13 17:58:34 +02:00
Ladislav Michl
a691d6fcdc Base: Use std::chrono for time handling
Replace platform specific implementations with standard C++ std::chrono.
As time_t is now 64-bit on all supported systems, use it to set the clock.
2024-03-05 12:22:40 +01:00
Ladislav Michl
7b70d3fc6f Base: Move currentDateTimeString out of TimeInfo
currentDateTimeString does not have anything in common
with TimeInfo class, move it into Tools.
2024-03-05 12:22:40 +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
bgbsww
c2bab7a2fa Move the unit schema into Project Information and remove all Project Unit System code (#11266)
* Add unit system to Project Information and store with document.

* Remove the project unit system

* Restore correct document activation signalling to fix test fail

* Remove commented out dead lines

* Restore ignore option for project unit schemas

* Whitespace fix

* Refresh after changing units

* Remove field label

* Property editor changes applied to unit system
2023-12-04 13:04:53 -06:00
wmayer
0c21c6298c Base: fix google-explicit-constructor 2023-11-22 23:47:29 +01:00
Florian Foinant-Willig
dbe1c6135a Fix #10910 2023-10-09 22:54:12 +02:00
wmayer
d305f306df Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
3ac69993c0 merge master via cli 2023-10-04 13:28:48 -03:00
dyylanhammond
3b44bba8ac Change default file saving preferences (#10781)
* Change default compression level from 3 to 7
* increase default thumbnail size to 256
2023-09-27 16:08:43 -05:00
AgCaliva
a4e90b2609 Merge branch 'master' into User/Document/Feature_level_units_selection_#7746 2023-09-25 22:58:23 -03:00
Chris Hennes
564f829e5c App/Toponaming: Minor code cleanup 2023-09-17 13:13:37 -05:00
Chris Hennes
9b55b3a70b App/Toponaming: Add StringHasher to Document 2023-09-17 13:13:37 -05:00
AgCaliva
3da00e36a3 Merge Master 2023-08-30 16:24:16 -03:00
wmayer
af8c05c507 App: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
4991475341 App: modernize C++: use range-based for loop 2023-08-14 16:40:25 +02:00
AgCaliva
5c4631165a merge master 2023-08-08 23:29:40 -03:00
wmayer
ec73caa40e modernize C++: make unique 2023-08-07 19:51:30 -06:00
wmayer
c2e17824fa modernize C++: raw string literal 2023-08-07 19:51:15 -06:00
wmayer
7d0926d0b3 Qt6 port:
Fix deprecation warnings with version 6.3 or 6.4
2023-08-04 21:23:14 -06:00
wmayer
cf5e6825aa Core: report the real error of a failed feature after a recompute 2023-08-04 18:47:44 -06:00
Zheng, Lei
369b51e9ab App: fix removing object while recomputing
Fixes #9912
2023-07-23 19:40:01 +00:00
Ajinkya Dahale
17e265259c [Core] Use FCBak extension with timestamp by default 2023-07-23 19:37:10 +00:00
AgCaliva
9cf1cdadbc Implemented DocumentReader for GuiDocument.xml reading. Final 2023-06-30 20:50:36 -03:00
AgCaliva
1db4bcf374 Revert "DocumentReader implemented for GuiDocument.xml reading."
This reverts commit 2eb5fd7f132035e24880bd88076d49ed368e23e0.
2023-06-30 20:27:12 -03:00
AgCaliva
69b324e422 DocumentReader implemented for GuiDocument.xml reading. 2023-06-30 18:41:00 -03:00
Chris Hennes
1c79477451 GUI: Don't have report view message tell users to see report view 2023-05-06 18:19:08 +02:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
berniev
6c9d7ebc7a an example of using constexpr array for data
simplifies code and removes the need for a class.
2023-03-07 23:22:44 +01:00
wmayer
4b4718dd17 App: using fmtlib causes a linking failure together with boost's graphviz classes
To fix this failure a workaround is move the graphviz handling from Document.cpp to a separate source file
See also: https://github.com/FreeCAD/FreeCAD/pull/8350
2023-03-04 19:08:11 +01:00
wmayer
1a1f814a71 App: refactor license handling to reduce code duplication 2023-02-12 19:57:41 +01:00
alexneufeld
e9d4583f7c Gui: Add CERN OHL to default licenses list 2023-02-12 10:31:59 +01:00
wmayer
3e70636bdc App: [skip ci] fix warnings reported by GH actions 2022-11-17 23:50:34 +01:00
wmayer
cd34494063 App: replace boolean with enum 2022-11-17 17:38:31 +01:00
wmayer
f52ea84fbf App: [skip ci] for the dependency graph use orange color to indicate links that go out of scope 2022-10-08 16:29:36 +02:00
wmayer
656890be38 App: modernize C++: replace 'typedef' with 'using' 2022-08-29 12:58:39 +02:00
wmayer
3cb3c099bb App: minor improvements:
* use 'using' instead of 'typedef' [modernize-use-using]
* fix bugprone-reserved-identifier
* fix whitespace/comma
2022-08-28 16:15:57 +02:00
wmayer
2fcecb643a App: replace some while loops with range-based for loops to increase readability 2022-08-28 15:42:57 +02:00
berniev
5fc5d3a996 App: use auto - strange iterator (PR #7405) 2022-08-28 15:29:52 +02:00
berniev
d2babf0eb5 App: Single arg ctors must be explicit 2022-08-24 07:20:57 +02:00
wmayer
9ce0b6f113 App: fix possible dangling pointer in Document::removeObject() 2022-08-22 11:15:14 +02:00
berniev
22dcf5866f App: use empty 2022-08-06 19:29:59 +02:00
berniev
ac81a8380f App: use emplace_back 2022-08-05 10:31:51 +02:00
berniev
b6cae3bfdf App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
Uwe
c2eee172eb [App] [skip CI] Document: some .clang style fixes
- for better readability
2022-07-31 17:14:43 +02:00
berniev
d6bd08248f App: Use https 2022-07-31 17:11:14 +02:00
berniev
85170b2879 remove redundant void 2022-07-31 10:27:44 +02:00
wmayer
fb49e0da89 App: fixes #7277: Write to network drive fails on Windows 2022-07-30 12:11:14 +02:00
andrea
61a5551940 Remove unused code into App 2022-07-23 14:27:50 +02:00
wmayer
b89324bc78 App: fix build failure on Windows caused by PR #7034 2022-07-04 00:54:49 +02:00