Commit Graph

419 Commits

Author SHA1 Message Date
Chris Hennes
16906e93db Merge pull request #24240 from mrpilot2/cmake_pch_mods_part_2
Mods: use CMake to generate precompiled headers on all platforms
2025-09-26 09:46:26 -05:00
Chris Hennes
39d39f34c3 Update translations 2025-09-25 2025-09-25 17:25:13 +02:00
Markus Reitböck
abc6b9e7d0 Test: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-24 20:08:57 +02:00
Markus Reitböck
c3805ecf4a fix duplicate include guards in precompiled headers 2025-09-23 00:51:00 +02:00
Markus Reitböck
749ac36615 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
Chris Hennes
3d65ae46d5 Merge pull request #23746 from 3x380V/cmake
CMake: Use scoped include and library directories
2025-09-10 21:54:51 -05:00
Chris Hennes
58a8d589a7 Update translations 2025-09-09 2025-09-10 08:53:41 +02:00
wmayer
93db4c7d8a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
Chris Hennes
fd20bdd6d8 Update translations 2025-09-03 2025-09-04 11:37:11 +02:00
pre-commit-ci[bot]
b44dc26ff1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-08-31 12:42:10 +00:00
wmayer
ee2d35cad8 Test: Add test cases for Persistence::validateXMLString 2025-08-31 14:38:25 +02:00
Chris Hennes
b1b97e44f1 Update translations 2025-08-28 16:14:49 +02:00
Chris Hennes
3e1cc8302a Update translations 2025-08-18 17:55:24 +02:00
marioalexis
0cdf0af0c6 App: Fix ExtensionPython macro 2025-08-08 17:11:51 +02:00
Ryan Kembrey
d7bc171a38 Test: Update UI strings for consistency
Closes: #22369
2025-08-04 20:13:34 +02:00
pre-commit-ci[bot]
5dc203630b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-06-02 09:53:47 +00:00
Yorik van Havre
94144ecd99 Translations: Merged crowdin translations 2025-06-02 11:48:26 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Chris Hennes
9b1467cef3 Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
2025-05-05 10:43:27 -05:00
David Carter
24df826865 Merge pull request #21046 from davesrocketshop/issue_13922_2
Update module dependencies to ensure that automated testing code is considered as well as direct dependencies. Update some automated tests to eliminate unwanted dependencies.
2025-05-04 17:02:50 -05:00
João Neves
0d38b2f7c5 Core: Fixed a bug where an empty document disappears (#20554)
* Core: Fixed a bug where an empty document disappears

Created a flag named autoCreated to distinguish an autoCreated
document created in the startup from a manually document.
Implemented a setter and a getter for this new flag.
Added a codition that verifies if a document is autoCreated
when opening another document to close it in the correct case.
Implemented unit tests for theses cases. Fixes #19868.

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

* Tests: Fix failing auto-created document tests

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

* Tests: moved created tests to the existing Document test framework.

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

---------

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
2025-04-28 10:46:52 -05:00
bofdahof
fc729762b0 Test: fix typo in UnitTests 2025-04-27 00:45:54 +02:00
Luz Paz
f809e34ea0 Fix typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,localy,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,rin,ro,rougly,sectionin,seperator,serie,shs,sinc,siz,som,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./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,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`
2025-03-31 23:00:32 +02:00
Kevin Martin
0986dadb2f Correct non-gui DXF C++ importer to not generate pending python exceptions (#20328)
* Add a test case for DXF import

* Test gui flag rather than look for import error to make gui decision

The new code is cleaner and faster and avoids any exception stuff

* Properly avoid trying to use Layer's View object in non-GUI

The code was trying to avoid this but had a Python None object rather than a null C++ pointer and so tried setting a property on None. This left an unhandled exception state which acted as a booby trap that caused the later failure of some unrelated code.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* De-lint, remove wong "unsupported" message
Hidden layers have been supported for a while but still generated an import note about this being unsupported.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-31 11:20:37 -05:00
pre-commit-ci[bot]
82e57fdeb6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-03-22 11:38:48 -05:00
tritao
6c2c6847eb CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Benjamin Bræstrup Sayoc
755229df23 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Joao Matos
cc6ffb44de Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Joao Matos
27ebc68a11 CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Benjamin Bræstrup Sayoc
bad9499d50 Test: Use QStringLiteral 2025-02-10 18:34:57 +01:00
tritao
e94d1cf872 Base: Remove Boost-based filesystem and switch to standard <filesystem> 2025-02-10 10:48:54 -06:00
pre-commit-ci[bot]
c8b72c144e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-03 22:51:14 +00:00
Yorik van Havre
fe60505c17 Translations (#18923)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-13 21:30:30 -06:00
wmayer
ad314fea7e Core: Fixes #18717
Neither in #18332 nor in any of the referenced issues a reason is given why the placement of the coordinate axes must be changed.
Only doing it to make the client code look more consistent is not a valid reason.

This change breaks forward and backward compatibility and with #18717 we already have a hard to solve issue. Furthermore, at this
point of time it's not even clear what other collateral damage the change may cause.

So, this commit hides all the implementation details of the DatumElement and restores the original placement for the axes.
This commit makes the line migration code obsolete
2025-01-02 13:27:54 +01:00
wmayer
4ba6e8e150 App: Fix possible crash when postponing the destruction of a removed property
Fixes #18601
2024-12-23 11:49:38 -05:00
PaddleStroke
fc56730648 Core: Datums: Fix axis placement and add migration script. 2024-12-13 18:04:10 +01:00
mosfet80
eef368ae63 Cleqn BaseTests.py
Clean code
2024-12-13 11:42:37 -05:00
wmayer
ffa3fa5b5a Core: Extend Color API
* Fix issues with alpha value <> transparency
* Use type traits to convert between different color classes (fixes #14515)
2024-11-15 12:25:25 -05:00
pre-commit-ci[bot]
dda69c8b60 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-14 17:56:08 +02:00
Yorik van Havre
e8fc9cf45f crowdin translations 2024-10-14 17:56:08 +02:00
Jiří Pinkava
cdb1a4f8ef Gui: Workaround for crash on close of MDI window
The Qt6 (up to Qt 6.7.3 now) contains bug, which can lead, under
specific circumstances, to crash of the application, when the
MDI window is closed. The circumstances are:

* at least 2 MDI windows needs to be open
* stylesheet muset set different size (border, margin) for activated and un-activated tabBar tab
* the closed window must be inactive, but created before the window now active and open
* race condition must occur betwee the closing and resize event handlers for the tabBar
  (see qt bug for details)

So this bug only occures with Qt6 with the Dark or Light styles selected (no classic) and only if
specific sequence of steps is followed during opening and closing the MDI windows.

The bug is in Qt code path executed when QMdiArea::ActivationHistoryOrder is set.

The other possible workaround might be to change all the affected stylesheets, but this seems to me
impractical and also fragile, because the affected code path will be still active.

https://bugreports.qt.io/browse/QTBUG-129596
2024-10-14 10:32:53 -05:00
pre-commit-ci[bot]
61c1f8fb21 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-28 15:56:09 +00:00
Yorik van Havre
b065691032 Merged crowdin translations 2024-08-28 17:51:34 +02:00
Yorik van Havre
aad060c0f0 Translations (#15689)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-05 10:42:18 -05:00
pre-commit-ci[bot]
6470f3b129 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-11 13:11:59 +00:00
Yorik van Havre
2c66c8a788 Merged crowdin translations 2024-07-11 15:07:17 +02:00
pre-commit-ci[bot]
b571f09c1c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-09 08:52:17 -05:00
Yorik van Havre
32c9ed5493 Merged crowdin translations 2024-07-09 08:52:17 -05:00
wmayer
fa2741fd29 Test: Add test to validate correct XML output of Content attribute 2024-07-08 21:18:56 -05:00
PaddleStroke
8e1a1c1783 Core: GuiDocument testGetTreeRootObject 2024-06-13 15:51:22 +02:00