Fix build with gcc 4.8
ClosedPublic

Authored by wbauer on Nov 8 2017, 10:55 AM.

Details

Summary

When building master with gcc 4.8, the build fails with errors like this:

error: no matching function for call to 'MediaPlayer2Player::connect(QPointer<PlayerManager>&, void (PlayerManager::*)(const FileHandle&), MediaPlayer2Player* const, void (MediaPlayer2Player::*)()const)'

See also https://bugreports.qt.io/browse/QTBUG-48988

This patch fixes it.

The fix is similar to fixes in other applications, e.g. https://cgit.kde.org/kdevelop.git/commit/?h=5.2&id=6d5bdbba0a04d7180bda1f6bb47acb386575a561

Test Plan

Compiles fine now with gcc 4.8 and also newer versions.

Diff Detail

Repository
R344 Juk
Lint
Lint Skipped
Unit
Unit Tests Skipped
wbauer created this revision.Nov 8 2017, 10:55 AM
mpyne accepted this revision.Nov 9 2017, 12:13 AM

This is fine to commit, but please add a comment to the effect of //FIXME: Workaround for GCC 4.8, remove .data() in 2019. I can confirm this works fine with more recent GCCs (it seems this is a compiler bug as the QTBUG commentary states). I'm not sure which GCC compiler is the first to have this bug fixed but I can't imagine that I'd wait past 2019 either way.

This revision is now accepted and ready to land.Nov 9 2017, 12:13 AM
wbauer added a comment.Nov 9 2017, 1:25 PM

OK, I'll add that comment when I commit it.

This revision was automatically updated to reflect the committed changes.