Commit Graph

117 Commits

Author SHA1 Message Date
wmayer
fa8978ce99 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
dbad96d43e modernize C++: use using 2023-08-06 23:17:10 +02:00
andrea
d37099fcbf remove qt4 references
Removed find and include mocked files (QT4)
2023-08-04 21:24:36 -06:00
wmayer
640467aa49 Gui: modernize C++: use override 2023-08-04 17:09:53 +02:00
wmayer
8c0fd2706a Qt6: fix possible build failure
* add CMake definitions 'QT_NO_KEYWORDS' to avoid the Qt definition of the 'slots' macro that causes a conflict when including Python headers
* drop QT3_SUPPORT define
2023-07-20 08:58:56 -05:00
Edoardo Morandi
e6323b9bc8 fix: UB by erroneous event downcasting
When an event type is `QEvent::Wheel`, the event type is `QWheelEvent`,
which is not a `QMouseEvent`. This caused a undefined behavior that can
be cached by ubsan.
2023-04-17 23:42:15 +02:00
wmayer
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
wmayer
09ae3b2ab8 Gui: Qt6 port
* QString::indexOf() is now marked as [[nodiscard]]
* Replace deprecated methods of QMessageBox
* QMouseEvent::globalPos() is deprecated, use globalPosition().toPoint()
* QWidget::enterEvent() requires a QEnterEvent as argument
* QLibraryInfo::location() is deprecated, use path()
* QVariant::Type is deprecated, use QMetaType::Type
* QVariant::canConvert(int) is deprecated, use QVariant::canConvert(QMetaType) or QVariant::canConvert<T>()
* QMessageBox::standardIcon is deprecated, use QStyle::standardIcon()
* Replace deprecated method QMessageBox::question(), ...
* QApplication::fontMetrics() is deprecated
* QDropEvent::mouseButtons() is deprecated, use buttons()
* QDropEvent::keyboardModifiers() is deprecated, use modifiers()
* Constructor of QFontDatabase is deprecated, use static methods instead
* Qt::AA_DisableHighDpiScaling is deprecated
* Qt::AA_EnableHighDpiScaling is deprecated
* Qt::AA_UseHighDpiPixmaps is deprecated
2022-12-31 21:54:45 +01:00
wmayer
d91de9ceb2 Core: Qt6 migration, use PySide 2022-11-06 14:09:18 +01:00
wmayer
fac648fff5 Qt6 port:
* Explicitly include some missing headers
* Use 'static const char*' for XPM icon
* Skip template parameters for qMakePair
* Constructor of QFileInfo is marked as 'explicit' now
* QString::fromLatin1() also accepts a QByteArray
* QDateTime::fromTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::fromSecsSinceEpoch()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QApplication::globalStrut() is deprecated. Don't use it any more.
* QWidget::isTopLevel() is deprecated, use QWidget::isWindow()
2022-11-02 15:16:41 +01:00
0penBrain
fe12d2e4ba Gui: add getter about home position to QuarterAdaptor 2022-09-28 17:29:11 +02:00
wmayer
bdb1e22fc0 [skip ci] Debian patches:
* Fix FTBFS on armhf/armel, undefined GL_PROJECTION (issue 1014875)
* Disable syntax checks for some Python modules
2022-09-06 14:40:10 +02:00
wmayer
76c993baae Fix several clazy issues:
* Don't call ... on temporary [-Wclazy-detaching-temporary]
2022-07-25 00:18:42 +02:00
wmayer
fd5558f295 Fix several clazy issue:
* Using copy-ctor but class SbMatrix/SbViewportRegion has a trivial copy-ctor but non trivial assign operator [-Wclazy-rule-of-two-soft]
2022-07-24 19:38:59 +02:00
wmayer
3fddaf4a2f Fix several clazy issues:
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify]
* Use Q_ENUM instead of Q_ENUMS [-Wclazy-qenums]
* Add missing a Q_OBJECT macro [-Wclazy-missing-qobject-macro]
* Signal/Slot arguments need to be fully-qualified [-Wclazy-fully-qualified-moc-types]
2022-07-24 19:03:30 +02:00
Uwe
c40e476a5b [Gui] remove some more superfluous nullptr checks 2022-07-18 13:15:38 +02:00
Uwe
d5b227e6a6 [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
Uwe
bb2b49fb1f [Gui] remove superfluous nullptr checks 2022-07-18 03:17:42 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
4791575e31 Gui: remove some superfluous const_cast 2022-06-24 14:48:52 +02:00
Chris Hennes
5df3dbae6f Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
6a450f2c49 Gui: [skip ci] do not include Inventor/SbByteBuffer.h for older Coin3D versions 2022-03-22 10:36:03 +01:00
wmayer
b1aa7cdad4 Gui: fix build failure with older Coin3D versions 2022-03-21 19:59:03 +01:00
wmayer
aaa41bf919 Gui: [skip ci] change include order to avoid warnings with MSVC
* QtGui/qopenglext.h(11119,1): warning C4005: 'GL_OFFSET_TEXTURE_2D_MATRIX_NV': macro redefinition
* QtGui/qopenglext.h(11120,1): warning C4005: 'GL_OFFSET_TEXTURE_2D_SCALE_NV': macro redefinition
* QtGui/qopenglext.h(11121,1): warning C4005: 'GL_OFFSET_TEXTURE_2D_BIAS_NV': macro redefinition
2022-03-14 15:24:10 +01:00
wmayer
b78dc894e1 Core: Fix several coverity issues:
* CID 350582: Big parameter passed by value
* CID 350639: Big parameter passed by value
* CID 305234: Uncaught exception
* CID 316529: Uncaught exception
* CID 350597: Uncaught exception
* CID 350623: Uncaught exception
* CID 332690: Uncaught exception
* CID 332700: Unchecked return value
* CID 350576: Uninitialized scalar field
* CID 350587: Uninitialized scalar variable
* CID 192606: Uninitialized scalar field
* CID 332699: Uninitialized pointer field
* CID 350561: Dereference null return value
* CID 350610: Dereference null return value
* CID 350567: Dereference after null check
2022-03-13 13:53:32 +01:00
Uwe
4f5c29edd6 [Gui] Quarter: remove unused includes 2022-03-09 01:12:15 +01:00
Uwe
11b99a94a9 [Gui] Quarter: remove few unused includes
- mainly sorting
2022-03-06 21:47:17 +01:00
Uwe
6edbe53cc3 [Gui] Quarter: add missing copyright headers
using the one of the header file
2022-03-06 21:01:12 +01:00
Uwe
2551d15f98 [Gui] InteractionMode: add missing copyright header
using the one of the header file
2022-03-06 20:38:54 +01:00
wmayer
a87e33258d Gui: remove support of using deprecated Qt OpenGL API 2022-01-26 14:46:41 +01:00
wmayer
3dcbceda3a C++11: modernize use nullptr (replaces NULL or 0) 2021-11-05 18:16:19 +01:00
Mateusz Skowroński
5032a8e31f Qt::MidButton is deprecated. Use Qt::MiddleButton instead. 2021-04-04 11:33:51 +02:00
Chris Hennes
098d7b9aee [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
vosk
21e5fb66c4 [APP] - Fix leaking QGraphicsScene in QuarterWidget 2021-02-19 16:44:16 +01:00
wmayer
ed62c73ca2 Gui: [skip ci] Revert workaround to avoid to handle wheel events twice inside the 3d view
This workaround caused a regression with Qt 5.15. For more details see: https://forum.freecadweb.org/viewtopic.php?f=3&t=50231
2020-11-03 14:50:06 +01:00
luz paz
27fc4d6c7e Fix various typos [skip-ci] 2020-10-24 12:25:46 +02:00
wmayer
4f219342a7 Qt5: fix build failure with Qt 5.15 2020-10-18 16:17:48 +02:00
wmayer
2647987157 Qt5: fix deprecation warnings of QWheelEvent in Qt 5.15 2020-10-18 14:45:31 +02:00
vejmarie
704d4d9945 Big update to remove deprecation warning from Qt 5.15.0
That is need on MacOS build as travis log is bigger than 50k lines
which breaks travis rules
And by the way deprecations are real
All file contains the same modification replace 0 to Qt::WindowFlags() when needed
as the class needs to be instantiated

Signed-off-by: vejmarie <jmverdun3@gmail.com>
2020-09-24 12:56:43 +02:00
Oscar Rainford
9107d1f376 Include Inventor/SbByteBuffer.h in QuarterWidget.cpp to allow compilation with latest Coin3D library. 2020-09-22 14:05:01 +02:00
DeepSOIC
1cb10c078f Gui: implement SoMouseWheelEvent
and sythesize it instead of fake buttons 4 and 5
2020-08-22 17:15:02 +02:00
Zheng, Lei
d960783a02 Gui: fix 'Recursive repaint' warning when switching 3D views 2020-05-06 12:14:00 +02:00
wmayer
5ea0ae5471 Gui: [skip ci] disable workaround to avoid handling an event twice because it leads to a regression on macOS 2020-04-03 15:11:24 +02:00
wmayer
e498b0ebbf Gui: [skip ci] avoid that 3D view handles a single wheel scroll event twice 2020-04-02 14:02:03 +02:00
wmayer
57576d7d27 Gui: override QOpenGLWidget::paintGL() in sub-class [skip ci] 2020-01-08 13:28:50 +01:00
wmayer
402aca93af [skip ci] issue #0004164, issue #0004237: macOS crash when opening project from 'Recent files' 2020-01-03 16:14:55 +01:00
luz.paz
04ba2872f0 src/Gui: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Gui` files
2019-12-25 11:39:17 +01:00
wmayer
9337114714 fix possible segfault in SoQTQuarterAdaptor::convertOrtho2Perspective 2019-09-19 17:54:42 +02:00
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
c9ba972d26 Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view.

Please check [here](https://git.io/fjiY5) for more details, including
the following 'Render Caching' section.

The patch also includes modification of View3DInventorViewer to support
always-on-top selection rendering using the secondary selection context
and the new coin node SoFCPathAnnotation.

Another small change in SoQtQuarterAdaptor for more responsive frame
rate display. The original implementation reports skewed frame rate
in the presence of long idle period.
2019-08-17 14:52:10 +02:00