Kunda1 wrote: ↑Sun Jan 09, 2022 1:04 pm
Do you have a link to the upstream Qt5 bug?
Not really, it rather my guess. BTW I'm just an end user, so just my 2cts. I've edited my previous post.
Sorry if that's a bit offtopic:
I think about Qt5 related issue since FC works fine on RPIOS32B when compiled with Py2/Qt4 or Py3/Qt4 but crashs with Py2/Qt5 or Py3/Qt5 (GL context issue).
My 2cts conclusion : Qt5 is involved with some 32B/64B stuffs. I may be wrong though, I'm not skilled to investigate further. issue #4083
Regarding Qt6. Has anyone started on it yet?
It's a bit annoying that web view doesn't work on macOS with arm64 chipset, bumping qt to version 6 would fix that.
It sounds like a nice project to for me tinker with to get back to freecad hacking, so I'm happy to help or I can start with it if no one has done it already
We don't generally maintain those branches as part of the depot, but of course we strongly encourage working on a branch on your own fork. If several people want to collaborate on the branch I'd just post a link to it here.
openBrain wrote: ↑Thu Jan 20, 2022 7:30 am
Maybe @chennes or another core dev can create a branch in main repo ?
I don't know if we really need an official branch for it. There are a lot of changes that needs to be done, but just like freecad used to support both qt4 and qt5 it is possible to support both qt5 and qt6 too.
I've started on my own repo https://github.com/hyarion/freecad/tree/qt6 for now. I'm just hacking an slashing at the moment, but when the times comes that something boots up and can be tested I'll start with prettifying it and create merge request(s) to the main repo.
Freecad uses a lot of deprecated classes in qt (which is expected for a big project), so I'm trying my best to update everything in a compatible way, supporting Qt 5.9 and forward.
hyarion wrote: ↑Thu Jan 20, 2022 10:21 pm
Freecad uses a lot of deprecated classes in qt (which is expected for a big project), so I'm trying my best to update everything in a compatible way, supporting Qt 5.9 and forward.
Thanks for working on this. I'd presume that not everything that is deprecated has been dropped in Qt6, I hope some of these classes are still marked as deprecated in Qt6, but continue existing. If you have already done work on this, it'd be superb if you could list in this thread the Qt classes used in FreeCAD currently, but dropped in Qt6. That would serve as a good advance warning for others!
hyarion wrote: ↑Thu Jan 20, 2022 10:21 pm
when the times comes that something boots up and can be tested I'll start with prettifying it and create merge request(s) to the main repo.
Thanks for your effort!
When you'll make a PR or when something will be ready to compile, please report here as well.
-alex- wrote: ↑Fri Jan 21, 2022 9:16 am
When you'll make a PR or when something will be ready to compile, please report here as well
Will do!
aapo wrote: ↑Fri Jan 21, 2022 7:51 am
If you have already done work on this, it'd be superb if you could list in this thread the Qt classes used in FreeCAD currently, but dropped in Qt6. That would serve as a good advance warning for others!
Sure! The list is currently as follows:
QRegExp -> QRegularExpression
QRegExpValidator -> QRegularExpressionValidator
QGL, we already support QOpenGL which is basically the same in qt6
Qt WebKit (QWebView, QWebPage etc.), but we already support QWebEngine which is available in Qt6.2+
QTextCodec (when used with QTextStreams, instead of calling QTextStream::setCodec("UTF-8") you can use QTextStream::setEncoding(QStringConverter::Utf8))
QPair has been deprecated, though there is a proxy for it, it's recommended to use std::pair instead.
QVariant::setValue() -> QVariant::fromValue() which returns a new QVariant with the value from whatever you call it with.
setFallbackSessionManagementEnabled
QInputEvent::QInputEvent requires a QInputDevice
QDateTime::toTime_t -> QDateTime::toSecsSinceEpoch, from 32bits to 64bits to avoid roll over in 2038
The items above does not include what's handled by Qt5Compat.
Thanks a lot for this list! That particular item already bites me, because I have currently a TechDraw PR pending that uses QRegExp(). Well, I should probably fix it right away, as QRegExp and QRegularExpression should work exactly the same for my use case. I've been using QRegExp() because it's shorter to write, without realizing it's deprecated!