Qt6 migration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Qt6 migration

dxli
I found v2 is still useful for me as a user.

A qt6 branch is now available for developers:

1. it builds with qt6 at least;
2. still some deprecated API usages to be replaced;
3. qt6 doesn't support i686 in official releases, so only 64 bit for users from now on. Does any windows user still care about 32bit?
4. we are not using any qt5 compatibility module: Qt::Core5Compat;
5. I got lots of qt designer (ui form) connection trouble due to qt6 changes, and still using legacy for connections.
https://stackoverflow.com/questions/67643618/qt6-migration-uic-generated-code-fails-to-compile-connect-slots-updated

Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

marko.p.radojcic
I tested the qt6 branch on macos Sonoma 14.1.1 using qt6 from homebrew and it works nicely, looks a bit better than qt5, functionally I don't see any difference.

I am testing it now on Windows.

I have an issue with building on macos, specifically freetype2 library is not detected. What is the proper way to install and configure it in the project ?
Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

dxli
With qt6, there's a chance we can properly fix the high resolution issues finally, but I don't have a 4k display at home.

There might be some filtering issue with the qg_layerwidget class due to the qt6 changes.

All deprecated api calls should have been fixed by my last commit.
marko.p.radojcic wrote
I tested the qt6 branch on macos Sonoma 14.1.1 using qt6 from homebrew and it works nicely, looks a bit better than qt5, functionally I don't see any difference.

I am testing it now on Windows.

I have an issue with building on macos, specifically freetype2 library is not detected. What is the proper way to install and configure it in the project ?
Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

marko.p.radojcic
dxli wrote
With qt6, there's a chance we can properly fix the high resolution issues finally, but I don't have a 4k display at home.

There might be some filtering issue with the qg_layerwidget class due to the qt6 changes.

All deprecated api calls should have been fixed by my last commit.
It successfully built and runs on Windows, but the problem is with hatches. It loaded only ansi31 pattern and when clicking on preview the program crashed.

I will have to QA test it a bit more today, and verify my mac build if it is doing the same.
BTW, the hatch is not working properly with alpha build with C++17 enabled. I will test stable as well.
It seems like an open wound, maybe it should be just left as is for now.

Do you know how should I configure freetype2 to work with LibreCAD build on mac and Windows ?
Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

LordOfBikes
Administrator
Welcome Marko!

Freetype 2 is only used in ttf2llf tool and it should be optional.
Off the top of my head I can't say how it is detected or controlled, but LibreCAD builds fine without freetype2. It is somewhere in the qmake project files and a manual path can be set by custom.pri iirc.

ttf2lff is our font converter and I recently published a test site at https://librecad.org/ttf2lff/ where ttf2lff is triggered with an upload form. The converted LFF file can then be downloaded there.
So basically there is no need to build this tool and you must not necessarily struggle with it.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

marko.p.radojcic
LordOfBikes wrote
Welcome Marko!

Freetype 2 is only used in ttf2llf tool and it should be optional.
Off the top of my head I can't say how it is detected or controlled, but LibreCAD builds fine without freetype2. It is somewhere in the qmake project files and a manual path can be set by custom.pri iirc.

ttf2lff is our font converter and I recently published a test site at https://librecad.org/ttf2lff/ where ttf2lff is triggered with an upload form. The converted LFF file can then be downloaded there.
So basically there is no need to build this tool and you must not necessarily struggle with it.

Armin
Thank you for the welcome.
I will not struggle with the freetype2 library, yes, it is used by ttf2lff only.
I checked Windows release 2.2.0.2 and it also has problem with hatches. It doesn't crash but it doesn't show the hatch, nor does it display on main view. Linux qt5 release does not have this problem. I am attempting Linux qt6 build, but unfortunately my repositories have Qt 6.2.4 only and it the build is failing.

Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

dxli
In reply to this post by marko.p.radojcic
I feel it's probably the same regexp issue as we have with the layer widget.
marko.p.radojcic wrote
dxli wrote
With qt6, there's a chance we can properly fix the high resolution issues finally, but I don't have a 4k display at home.

There might be some filtering issue with the qg_layerwidget class due to the qt6 changes.

All deprecated api calls should have been fixed by my last commit.
It successfully built and runs on Windows, but the problem is with hatches. It loaded only ansi31 pattern and when clicking on preview the program crashed.

I will have to QA test it a bit more today, and verify my mac build if it is doing the same.
BTW, the hatch is not working properly with alpha build with C++17 enabled. I will test stable as well.
It seems like an open wound, maybe it should be just left as is for now.

Do you know how should I configure freetype2 to work with LibreCAD build on mac and Windows ?
Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

marko.p.radojcic
I managed to build and start on Linux with Qt 6.6.0, the program starts. But many options cause it to crash.

The build on mac also produced ~40 warnings. I will test same options on mac build again.

Adding text doesn't work, and just clicking on hatch in Linux causes a crash with mention of adding a Layout to a Window that has layout. I will try to look at debug output. It is caused by a non-default font. It doesn't work anymore.

To cleanup the qt6 branch I think we should first clear all the type casting and other warnings.

This way we eliminate other potential random behavior.

Also, to get LibreCAD i just compiled to run on Linux I needed to install libxcb-cursor0 package.

I will first try to make improvements to my translation that is slowly progressing, then I would like to test it.

Is it possible to download the translated file and run it in LibreCAD prior to release of translation? To actually see it in action ?

Do we have a QA task checklist to test each new release ?
Reply | Threaded
Open this post in threaded view
|

Re: Qt6 migration

marko.p.radojcic
marko.p.radojcic wrote
I managed to build and start on Linux with Qt 6.6.0, the program starts. But many options cause it to crash.

The build on mac also produced ~40 warnings. I will test same options on mac build again.

Adding text doesn't work, and just clicking on hatch in Linux causes a crash with mention of adding a Layout to a Window that has layout. I will try to look at debug output. It is caused by a non-default font. It doesn't work anymore.

To cleanup the qt6 branch I think we should first clear all the type casting and other warnings.

This way we eliminate other potential random behavior.

Also, to get LibreCAD i just compiled to run on Linux I needed to install libxcb-cursor0 package.

I will first try to make improvements to my translation that is slowly progressing, then I would like to test it.

Is it possible to download the translated file and run it in LibreCAD prior to release of translation? To actually see it in action ?

Do we have a QA task checklist to test each new release ?
To answer some of my own questions. It is possible to temporarily add a translation to the build by adding to system.cpp the needed translation line (if it doesn't exist already) and adding 2 file to the tree one for LibreCAD and one for Plugins. This enabled me to check and see how things looked in the translation I made and to spot some of my errors. Files can be retrieved at Weblate by downloading zip files for translations for LibreCAD and for Plugins (even if they are incomplete).

Also, make sure not to commit and push this change unless language file is approved.