Hi
the unit tests are worth nothing. They are probably not even working anymore these days. The problem with Qt and unit tests is that you need to mock a lot of stuff for each test unless you really separate UI from data. With modern Qt/QML apps this is much easier to achive. With classic Qt apps it's getting harder. In QMapShack I decided ages ago to use the tree widget items as data classes. This has a lot of benefits to keep the code simple and the UI fast. But writing unit tests is not that easy. One of the drawbacks of that solution. Anyways, this won't change anymore. There are no unit tests.
The branch I mentioned is a fully funktional port to Qt6 with the problems I mnetioned:
* Still depends on the QtCore5Compat module because of QTextCodec. The text codec is used to do proper string conversion when reading maps (mainly Garmin). Localization is done by code pages in these maps. Somehow Qt6 decided to drop that feature. At least that is my impression after a lengthy search.
* The translation with lupdate and lrelease is broken. As mentions this was based on some strange macros that where told to compensate for some problems ages ago. Qt6 comes with another set of cmake macros to automate translations. I haven't figured out how to use them. There are two flags in the QMS cmake stuff. One to enable/disable update of translation files. We don't want to update these files with every compile step. Another one to purge old unused translation strings. Usually we keep those translations as an example on how stuff was translated in the past. If there are too many the flag is enabled to clean up. This turned out to be a quite good practice in the past
* And the help system (the Wiki pages are stored in the system and you can read them locally with F1). This had some issues with Qt5 as they seem to do it differently between versions. No clue what we have to do for Qt6 to make it functional.
I converted all QRegExp into QRegularExpression. This is using a slightly different approach to regular experessions (more like Perl). I took special care writing example code to explore the differences. But as usual, especially with regular expressions, it's the details that break your neck. I am 100% sure I have introduced a regression. It would be a wonder if not.
The rest was more or less refactoring the code and silencing clazy and clang warnings.
Oliver
Gesendet: Donnerstag, 05. September 2024 um 18:10 Uhr
Von: "Torsten Metzner" <[email protected]>
An: "Oliver Eichler" <[email protected]>, "Andrey G. Grozin" <[email protected]>
Cc: "qlandkartegt-users" <[email protected]>
Betreff: Re: [Qlandkartegt-users] QMapShack and Qt6
Von: "Torsten Metzner" <[email protected]>
An: "Oliver Eichler" <[email protected]>, "Andrey G. Grozin" <[email protected]>
Cc: "qlandkartegt-users" <[email protected]>
Betreff: Re: [Qlandkartegt-users] QMapShack and Qt6
Hi Andrey,
when I read you email I thought, Torsten it is time to do something for the project. Because I think it should be possible for me to do a Qt6 port.
Currently/immediately I also do not have the time but I hope it is possible to find some time for this work between 1st of October and 31st of December 2024.
Perhaps I can start this work early in October, this depends how I set/change priorities.
@Oliver: Normally I would take the last developer branch, link it with Qt6 and then removing one error/warning after another. But you mentioned the branch https://github.com/kiozen/qmapshack/tree/porting_qt6, where you already did some work,
What do you recommend, should I use https://github.com/kiozen/qmapshack/tree/porting_qt6 or the latest developer branch when I start the work.
I hope I get the things done and QMapShack will not reach end of life.
Ciao,
Torsten
On 04.09.24 15:08, Oliver Eichler via Qlandkartegt-users wrote:
Hi Andrey, there is still no real plan to update to Qt6 any time soon. I simply lack the time and resource due to private matters.I was able to skim some time over the last days to get something half baked: https://github.com/kiozen/qmapshack/tree/porting_qt6 This is still based on the Core5Compat modules as I couldn't find a way to get rid of QTextCodec. Translation is broken. It's based on some wacky macros someone insisted to use ages ago. This has to be brought up-to-date what ever is considered "the right way" these days. Probably the whole help system is broken, too. It was quite wacky in Qt5. I am sure it needs more tweaks for Qt6 I have no time to test these changes. As I almost touched every file this has to be tested extensively. This includes testing all kind of maps (Garmin, JNX and GDAL). All kinds of devices (Garmin, TwoNav). The database stuff should be fairly safe. But better save files than sorry. If no one is actively picking up that branch I assume QMapShack will reach end of life when Qt5 is dumped. Sorry for that. I wish I still would have the time to maintain QMapShack properly. But this will not be the case for the next years coming. OliverGesendet: Montag, 02. September 2024 um 07:07 Uhr Von: "Andrey G. Grozin" <[email protected]> An: "qlandkartegt-users" <[email protected]> Betreff: [Qlandkartegt-users] QMapShack and Qt6 Hello *, Are there any plans to port QMapShack to Qt6? Qt5 support has ended at the end of 2020; all major linux distros will remove Qt5 relatively soon. I use QMapShack for my library of gpx tracks, and I am a OpenStreetMap volunteer - commit some new things to OpenStreetMap sometimes. I am the maintainer of the qmapshack package in Gentoo linux. Now we have received the message that Gentoo plans to remove Qt5 relatively soon. I have seen https://github.com/Maproom/qmapshack/issues/648. I think that porting to Qt6 is crucial for keeping QMapShack alive. Best wishes, Andrey _______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users_______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
_______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
