Commit Graph

38 Commits

Author SHA1 Message Date
Zheng, Lei
3ef438eaf0 Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
3b42d4afac Base: PR6497 move return statement to new line 2022-03-29 12:34:34 -05:00
wmayer
9160f06e1c Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
8d3c66cf18 Core/Mod: modernize C++11
* use nullptr
2022-03-09 21:55:31 +01:00
wmayer
6384f367d2 Base: [skip ci] change identation in Console.h 2022-03-09 01:04:16 +01:00
wmayer
58a719e207 Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
wmayer
6c1e940b69 Base: use forward declaration instead of including Python.h 2022-03-03 19:18:07 +01:00
Uwe
c08c4c12ef [Base] Console and BaseClass: remove unused includes 2022-02-24 09:34:01 +01:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
Chris Hennes
a0bbb173f4 LGTM: Remove unused Time() function
The ConsoleSingleton::Time() function is flagged by LGTM for using
two different unsafe time-related functions. It is not called anywhere
in the current codebase, and is not exposed in the Python API, so was
removed rather than being repaired.
2021-02-11 12:51:31 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
daec778694 [skip ci] improve possibility to create a QApplication in a thread 2020-06-21 00:07:21 +02:00
luz.paz
d36c3ebe57 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
luz.paz
6f11ed298a src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
wmayer
f98446e5cb restore old behaviour of Python wrapper of Console class to increase flexibility when using in worker threads 2019-10-20 13:51:53 +02:00
wmayer
3613d834fc in RedirectStdOutput/RedirectStdError/RedirectStdLog only flush when last character is newline to avoid garbled output in log file 2019-10-20 13:42:51 +02:00
wmayer
aa011746e5 minor optimization in ConsoleObserverFile, if prefix is unknown then still write passed message 2019-10-20 12:52:08 +02:00
ezzieyguywuf
f27e4590a6 Refactor and rename ConsoleObserver...
...Renamed to "ILogger", to designate that this is an Interface for a
Logger. This "Interface" is pure virtual, so that it cannot be
instantiated directly. This makes it clear that it is intended to be
derived.

Finally, got rid of all the individual log-style methods and replaced
with SendLog. The idea here is that day-to-day users will only interact
with ILogger through ConsoleSingleton (or, likely, LoggerSingleton in
the future). This singleton will manage an arbirtary collection of
ILogger, and call SendLog with the appropriate parameters based on what
the user requests.

Therefore, the singleton itself will have the individual Log, Message,
Error, etc... methods, while stil allowing us to simplify the code base
of ILogger and its derived classes.
2019-10-20 11:46:15 +02:00
Zheng, Lei
95dfd5a6cd Base: fix verbose checking in Console::Log() 2019-09-10 14:17:06 +02:00
Zheng, Lei
50cefc5104 Console: improve console logging facility 2019-08-17 14:52:08 +02:00
Abdullah Tahiri
875197f4a1 Base::Console avoid magic numbers and enable external string size checks 2019-04-24 17:56:37 +02:00
wmayer
f581d5c8cb PVS: V560 A part of conditional expression is always true 2019-02-17 13:56:48 +01:00
wmayer
a9c4bcb5d6 remove kwd argument for functions only with flag METH_VARARGS 2018-08-08 17:39:32 +02:00
wmayer
b298e63bcc + implement direct and queued mode in console class 2018-07-25 17:25:32 +02:00
wmayer
6415b4699b fix build failure on FreeBSD, support colored output to terminal 2017-06-18 12:26:05 +02:00
Yorik van Havre
7114667d64 py3: Base: files A-I ported to python3
issue 0000995
2017-05-17 16:39:28 +02:00
Zheng, Lei
a6abf0b25a Console: added tag based log support 2017-05-13 17:46:38 +02:00
Ian Rees
f13aac4dd7 Send console Log/Warning/Error to stderr vs stdout 2017-04-08 14:29:02 +02:00
Ian Rees
ec715e36fd Linux/MacOS - only write colour codes to TTYs
This prevents the colour codes from showing up in piped output, file
redirects, etc.
2017-04-08 14:29:02 +02:00
Ian Rees
4976c0dc4a Use colour output from main executable on MacOS 2017-04-08 14:29:02 +02:00
Kunda
19f8fd4c10 source typo fixes pt5
+ cleaning up some more non-short-URLs
Issue #2914
2017-03-04 13:07:13 -03:00
wmayer
b7be7aec13 + Prefer prefix ++/-- operators for non-primitive types 2015-10-07 13:38:17 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
4dee0663c3 + test command to show race conditions in Console class
+ fix race conditions in Console class
2015-08-13 18:57:52 +02:00
Sebastian Hoogen
ed66ada1cf issue #1700 replace PyExc_Exception 2014-09-17 11:15:57 +02:00
Sebastian Hoogen
3198c42397 flush stdout after reseting the console color 2014-08-18 13:11:16 +02:00
wmayer
ba21383e0c Add method to check if console mode is on/off 2013-07-23 13:27:02 +02: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