Commit Graph

395 Commits

Author SHA1 Message Date
Bas Ruigrok
b7ac8a7afe Inform Coin to use EGL when on Wayland (#21917)
* Inform Coin to use EGL when on Wayland

* Only check for Wayland on Linux and BSD
2025-06-30 11:12:02 -05:00
wmayer
4cfc77d9ee Gui: Move define HAS_QTBUG_129596 to separate header file 2025-05-30 18:04:33 +02:00
Kacper Donat
aa47949f80 Gui: Add support for hints in status bar 2025-05-21 17:42:45 +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
f55063855a Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
2025-05-05 10:43:27 -05:00
Benjamin Nauck
df3c324b7d Gui: use contains() and isEmpty() instead of count() where possible 2025-05-03 22:19:51 +02:00
João Neves
05f0c606d5 Core: Fixed a bug where an empty document disappears (#20554)
* Core: Fixed a bug where an empty document disappears

Created a flag named autoCreated to distinguish an autoCreated
document created in the startup from a manually document.
Implemented a setter and a getter for this new flag.
Added a codition that verifies if a document is autoCreated
when opening another document to close it in the correct case.
Implemented unit tests for theses cases. Fixes #19868.

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

* Tests: Fix failing auto-created document tests

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

* Tests: moved created tests to the existing Document test framework.

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

---------

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
2025-04-28 10:46:52 -05:00
bofdahof
353acbb27b Base: simplify UnitsSchemas management
Fixes: Maintaining schemas is difficult and error-prone

- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
2025-04-27 00:45:54 +02:00
Alex Tran
353085d7e3 App: Running FreeCAD in verbose mode information to reflect Gui -> Help -> About Dialog info (#20487) 2025-04-16 08:29:07 +02:00
Kacper Donat
77e40b9747 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Kacper Donat
9d97d1c895 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
Chris Hennes
44908ad721 Merge pull request #19428 from tritao/base-tracy-profiler
Base: Add Tracy frame profiling support.
2025-03-14 04:12:05 +00:00
Joao Matos
0feab195ac Base: Add build support and instrumentation for the Tracy profiler. 2025-03-14 03:41:30 +00:00
Chris Hennes
3ce193ddb8 Merge pull request #19921 from mosfet80/QT_CLEAN
REMOVE old QT<= 5.14 code
2025-03-11 20:54:59 +00:00
Joao Matos
6dd5246fa1 Rename DocumentCreateFlags to DocumentInitFlags. 2025-03-07 20:54:16 +00:00
Joao Matos
81a5b78b36 Convert DocumentCreateFlags instances to use designated initializer list. 2025-03-07 20:42:51 +00:00
Andrea
2d4ab5af20 REMOVE old QT<= 5.14 code
Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
2025-03-05 09:32:06 +01:00
Syres916
7f3632ba8e [Gui] Trigger the same checks for Drag & Drop files as File > Open 2025-03-04 20:45:15 -06:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
tritao
ff8e99f385 App: Provide temporary document creation flag to Python App.loadDocument. 2025-02-03 18:01:18 +01:00
Benjamin Nauck
1e91ad56bc Move where icons in menus attribute is set
Without this, icons are not visible on macOS
2024-12-20 11:55:21 -05:00
wmayer
5302033c76 Gui: Move Python functions from Application to ApplicationPy
This reduces build time when adding new Python functions because only one file must be compiled.
Handles also many linter warnings.
2024-12-20 11:50:07 -05:00
Chris Hennes
28752ca05b Merge pull request #18244 from wwmayer/space_mouse_runtime
Gui: Add runtime check to choose between modern and legacy space mous…
2024-12-09 11:36:17 -05:00
wmayer
7a044e7dcd Gui: Add runtime check to choose between modern and legacy space mouse devices 2024-12-03 18:54:21 +01:00
PaddleStroke
b2f965c06e ViewProviderOrigin: Renamed to ViewProviderCoordinateSystem 2024-11-27 12:15:53 +01:00
PaddleStroke
4ebb66838c Core: Add App::LocalCoordinateSystem.
Most of App::Origin is moved into this sub class of App::Origin.
Add App::Point. Change graphics of the planes/axis.
Remove scale-by-content behavior and make it fixed size on screen.
2024-11-26 17:36:02 +01:00
PaddleStroke
3993bfede7 Rename ViewProviderOriginFeature to ViewProviderDatum 2024-11-26 15:36:48 +01:00
Ladislav Michl
72bc8ae627 Gui: set Qt attributes in setupApplication() 2024-11-12 07:59:47 +01:00
Ladislav Michl
3f870deb51 Gui: refactor hiddenMainWindow usage 2024-11-12 07:53:38 +01:00
wmayer
de18adba03 Core: Add wrapper function Application::applicationPid() 2024-11-01 15:48:01 +01:00
wmayer
f2c9b9f94e Core: Don't freeze application if lock file already exists 2024-11-01 15:02:22 +01:00
PaddleStroke
3bc7f1e85e Core: Enable TaskDialogs to associate view (#17373)
* Core: Add possibility for task dialogs to associate a view and be able to close when associated view is closed.

* TaskImage: Use task dialog view association.

* Sketcher: Use task dialog view association. Preventing crash (https://github.com/FreeCAD/FreeCAD/issues/16702)

* EditableDatumLabel: Use QPointer to prevent crash
2024-10-29 09:58:11 -05:00
Adrian Insaurralde Avalos
d3a7b55886 Gui: use wildcard for some warnings filters. Fix #16687 2024-10-28 17:39:18 +01:00
Adrián Insaurralde Avalos
3a39556b49 Gui: extend warning filters
filter out:
-qt.qpa.wayland
-kf.config.core
-kf.kio.widgets
-kf.service.sycoca
-kf.solid.backends.udisks2
2024-10-21 18:33:25 +02:00
wmayer
d67bb37bc7 Core: Set unit scheme when switching between unsaved documents
Fixes #17297
2024-10-21 18:17:30 +02:00
Benjamin Nauck
c569a1abbb Revert "Make sure splasher is stopped before showing dialog"
This reverts commit 104a3b90b0.
2024-10-20 18:40:40 +02:00
Jiří Pinkava
fed918a151 Gui: Workaround for crash on close of MDI window
The Qt6 (up to Qt 6.7.3 now) contains bug, which can lead, under
specific circumstances, to crash of the application, when the
MDI window is closed. The circumstances are:

* at least 2 MDI windows needs to be open
* stylesheet muset set different size (border, margin) for activated and un-activated tabBar tab
* the closed window must be inactive, but created before the window now active and open
* race condition must occur betwee the closing and resize event handlers for the tabBar
  (see qt bug for details)

So this bug only occures with Qt6 with the Dark or Light styles selected (no classic) and only if
specific sequence of steps is followed during opening and closing the MDI windows.

The bug is in Qt code path executed when QMdiArea::ActivationHistoryOrder is set.

The other possible workaround might be to change all the affected stylesheets, but this seems to me
impractical and also fragile, because the affected code path will be still active.

https://bugreports.qt.io/browse/QTBUG-129596
2024-10-14 10:32:53 -05:00
Benjamin Nauck
752b7db98c Make sure splasher is stopped before showing dialog 2024-10-10 16:14:12 -05:00
mwganson
866a274268 [Step Import] fix issue with non-latin characters in import path 2024-10-07 17:43:14 +02:00
wmayer
84a307788c Core: Fix macro recording when using module_io 2024-10-02 21:13:19 -06:00
supermixed
bbb6eeb1ed Core: Import STEP: Cancel button does not cancel (#16499)
* Fix importing .step file when user cancelled import settings dialog
* Refactor object loading python code, fix not using settings when STEP options dialog not shown
* Use custom exception type for user cancelling import instead of `RuntimeError`
* Pull python code out to external file
2024-09-20 08:25:23 -05:00
bgbsww
85082b72d4 Move the recompute dialog to after Gui opens instead of per document signal. 2024-09-19 08:49:13 -05:00
bgbsww
097fd970f5 Gui: fix python syntax in C++ code that broke some compilers (#16614) 2024-09-18 09:06:20 -04:00
bgbsww
16129930ab Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 17:49:35 +02:00
bgbsww
4a04a7eb91 Move code for recompute dialog and disable warning 2024-09-16 17:49:35 +02:00
Zheng, Lei
c4d5cc5967 Transfer in LS3 code 2024-09-16 17:49:35 +02:00
wmayer
df67720eac Core: Expose Placement dialog to Python 2024-09-05 18:17:08 +02:00
Max Wilfinger
248b05e379 removed version "v0.21" from the old backup format warning message 2024-09-02 18:01:51 +02:00
wwmayer
7b0a23337c Gui: Prepare for clang-format (#16051)
* Gui: Prepare for clang-format

* [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>
2024-09-02 17:48:55 +02:00