added qtmultimedia version for sound

This commit is contained in:
Geoffray Levasseur committed 2026-11-04 15:41:15 +01:00
1 parent 70ff70652c
commit 808b403bba
8 files changed
+172 -7

No files matched your search

+5 -2
View File
@@ -26,6 +26,7 @@
// The fact that you are presently reading this means that you have had
// knowledge of the CeCILL license and that you accept its terms.
#include "Sound.h"
#include "CityScreen.h"
#include "ui_CityScreen.h"
@@ -160,8 +161,10 @@ QString governmentName(int gov)
return QStringLiteral("Government #%1").arg(gov);
}
// TODO: Sound.pas (Play()/Sounds[] item lookup) isn't ported - no-op.
void play(const QString &) {}
void play(const QString &item)
{
Sound::play(item);
}
} // namespace
+2 -2
View File
@@ -26,6 +26,7 @@
// The fact that you are presently reading this means that you have had
// knowledge of the CeCILL license and that you accept its terms.
#include "Sound.h"
#include "MessgEx.h"
#include "ui_MessgEx.h"
@@ -502,8 +503,7 @@ void MessgExDlg::paintEvent(QPaintEvent *event)
if (!openSound.isEmpty()) {
QTimer::singleShot(0, this, [this] {
// TODO: needs Sound.pas's Play()/Sounds[] item lookup (not
// ported yet).
Sound::play(openSound);
openSound.clear();
});
}