Commit Graph

245 Commits

Author SHA1 Message Date
wmayer
d86a73f07e App: code cleanup 2021-11-10 18:33:26 +01:00
wmayer
84182deff0 App: add a CMake test to check if C runtime provides backtrace symbols 2021-11-09 14:16:12 +01:00
wmayer
5ad8bed9c4 App: add new config key UserConfigPath to store the path to the config files 2021-11-09 13:46:26 +01:00
wmayer
2cc5707571 App: issue 0002956: implement XDG_CACHE_HOME 2021-11-09 00:20:55 +01:00
wmayer
d244df4f79 App: further code refactoring in Application::ExtractUserPath() 2021-11-08 22:17:06 +01:00
wmayer
7375be66ad 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
ab1220b663 App: code refactoring in Application::ExtractUserPath() 2021-11-08 16:17:08 +01:00
wmayer
11c5954ebf 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
wmayer
09da245af9 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
a2fb4a5d6d Minor code change according to suggestions 2021-10-30 12:30:45 +08:00
Zheng, Lei
9885dadfff App: use enum in API Application::getDocumentByPath() 2021-10-30 11:03:55 +08:00
Zheng, Lei
fc9d3547ad 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
16ae568549 App: add class PropertyRotation 2021-10-29 12:40:32 +02:00
wmayer
0c62c22554 App: replace ctime() with boost's date/time functions in Application::logStatus() 2021-09-30 19:50:19 +02:00
0penBrain
f976699bdf [Core] exit() can prevent core dumping, use abort() instead on debug mode 2021-08-18 18:12:31 +02:00
wmayer
377b01b4b4 Py3: fixes #0004081: Abillity to show console output when running under Python 2021-04-01 17:51:10 +02:00
wmayer
4bec60cc78 App: use std::wstring_convert instead of QString to encode/decode unicode/utf-8 2021-03-29 16:19:13 +02:00
wmayer
e1dd20db0c Gui: fix unicode handling of path names on Windows 2021-03-29 15:41:13 +02:00
Benjamin Nauck
f410aae48c App: Refactor win appData setup with boost::filesystem 2021-03-29 15:03:41 +02:00
Benjamin Nauck
66d39ecbb7 App: Refactor *nix appData setup with boost::filesystem 2021-03-29 15:02:49 +02:00
Benjamin Nauck
00d749601c App: Refactor mac appData setup with boost::filesystem
This will make it easier to add support for migration when moving
appData from `Library/Preferences` to `Library/Application Support`.
2021-03-29 15:02:36 +02:00
Chris Hennes
52ed707b0e [Core] Remove deprecated code for 0.20 2021-03-07 08:44:57 +01:00
wmayer
bd755b654b Gui: [skip ci] re-add removed Py_INCREF of module 2021-02-27 11:13:30 +01:00
wmayer
df0f979f3b App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
luz paz
bfdffb50be App: Fix header uniformity, trailing whitespace, and doxygen headers 2020-11-19 13:38:37 +01:00
wmayer
59c50053a6 MSVC: [skip ci] make working with C++17 compiler 2020-11-09 16:13:34 +01:00
Priit Laes
6a6a6f3d25 build: boost: Drop branches requiring boost-1.46 2020-10-13 12:56:28 +02:00
Priit Laes
95ed01728e build: boost: Drop boost-1.44-specific checks 2020-10-13 12:56:28 +02:00
Chrismettal
f82532ddbf Seed randomizer on application init 2020-10-12 19:10:06 +02:00
wmayer
ffa1da617f Python: [skip ci] expose Python types in their corresponding modules 2020-09-21 15:04:26 +02:00
Zheng, Lei
6ef1562d1f App/Gui: warn when loading/saving file with identical physical path 2020-08-31 14:05:14 +02:00
wmayer
9c3f9b72a8 App: improve support of portable version of FreeCAD 2020-08-05 15:47:50 +02:00
wmayer
43d9e82f97 Coverity: Uncaught exception 2020-07-20 17:34:26 +02:00
Zheng, Lei
536051179b App/Gui: introduce temporary document
Add new argument to Application::newDocument() to create a temporary
    document. Also exposed to Python API App.newDocument() with a named
    argument 'temp'.

    The temporary document is marked with status bit 'TempDoc'. The user
    will not be prompt for saving when closing. The undo/redo is disabled.
    The AutoSaver skips it. And the tree view will not show it.
    PropertyXLink allows linking to/from object within a temporary document
    without saving.
2020-07-14 19:36:05 +02:00
Bernd Hahnebach
fe93f6027e App: properties, add vacuum permittivity 2020-06-29 17:46:41 +02:00
wmayer
daec778694 [skip ci] improve possibility to create a QApplication in a thread 2020-06-21 00:07:21 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
Bernd Hahnebach
381269a0c8 small code formating in application 2020-03-16 15:45:24 +01:00
luz.paz
180805c55e Fix typos
Found via  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,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,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,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
```
2020-03-06 14:50:35 +01:00
Zheng, Lei
27771fc6ee App: restore external linked documents in dependency order 2020-02-14 19:46:56 +01:00
Zheng, Lei
0a608e9413 App: fix Link document restore
This fixes issue #0004224
2020-02-14 19:46:36 +01:00
Zheng, Lei
3364911d6d App: add PropertyXLinkList
PropertyXLinkList is derived from PropertyXLinkSubList, which is
modified to provide APIs compatible to PropertyLinkList.

The only difference between the two class is in their getPyObject() to
make PropertyXLinkList output similar to PropertyLinkList in Python. In
C++, both class can accept mix of objects link with or without subname,
depending on which set of APIs are used.
2020-02-11 15:40:27 -05:00
Zheng, Lei
992dc49ece Do not throw error when open an already opened document 2020-02-05 11:12:00 +01:00
wmayer
120b69c74f App: add methods to change import/export module of a registered filetype 2020-01-18 15:29:44 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
wmayer
e1f85cd091 export typeid system to Python 2019-11-13 00:43:23 +01:00
wmayer
bb1aec9e60 fix crash when restoring a corrupted project fails 2019-10-25 20:58:06 +02:00
wmayer
3500451a04 Basic support for Frequency as unit 2019-10-20 18:14:56 +02:00
luz.paz
7b7797f4f3 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,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`
2019-10-03 07:57:13 +02:00