Commit Graph

1576 Commits

Author SHA1 Message Date
Petter Reinholdtsen
bfe29875b2 Base: Removed unused private variable decimals to avoid lint issue.
The linter report 'private field 'decimals' is not used'.  The
getDecimals() method return pack.defDecimals, which was also
used to set the value of the decimals variable in the initializer,
so the decimals variable is redundant.
2026-01-18 20:29:51 +01:00
tritao
40a9f46d71 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
wmayer
6683fdb122 Simplify code using xerces namespace 2026-01-07 14:37:59 +01:00
marioalexis
060247a220 Base: Add millitesla unit 2025-12-16 14:26:31 -03:00
marioalexis
41b57d750e Base: Insert SPDX specifier in parser script 2025-12-16 14:26:31 -03:00
freecad-gh-actions-translation-bot
97b9193d71 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Ladislav Michl
c0a11089a6 Revert "[Base]retrieve unit text"
This reverts both pointless and broken commit c9fffa6789.
2025-12-03 17:43:53 +01:00
Chris Hennes
9cd4a2ec7d Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
github-actions
914b34cc1a Update translations from Crowdin 2025-11-25 21:20:42 -06:00
Andrew Burks
b32c224f09 #25474 Added read-only warnings when saving documents (#25532)
* #25474 Added read-only warnings when saving documents

Block saving a file and notify user if windows is unable to save to the file for any reason, or the read-only attribute is checked. Also check std::filesystem::perms for write permission and other checks in FileInfo::isWritable(), although it doesn't seem to matter on windows.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-11-23 05:09:32 +00:00
Chris Hennes
71104a08e7 Core: Convert transparency to alpha (#24891)
* Core: Convert transparency to alpha

Create new `Base::getVersion()` function for extracting a program
version enumeration given a version string.

Convert transparency to alpha value for old project files.

* Base/App: Address review comments

---------

Co-authored-by: wmayer <wmayer@freecad.org>
2025-11-17 17:15:19 +01:00
Stephan T. Lavavej
be37feffc3 Avoid using non-Standard std::locale::empty() for MSVC 2025-11-14 00:22:18 -06:00
github-actions
bb748b15ea Update translations from Crowdin 2025-11-11 23:44:18 -06:00
pre-commit-ci[bot]
0e5491ca67 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-11 19:34:32 +00:00
Frank Martinez
5e343b0b99 [License] Fix pyi license headers. 2025-11-11 13:26:18 -05:00
Frank Martinez
fc99a20a03 [bindings] remove redundant signatures. batch1 2025-11-11 13:23:10 -05:00
Frank Martinez
0d0689341b [bindings] Format with yapf (precommit will reformat) 2025-11-11 13:23:10 -05:00
Frank Martinez
d4d7cabdc5 [bindings] Fix overload order 2025-11-11 13:23:10 -05:00
Frank Martinez
a7adf9c466 Clean unused imports in .pyi files 2025-11-11 13:23:10 -05:00
Frank Martinez
591e8a36b3 black formatting 2025-11-11 13:23:10 -05:00
Frank Martinez
8e51db4072 [bindings] re-shape some keyword-only signatures 2025-11-11 13:23:09 -05:00
Frank Martinez
c9579bbff2 [bindings] Code formatting 2025-11-11 13:23:09 -05:00
Frank Martinez
802f62739e [bindings] fix signatures in pyi files 2025-11-11 13:16:26 -05:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
marioalexis
44d523d84f Base: Restore schema spec for electromagnetic potential unit - fix #25093 2025-11-06 15:05:25 +01:00
github-actions
a3c2454a61 Update translations from Crowdin 2025-10-27 21:06:54 -05:00
Chris Hennes
0ce82c4159 Core: Switch away from deprecated wstring_convert and codecvt_utf8 2025-10-21 09:01:59 +02:00
Chris Hennes
c64a8b86a5 Merge pull request #24749 from FreeCAD/BuildingEuroAreaDim2
Base, TechDraw: Use Unit Schema Values in Area Dimension
2025-10-20 11:37:55 -05:00
github-actions
5ae4bbf837 Update translations from Crowdin 2025-10-20 09:57:05 -05:00
wandererfan
731af12de0 [Base]retrieve unit text
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-20 08:54:52 -05:00
PhoneDroid
c913317c28 [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Chris Hennes
8500ed0520 Update translations 2025-10-05 2025-10-07 19:21:58 +02:00
sliptonic
f7a29c0c7e Merge pull request #24114 from chennes/addDirectoryIsWritable
Base: Refine directory permissions test
2025-10-06 10:35:21 -05:00
Chris Hennes
1c6d9c79fb Update translations 2025-09-25 2025-09-25 17:25:13 +02:00
Chris Hennes
25269bbf73 Base: Refine directory permissions test 2025-09-21 13:16:35 -05:00
Chris Hennes
02721eec37 Update translations 2025-09-15 2025-09-16 09:55:13 +02:00
Markus Reitböck
5a423dab39 Base: 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-14 09:47:01 +02:00
Markus Reitböck
496b31b087 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
Markus Reitböck
be6b957929 missing includes in Base, App and Gui headers (#23854)
* missing includes in Base, App and Gui headers

header should be self contained

* use cstddef header instead of stddef.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-09-11 18:58:44 -05:00
Chris Hennes
ff349c81d6 Merge pull request #23746 from 3x380V/cmake
CMake: Use scoped include and library directories
2025-09-10 21:54:51 -05:00
Chris Hennes
23bcfd12ff Update translations 2025-09-09 2025-09-10 08:53:41 +02:00
wmayer
ac51455a0a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
Chris Hennes
38f34894d4 Merge pull request #23351 from 3x380V/fileinfo
Core: Modernize Fileinfo
2025-09-07 21:28:11 -05:00
Ladislav Michl
9f87add8cc Base: UnitsSchema: use basic imperial conversion constants
Use well defined basic constants for conversion of imperial units.
This makes code hopefully easily readable and verificable.
2025-09-05 17:31:55 +02:00
Ladislav Michl
fa98e178d1 Base: add back Imperial for Civil Engineering unit conversions
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
e3d0baf109 Base: pass format specifiers to UnitsSchemasData::runSpecial
Make toFractional() aware of desired fractional inch denominator.

Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
a5f039dd6a Base: QuantityFormat: avoid storing formatting defaults
User defined precision and fractional inch are stored on QuantityFormat
construction making changes persistent to object life time.
Change that so until not explicitely overriden, user defined values
are always returned.

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-05 17:31:54 +02:00
Ladislav Michl
0278a1298d Base: refactor unit formatting defaults
Defaults for both precision (number of digits after decimal point)
and denominator (number of fractions) are defined on various places
making difficult to find which default is used for various tasks.
Store these values at one central place: UnitsApi. Unless overriden
by user, default values are defined by unitSchemasDataPack.
2025-09-05 17:31:54 +02:00
Ladislav Michl
4e27d4eebe Gui: fix 'Minimum fractional inch' preference visibility
Default Unit Schema is not yet changed in onUnitSystemIndexChanged
callback handler, so index needs to be used to request currently
selected one.

Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
1c99a9377c Base: Quantity: attribute pressure quantities to pressure unit
Although CompressiveStrength is of the same dimension as Pressure,
make it more straightforward and use base unit.
2025-09-05 17:31:54 +02:00