Commit 38e8e71d authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix build with gcc 4.8

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

Differential Revision: https://phabricator.kde.org/D8716
parent 1344176d
......@@ -45,14 +45,15 @@ MediaPlayer2Player::MediaPlayer2Player(QObject* parent)
: QDBusAbstractAdaptor(parent)
, m_player(JuK::JuKInstance()->playerManager())
{
connect(m_player, &PlayerManager::signalItemChanged, this, &MediaPlayer2Player::currentSourceChanged);
connect(m_player, &PlayerManager::signalPlay, this, &MediaPlayer2Player::stateUpdated);
connect(m_player, &PlayerManager::signalPause, this, &MediaPlayer2Player::stateUpdated);
connect(m_player, &PlayerManager::signalStop, this, &MediaPlayer2Player::stateUpdated);
connect(m_player, &PlayerManager::totalTimeChanged, this, &MediaPlayer2Player::totalTimeChanged);
connect(m_player, &PlayerManager::seekableChanged, this, &MediaPlayer2Player::seekableChanged);
connect(m_player, &PlayerManager::volumeChanged, this, &MediaPlayer2Player::volumeChanged);
connect(m_player, &PlayerManager::seeked, this, &MediaPlayer2Player::seeked);
//FIXME: Workaround for GCC 4.8, remove .data() in 2019
connect(m_player.data(), &PlayerManager::signalItemChanged, this, &MediaPlayer2Player::currentSourceChanged);
connect(m_player.data(), &PlayerManager::signalPlay, this, &MediaPlayer2Player::stateUpdated);
connect(m_player.data(), &PlayerManager::signalPause, this, &MediaPlayer2Player::stateUpdated);
connect(m_player.data(), &PlayerManager::signalStop, this, &MediaPlayer2Player::stateUpdated);
connect(m_player.data(), &PlayerManager::totalTimeChanged, this, &MediaPlayer2Player::totalTimeChanged);
connect(m_player.data(), &PlayerManager::seekableChanged, this, &MediaPlayer2Player::seekableChanged);
connect(m_player.data(), &PlayerManager::volumeChanged, this, &MediaPlayer2Player::volumeChanged);
connect(m_player.data(), &PlayerManager::seeked, this, &MediaPlayer2Player::seeked);
}
MediaPlayer2Player::~MediaPlayer2Player()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment