Commit Graph

1315 Commits

Author SHA1 Message Date
wmayer
dcb0c4c75f App: workaround for boost's file_lock with version < 1.76 on Windows 2021-12-20 16:08:47 +01:00
Chris Hennes
12e3f9f222 Core: Fix installation conflict with pkgutils 2021-12-18 20:29:42 -06:00
Chris Hennes
3aebf0aead GUI: Handle packaged Workbenches and their icons 2021-12-18 20:29:42 -06:00
Chris Hennes
aab7cb408c Core: Modify metadata Python handling to use dict
Rather than trying to use a generic Py::Object and assigning properties
to it, use a Py::Dict object for simple data structures like Url,
Maintainer, and Author.

Update metadata standard to include subdirectory
2021-12-18 20:29:42 -06:00
Chris Hennes
d9afcacf6f Core: Fix std::string init from null pointer
Constructing a string from a null pointer is undefined behavior: it
turned out to work with gcc and MSVC, but with XCode/clang it results in
a segmentation fault. Theis fix assumes that the expected behavior is to
yield an empty string.
2021-12-16 00:09:05 -06:00
wmayer
ea836050f1 App: 0004649: Segmentation fault when clearing an expression in an onChanged handler 2021-12-09 18:21:26 +01:00
luz paz
d877ee4d47 Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
wmayer
5824a64b61 App: expose more methods of Document class to Python 2021-12-02 11:46:13 +01:00
wmayer
33fa183392 App: [skip ci] improve importing a Python module when passed as program argument 2021-12-01 13:34:24 +01:00
Yorik van Havre
ae84229ebc App: Added warning at startup if user mods are found in older location 2021-11-26 16:01:23 +01:00
wmayer
3be18613e4 App: remove code to copy user config from old to new location 2021-11-24 19:11:34 +01:00
wmayer
9b59baaacf App: add CMAKE_BINARY_DIR to search paths 2021-11-23 20:13:02 +01:00
wmayer
1c6b7cca9d App: save version number of the most important libraries 2021-11-23 12:55:49 +01:00
Zheng, Lei
32e3eaa01b App: fix subname encoding when saving property links 2021-11-21 23:35:40 -06:00
Zheng, Lei
61ec1192f3 App: change PropertyContainer::Restore()
Changes the way PropertyContainer handles existing property while
restoring. Previously it will first ask DynamicProperty to restore
if possible, then fallback to static property if else.

This patch looks up existing property first, and only fallback to
DynamicProperty if not found. This handles situation when an object
changes an originally dynamic property into a static one. With the
original code, it will add an auto renamed dynamic property that no
one knows its existence.
2021-11-21 19:03:53 -06:00
Zheng, Lei
55d64d71c2 App: do not auto rename new dynamic property
Instead, throw exception in case of duplicate name. Use boolean
parameter 'Preferences/Document/AutoNameDynamicProperty' to get back
the old behavior.
2021-11-21 19:03:53 -06:00
luz paz
bd210c9ee0 App: remove superfluous whitespace in ObjectIdentifier.h 2021-11-20 14:03:40 +01:00
luz paz
05c5e0a6d9 App: fix doc typo in ObjectIdentifier.h 2021-11-20 14:03:40 +01:00
wmayer
15ce4955b3 MingGW: [skip ci] fix build failure 2021-11-17 17:14:27 +01:00
wmayer
387661360c App: standard path handling
* distinguish between temp and cache location
* document's transident directory is created in the cache location
* add functions to access temp and cache location via Python
2021-11-15 16:26:25 +01:00
wmayer
d6b17b2dbb App: add PropertyLinkSubList::addValue() to extend the list 2021-11-15 13:05:19 +01:00
wmayer
744290467d App: add PropertyLinkSubList::verifyObject() to reduce code duplication 2021-11-15 08:42:32 +01:00
Chris Hennes
32790d1351 App: Add colCount and rowCount to Range 2021-11-14 20:45:09 -06:00
Chris Hennes
2ecd720de8 App: Add missing use for boost placeholders 2021-11-14 20:45:09 -06:00
Chris Hennes
7687582d53 App: fix compilation of PropertyStandard.cpp during cherry-pick 2021-11-14 20:45:09 -06:00
Zheng, Lei
fdae470c1b App: add hiddenref() expression built-in function
Any object reference inside this function is treated as hidden to
exclude it from dependency calculation. This function allows some form
of cyclic depdenency.

