Bug 159 - Migrate to Qt5
Summary: Migrate to Qt5
Status: RESOLVED FIXED
Alias: None
Product: Hedgewars
Classification: Unclassified
Component: Desktop Frontend (show other bugs)
Version: unspecified
Hardware: PC All
: Highest enhancement
Assignee: unC0Rr
URL:
Depends on:
Blocks: 158
  Show dependency tree
 
Reported: 2017-04-07 01:12 UTC by Wuzzy
Modified: 2018-03-14 00:24 UTC (History)
3 users (show)

See Also:


Attachments
Graph bug (247.94 KB, image/png)
2018-01-24 23:44 UTC, Lyberta
Details
Scheme settings scaling bug (425.51 KB, image/png)
2018-01-25 00:12 UTC, Lyberta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wuzzy 2017-04-07 01:12:38 UTC
Qt4 has reached end of life and does not get ANY bugfixes.

Operating systems are also starting to drop Qt4 support or already have done so.

So I think migrating Hedgewars to Qt5 is an important long-term goal.

See also: https://hedgewars.org/node/6630
Comment 1 Wuzzy 2017-09-21 14:29:14 UTC
Someone has provided some WIP code:

http://hedgewars.org/node/6813

I haven't looked at this yet.
Comment 2 Lyberta 2017-12-17 00:21:23 UTC
Qt 4 will be removed from the next Debian. We must hurry.

https://wiki.debian.org/Qt4Removal
Comment 3 userid21 2018-01-23 10:25:39 UTC
The Gentoo Linux distribution is actively removing Qt4 packages from its repository. It seems Hedgewars has been just marked for removal:

https://archives.gentoo.org/gentoo-dev/message/5757e3b1628b96ff4305a8d98ab6c04a
Comment 4 nemo 2018-01-24 16:31:49 UTC
The importance of this has climbed even higher due to the gentoo timeline.

It might force our hand on the qml migration.

QML would be preferable long-term, but unfortunately hacking in a fix for the removed qt4 functionality we are dependent on that was stripped from qt5 and doing the simpler conversion otherwise, might be necessary in the interim.

Even if we all worked hard on the qml, seems unlikely could get it tested and reliable in time.
Comment 5 Lyberta 2018-01-24 22:42:20 UTC
unC0Rr has started qt5transition branch that does mechanical tranformation from Qt 4 to Qt 5.

In order to switch to this branch, you need to do:

hg up qt5transition

On Debian-based systems, you need main Qt 5 development packages but also libqt5svg5-dev and qttools5-dev.
Comment 6 Lyberta 2018-01-24 22:46:46 UTC
You also need qtbase5-private-dev.
Comment 7 Lyberta 2018-01-24 23:42:46 UTC
Also qttools5-dev-tools
Comment 8 Lyberta 2018-01-24 23:44:25 UTC
Created attachment 77 [details]
Graph bug

Graphs at the end of the round are broken.
Comment 9 Lyberta 2018-01-25 00:12:00 UTC
Created attachment 78 [details]
Scheme settings scaling bug

The "No" signs in scheme settings are scaled incorrectly.
Comment 10 nemo 2018-01-25 19:24:52 UTC
unc0rr made this interim branch:
https://hg.hedgewars.org/hedgewars/log?rev=branch(qt5transition)

It makes use of the fact that while qt5 removed the FileEngine he was using for physfs, it is still available privately, at least for now.

https://hg.hedgewars.org/hedgewars/diff/12897/QTfrontend/util/FileEngine.h

In testing, it seems fine, apart from qt5 messing up some styling, an old problem with Qt that setting app.setStyle("fusion") in main.cpp seems to fix.  Apart from that, I didn't run into any issues.

The permanent solution is the:
https://hg.hedgewars.org/hedgewars/log?rev=branch(qmlfrontend)
Comment 11 Lyberta 2018-03-11 04:32:38 UTC
Recent commits by unC0Rr have fixed all the bugs that I've found. Should be good for release.
Comment 12 Wuzzy 2018-03-14 00:24:12 UTC
We're on Qt5 now.

Remaining bugs related to the transition are tracked here:

https://issues.hedgewars.org/show_bug.cgi?id=591