Commit Graph

38 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
f620d68c19 Removed outdated UTF8 declaration [ Other ] (#24528)
* Removed outdated UTF8 declaration

* [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-10-13 18:34:43 +02:00
Pieter Hijma
bf77e1b553 Gui: Add a possibility to redirect macro commands 2025-10-09 16:00:12 +02:00
Markus Reitböck
a72a0d6405 Gui: 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:03 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Chris Hennes
899506815c Gui: Change variable name import->importCommand
import is a reserved word in c++latest
2025-02-22 20:48:43 -06:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
bdieterm
1a00b40f12 Gui: use utf-8 encoding for saving recorded macros
FCMacros always have the header "# -*- coding: utf-8 -*".
But the QTextStream class in Qt5 does not always use utf-8 for saving the text file.
2024-11-29 11:55:17 -05:00
Johannes Wüller
33e91421b5 Fix backwards-compatible Qt6 warnings 2024-05-13 11:39:24 -05:00
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
991a7c1a4b Gui: refactor MacroManager 2023-03-26 18:41:56 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
2db561561e Gui: use empty 2022-08-06 16:35:45 +02:00
wmayer
4791575e31 Gui: remove some superfluous const_cast 2022-06-24 14:48:52 +02:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
10436cb7f4 [Gui] Manual alignment etc.: remove unused includes 2022-03-02 04:22:48 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
Zheng, Lei
2fe15c87cf Gui: output Cmt type macro line as comment in python console 2019-10-08 10:15:18 +02:00
Zheng, Lei
4bd31c4b91 Gui: Command API changes
* invoke(), distinguish between command triggering source. Also add
  support of auto transaction using App::AutoTransaction. Now all
  command will support undo/redo by default.

* setupCheckable(), a helper function to Improve support of
  PythonGroupCommand

* getObjectCmd(), helper function to output Python command to refer to
  an object without ambiguity. Because with introduction of external
  linking, an object can no longer be safely referred through the
  current active document.

* Support auto MacroManager command logger. For commands that does not
  log any output to MacroManager, a log entry of 'Gui.runCommand()' will
  be auto generated.

* Support linked object in copyVisual()

* Modified do/runCommand() to print calling file and line number.

* Add various helper macros for run command involving a document or
  object.
2019-08-17 14:52:10 +02:00
wmayer
ff2a361928 fix several gcc warnings 2016-11-08 14:31:08 +01:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
wmayer
e2398b4b06 fix Coverity issues 2016-08-21 14:03:02 +02:00
Yorik van Havre
2254a4698d Made Redirect python output options True by default - fixes #2454 2016-02-26 13:43:51 -03:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
4f29b2c161 + set utf-8 encoding when recording a macro 2015-06-19 14:52:20 +02:00
wmayer
3a591b3a94 Improve reporting of Python exceptions 2013-05-04 14:23:53 +02:00
wmayer
268805fd58 Fix a couple of issues with macro recording 2012-12-13 15:02:15 +01:00
wmayer
40a997217b Proper handling of SystemExitException in Python 2012-08-11 10:58:54 +02:00
wmayer
41c46bf48b 0000777: Shared libraries call exit 2012-07-05 15:24:28 +02:00
wmayer
ff6c16e5d3 Allow to run script in global environment 2012-06-29 13:57:22 +02:00
wmayer
fefc3469c8 Redirect output and errors only if set in preferences 2012-02-15 12:03:26 +01:00
wmayer
dc8b1ec6f2 Print pythons exceptions in macros to output window 2012-02-07 12:18:10 +01:00
wmayer
5db505d43d + handle Python's SystemExit exception when running script or macro
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5398 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2012-01-11 18:39:27 +00:00
wmayer
1884ee3881 0000528: Need a way to reset the Python instance
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5250 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-10 13:42:32 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00