Merger note: renamed from "HREF" to "HIDDENREF" to avoid confusion with
the standard "hypertext reference" use of HREF.
2021-11-14 20:45:09 -06:00
Zheng, Lei
7e272d00f8 App/Gui: allow change dynamic property group and documentation
Exposed as PropertyContainerPy.setGroup/DocumentationOfProperty.

Added a menu action to property view for rename dynamic property group.
2021-11-14 20:45:09 -06:00
Zheng, Lei
26ba872aa6 App/Gui: improve expression binding of PropertyEnumeration
The enumeration items are exposed through sub path '.Enum'. When
'ShowAll' is enabled in property view, this sub path is exposed as a
sub property item named 'Enum', and can be either manually edited or
bound with an expression.
2021-11-14 20:45:09 -06:00
Zheng, Lei
796b4c0b2d App: fix crash on copy of Enumeration 2021-11-14 20:45:09 -06:00
wmayer
fde9663c24 App: do not raise an exception if application data directory doesn't exist because this breaks the CI tests
Instead try to create the directories and throw an exception if this fails.
2021-11-12 10:17:35 +01:00
wmayer
8dc4c857f0 App: add upgrade() method to PropertyLinkSubList 2021-11-12 07:49:44 +01:00
wmayer
873d79d3b5 App: [skip ci] add program option --keep-deprecated-paths to keep old path names 2021-11-11 14:04:40 +01:00
wmayer
e32f841264 App: fix issue 0002956 2021-11-11 13:51:14 +01:00
wmayer
0b75d53676 App: code cleanup 2021-11-10 18:33:26 +01:00
wmayer
68be996d57 App: add a CMake test to check if C runtime provides backtrace symbols 2021-11-09 14:16:12 +01:00
wmayer
c83ada98d6 App: add new config key UserConfigPath to store the path to the config files 2021-11-09 13:46:26 +01:00
wmayer
55afa21ba1 App: issue 0002956: implement XDG_CACHE_HOME 2021-11-09 00:20:55 +01:00
wmayer
a9b7506007 App: further code refactoring in Application::ExtractUserPath() 2021-11-08 22:17:06 +01:00
wmayer
b32b908eae App: keep custom user data path as is if FREECAD_USER_HOME or FREECAD_USER_DATA is set 2021-11-08 18:28:02 +01:00
wmayer
dbd3e8784a App: code refactoring in Application::ExtractUserPath() 2021-11-08 16:17:08 +01:00
wmayer
ae0198ea0a App: split Application::ParseOptions into two functions
to simplify handling of options that should be processed before determining user directories
2021-11-08 11:10:13 +01:00
luz paz
2ffd911111 Fix typos in source comments [skip ci]
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,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,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,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,./build/doc/SourceDocu`
2021-11-05 02:35:17 +01:00
wmayer
f36126770c App: harmonize API of App::Application
* make getHomePath() static and return a std::string
* make getExecutableName() static and return a std::string
2021-11-04 10:50:09 +01:00
Zheng, Lei
c349e78f45 Minor code change according to suggestions 2021-10-30 12:30:45 +08:00
Zheng, Lei
ba4c992eaa App: use enum in API Application::getDocumentByPath() 2021-10-30 11:03:55 +08:00
Zheng, Lei
ad9ad30c00 App: fix external document loading
The problem happens when partial loading is enabled. If document A
contains a link to some object in document B, it will load B as partial
document with only that object and its necessary dependencies. But if
document A contains another link to some object in document C which also
has a link to some object in document B, the link in document C may not
be restored, because document B is partially loaded without the linked
object. This patch will check for this case and reload document B for
more objects.

See an example reported in
https://forum.freecadweb.org/viewtopic.php?p=495078#p495078
2021-10-30 11:03:52 +08:00
wmayer
c74d2b8dd5 App: add class PropertyRotation 2021-10-29 12:40:32 +02:00
wmayer
cd1bd71141 App: [skip ci] add get() method to WeakPtrT class 2021-10-21 15:50:07 +02:00
Yorik van Havre
13b8b05a9a Merge pull request #4787 from chennes/addThemeSupport
[GUI] Add Preference Pack support
2021-10-14 12:41:06 +02:00
Zheng, Lei
9933d4fbce App: add signalChanged to Property
For more efficient tracking of single property changes
2021-10-12 15:47:50 -05:00