Time to drop support for Qt4?

Everything about development and the OpenMW source code.
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

Time to drop support for Qt4?

Post by Thunderforge »

Back in August 2017, a topic was created about how Qt4 is going away in Debian. The thread ended with the following:
psi29a wrote:we should probably abandon Qt4 in our code anyway to move on to Qt5 unless someone has a good reason not too.
For reference, the officially supported operating systems for Qt4.8 (the last version of Qt4) are Ubuntu 10 32-bit, Ubuntu 11 64-bit, Windows XP SP3, Windows 7 32-bit, and Mac OS X 10.6 and 10.7.

Qt5 seems to be working on a large number of developer systems, and the Mac setup instructions say to use Qt5.5.1 or higher anyway because Qt4 can't run on macOS 10.11+ (10.13 is the latest).

As best I can tell, the only reason we're still on Qt4 is because of this line in OpenMW-CS. Basically, we wanted to use multithreading at one point, but had to revert to single-threading instead. But I'm not aware of anybody complaining that single-threading has actually been a problem. I think the intention was that scrawl would eventually fix this, but now that he's left, I don't think that's going to happen.

Given that Qt4 is not supported on recent versions of macOS and will be removed from the next version of Debian, and the only issue doesn't appear to be bothering anybody running Qt5, are we prepared to drop Qt4 support?
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Time to drop support for Qt4?

Post by psi29a »

osgQt is not no longer apart of OSG as of 3.6, it's not actively being maintained anymore.

osgQtQuick on the other hand has picked up steam, Qt5 only support and supports multithread rendering.

From the OSG forums: how to solve QT5 multi-thread problem
http://forum.openscenegraph.org/viewtopic.php?t=16492

answer, you use osgQtQuick

pvdk has already said he was going to QML/QtQuick with the launcher...
viewtopic.php?f=2&t=5258&p=56297#p56294

That being said, I'm ok with the singlethreaded rendering for openmw-cs... I've never had an issue with it.
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Time to drop support for Qt4?

Post by Capostrophic »

are we prepared to drop Qt4 support?
For no reason other than that "it's old"? I'm not sure it was that difficult to maintain either.
Perhaps it'd be enough to just set the desired Qt version to 5 in CMake, but leave everything else related to it alone. Until a serious issue arises that requires moving to Qt5, dropping Qt4 support won't bring any real benefits, at least I don't see them.
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Time to drop support for Qt4?

Post by psi29a »

Capostrophic wrote: 29 Jun 2018, 08:04Until a serious issue arises that requires moving to Qt5, dropping Qt4 support won't bring any real benefits, at least I don't see them.
This is partialy valid, Qt4 and Qt5 co-exist well because osgQt is compatible with both, so as far as support on 'our' side, there isn't a problem.

Downstream is something else, Qt4 is no longer being shipped nor maintained on platforms. Upstream no longer cares, there is no support anymore if and when a bug comes up. I have no plan on carrying Qt4 on our PPA for example, but that isn't a problem because we can use the DESIRED_QT_VERSION=5 cmake param. This means that the renderer for OpenMW-CS will be single-threaded unless the problem is fixed in our version of osgQt or we migrate to osgQtQuick.

The real problem is that upstream osgQt is also no longer being maintained; it is booted out of OSG. So the likely-hood of a fix for the single/multithreaded issue is likely not going to happen from upstream.

The way forward is osgQtQuick which is Qt5 only, so going that direction forces us to drop Qt4 support anyway.
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

Re: Time to drop support for Qt4?

Post by Thunderforge »

Capostrophic wrote: 29 Jun 2018, 08:04
are we prepared to drop Qt4 support?
For no reason other than that "it's old"?
It's also that it's not supported on a growing number of platforms. If Qt5 is already a de facto requirement for macOS and soon to be Debian, I don't see the reason to support Qt4 on a dwindling number of platforms. I think that in this case waiting to migrate until we absolutely must is like waiting for a fire to start instead of working to prevent it.

And while the majority of benefits for Qt5 are not applicable to us, there are minor improvements that we will benefit from. When writing code for the testing options on the Advanced page of the Launcher, I had wanted to use QCompleter::filterMode, but that was introduced in 5.2, so I couldn't use it.
Capostrophic wrote: 29 Jun 2018, 08:04 Perhaps it'd be enough to just set the desired Qt version to 5 in CMake, but leave everything else related to it alone. Until a serious issue arises that requires moving to Qt5, dropping Qt4 support won't bring any real benefits, at least I don't see them.
I would be okay with this as an interim solution, although I think that ultimately we need to drop support for Qt4 entirely.
darkbasic
Posts: 153
Joined: 18 Apr 2016, 15:45
Contact:

Re: Time to drop support for Qt4?

Post by darkbasic »

psi29a wrote: 23 May 2018, 19:45 I and others would really really like to ditch Qt4 for Qt5, I still don't understand what is holding us back.
Couldn't agree more.
AnyOldName3 wrote: 23 May 2018, 23:36 I can't find any killer features of Qt 5 that Qt 4 doesn't have that we'd actually make use of. Can you give me some examples?
HiDPI support for example, but this is not even the main one. QT4 is discontinued and most distros don't even package it anymore.
Personally I wouldn't be interested to work on a QT4 codebase in 2019.
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Time to drop support for Qt4?

Post by AnyOldName3 »

I've mentioned it already, but it looks like upstream osgQt has fixed the threading bug with Qt5, so upgrading that dependency should allow us to upgrade Qt without issues.
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Time to drop support for Qt4?

Post by psi29a »

upstream osgQt is not outside OpenSceneGraph, since it was removed in 3.6

Our version of osgQt is slightly modified, you think we can just do a drop-in replacement as-is?
LoneWolf
Posts: 138
Joined: 26 Sep 2017, 19:13

Re: Time to drop support for Qt4?

Post by LoneWolf »

On my arch linux system qt4 was removed completely before I installed openmw (0.42) for the first time.

Openscenegraph 3.4.1 , mygui, boost, openal etc are all built against QT5 .

I have used openmw-CS a lot in that period, what symptoms/problems would singlethreaded rendering give ?
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Time to drop support for Qt4?

Post by psi29a »

Doesn't matter, we use our own version of osgQt that switches a few things around if using Qt4 or Qt5.

Qt4 is multithreaded renderer, Qt5 is singlethread... because of bug somewhere. If there is a fix in osgQt to have multi-threaded renderer with Qt5, then we no longer have a reason to stick with Qt4.
Post Reply