From 6c2bb6005efa9ea765bf55f890f45a083913e0ed Mon Sep 17 00:00:00 2001 From: PiliLily Date: Sat, 8 Aug 2026 11:01:47 +0000 Subject: [PATCH 1/2] fix(mpris): dispatch Raise to player raise Dispatch the MPRIS Raise operation through PlayerItem::raise() instead of pause(). Signed-off-by: PiliLily --- modules/window-thumbnail/mpris/player-items-model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/window-thumbnail/mpris/player-items-model.cpp b/modules/window-thumbnail/mpris/player-items-model.cpp index aeec10d..f57cacb 100644 --- a/modules/window-thumbnail/mpris/player-items-model.cpp +++ b/modules/window-thumbnail/mpris/player-items-model.cpp @@ -161,7 +161,7 @@ void PlayerItemsModel::operation(const QModelIndex &index, MprisProperties::Oper } switch (operation) { case MprisProperties::Raise: - return MprisPlayerCollecter::self()->item(m_services.at(index.row()))->pause(); + return MprisPlayerCollecter::self()->item(m_services.at(index.row()))->raise(); case MprisProperties::Quit: return MprisPlayerCollecter::self()->item(m_services.at(index.row()))->quit(); case MprisProperties::Next: -- Gitee From 6337d4b991ebdd924e6427e04e4ff49d010447c3 Mon Sep 17 00:00:00 2001 From: PiliLily Date: Sat, 8 Aug 2026 11:02:05 +0000 Subject: [PATCH 2/2] test(mpris): verify Raise does not pause playback Assert the Raise operation increments only raiseCount and leaves pauseCount unchanged. Signed-off-by: PiliLily --- .../window-thumbnail/autotest/test-player-items-model.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/window-thumbnail/autotest/test-player-items-model.cpp b/modules/window-thumbnail/autotest/test-player-items-model.cpp index 7396332..ab90a76 100644 --- a/modules/window-thumbnail/autotest/test-player-items-model.cpp +++ b/modules/window-thumbnail/autotest/test-player-items-model.cpp @@ -411,9 +411,11 @@ void player_items_model_test::serviceLifecycleAndOperations() model->operation({}, MprisProperties::Seek, {}); - const int raiseOrPauseBefore = fakeService.raiseCount + fakeService.pauseCount; + const int raiseBefore = fakeService.raiseCount; + const int pauseBeforeRaise = fakeService.pauseCount; model->operation(row, MprisProperties::Raise, {}); - QTRY_COMPARE(fakeService.raiseCount + fakeService.pauseCount, raiseOrPauseBefore + 1); + QTRY_COMPARE(fakeService.raiseCount, raiseBefore + 1); + QCOMPARE(fakeService.pauseCount, pauseBeforeRaise); model->operation(row, MprisProperties::Quit, {}); QTRY_COMPARE(fakeService.quitCount, 1); -- Gitee