diff --git a/src/qt_gui/game_grid_frame.cpp b/src/qt_gui/game_grid_frame.cpp index 490818aef..3113aecc0 100644 --- a/src/qt_gui/game_grid_frame.cpp +++ b/src/qt_gui/game_grid_frame.cpp @@ -44,7 +44,8 @@ void GameGridFrame::PlayBackgroundMusic(QTableWidgetItem* item) { BackgroundMusicPlayer::getInstance().stopMusic(); return; } - const auto snd0path = QString::fromStdString(m_game_info->m_games[item->row()].snd0_path); + QString snd0path; + Common::FS::PathToQString(snd0path, m_game_info->m_games[item->row()].snd0_path); BackgroundMusicPlayer::getInstance().playMusic(snd0path); } diff --git a/src/qt_gui/game_list_frame.cpp b/src/qt_gui/game_list_frame.cpp index ea02ed3cf..45e52f37d 100644 --- a/src/qt_gui/game_list_frame.cpp +++ b/src/qt_gui/game_list_frame.cpp @@ -74,7 +74,8 @@ void GameListFrame::PlayBackgroundMusic(QTableWidgetItem* item) { BackgroundMusicPlayer::getInstance().stopMusic(); return; } - QString snd0path = Common::FS::PathToQString(m_game_info->m_games[item->row()].snd0_path); + QString snd0path; + Common::FS::PathToQString(snd0path, m_game_info->m_games[item->row()].snd0_path); BackgroundMusicPlayer::getInstance().playMusic(snd0path); } diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index a87a075e1..f80e3d883 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -520,7 +520,8 @@ void MainWindow::PlayBackgroundMusic() { : m_game_grid_frame->crtRow * m_game_grid_frame->columnCnt + m_game_grid_frame->crtColumn; - QString snd0path = Common::FS::PathToQString(m_game_info->m_games[itemID].snd0_path); + QString snd0path; + Common::FS::PathToQString(snd0path, m_game_info->m_games[itemID].snd0_path); BackgroundMusicPlayer::getInstance().playMusic(snd0path); }