Fix compilation on Qt 5.6
ClosedPublic

Authored by rominf on Feb 20 2018, 3:16 PM.

Diff Detail

Repository
R166 Spectacle
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rominf requested review of this revision.Feb 20 2018, 3:16 PM
rominf created this revision.
adridg added a subscriber: adridg.Feb 20 2018, 3:55 PM

@rominf was debugging this on IRC. In Qt 5.7, the QAction constructor gained a default value for explicit QAction(QObject *parent = nullptr);. It did not have this in Qt 5.6. This patch adds the argument to the constructor, so that Spectacle compiles with Qt 5.6. An alternative would be to bump the Qt requirement to 5.7, but that leaves LTS distro's in the cold (actually, Spectacle's CMakeLists requires Qt 5.4).

rkflx added a comment.Feb 20 2018, 4:02 PM

Thanks for the report and the patch, I'm on it! We definitely want to support Qt 5.6 if this is not too much of a hassle, e.g. openSUSE Leap 42.3 still has it too. As the CI does not check this old version anymore and it is impractical to test when developing, we kind of rely on such reports.

@rominf Could you bump CMakeLists.txt to 5.6 at least, please? Also, do you have commit access?

rominf updated this revision to Diff 27622.Feb 20 2018, 4:20 PM
  • Set minimal Qt version to 5.6

@rkflx did you mean QT_MIN_VERSION and PLASMA_MIN_VERSION or just QT_MIN_VERSION?

@rkflx No, I don't have commit access. Should I get it?

rkflx accepted this revision.Feb 20 2018, 6:21 PM
rkflx added a project: Spectacle.

I verified the fix in the meantime, works great and @adridg's explanation is spot-on .

@rkflx did you mean QT_MIN_VERSION and PLASMA_MIN_VERSION or just QT_MIN_VERSION?

You did fine, I only meant QT_MIN_VERSION because that's where it broke. Not sure what the other versions should say, let's not touch them in this patch.

There's still an issue with Purpose, but we'll figure this out in an audit of 1d2e24ace9f3.

@rkflx No, I don't have commit access. Should I get it?

Don't worry, I'll land the patch on your behalf. Normally once you have a couple of patches in and are interested in contributing further, someone will ask you to apply for developer access. Let us know if you are interested in that process and need ideas for what to work on next – there are plenty of bugs everywhere ;)

This revision is now accepted and ready to land.Feb 20 2018, 6:21 PM
This revision was automatically updated to reflect the committed changes.