Skip to content
Extraits de code Groupes Projets
Vérifiée Valider c64aab4d rédigé par Kubat's avatar Kubat
Parcourir les fichiers

MISC: Get ride of one debug output

parent ba0574b4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Video playback with mpv
...@@ -23,6 +23,7 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep ...@@ -23,6 +23,7 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep
progressBar->setMaximum(static_cast<int>(timeDuration.count())); progressBar->setMaximum(static_cast<int>(timeDuration.count()));
progressBar->setValue(0); progressBar->setValue(0);
}); });
mpv->registerMpvTimeCallback([progressBar, this](double time) noexcept -> void { mpv->registerMpvTimeCallback([progressBar, this](double time) noexcept -> void {
if (!progressBar->isSliderDown()) { if (!progressBar->isSliderDown()) {
// The user is not pressing the slider // The user is not pressing the slider
...@@ -31,18 +32,12 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep ...@@ -31,18 +32,12 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep
} }
}); });
connect(progressBar, &QAbstractSlider::sliderMoved, this, [this](int value) noexcept -> void { connect(progressBar, &QAbstractSlider::sliderMoved, this,
// FIXME: Detect if it was done by the registered time callback... [this](int value) noexcept -> void { askedSliderPosition = value; });
askedSliderPosition = value;
});
connect(progressBar, &QAbstractSlider::actionTriggered, this, connect(progressBar, &QAbstractSlider::actionTriggered, this,
[progressBar](int action) noexcept -> void { [progressBar](int action) noexcept -> void {
switch (static_cast<QAbstractSlider::SliderAction>(action)) { switch (static_cast<QAbstractSlider::SliderAction>(action)) {
case QAbstractSlider::SliderAction::SliderMove:
qDebug() << "moved";
break;
case QAbstractSlider::SliderSingleStepAdd: case QAbstractSlider::SliderSingleStepAdd:
case QAbstractSlider::SliderSingleStepSub: case QAbstractSlider::SliderSingleStepSub:
case QAbstractSlider::SliderPageStepAdd: case QAbstractSlider::SliderPageStepAdd:
...@@ -50,6 +45,7 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep ...@@ -50,6 +45,7 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep
progressBar->setSliderPosition(progressBar->value()); progressBar->setSliderPosition(progressBar->value());
break; break;
case QAbstractSlider::SliderAction::SliderMove:
case QAbstractSlider::SliderNoAction: case QAbstractSlider::SliderNoAction:
case QAbstractSlider::SliderToMinimum: case QAbstractSlider::SliderToMinimum:
case QAbstractSlider::SliderToMaximum: case QAbstractSlider::SliderToMaximum:
...@@ -66,8 +62,6 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep ...@@ -66,8 +62,6 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep
connect(togglePlaybackButton, &QAbstractButton::clicked, mpv, &MpvContainer::mpvTogglePlayback); connect(togglePlaybackButton, &QAbstractButton::clicked, mpv, &MpvContainer::mpvTogglePlayback);
connect(mpv, &MpvContainer::mpvPlaybackToggled, this, connect(mpv, &MpvContainer::mpvPlaybackToggled, this,
[this, togglePlaybackButton](bool isPlay) noexcept -> void { [this, togglePlaybackButton](bool isPlay) noexcept -> void {
qDebug() << "Got playback update to"
<< (isPlay ? QStringLiteral("Play") : QStringLiteral("Pause"));
togglePlaybackButton->setIcon(isPlay ? pauseIcon : playIcon); togglePlaybackButton->setIcon(isPlay ? pauseIcon : playIcon);
}); });
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter