added qtmultimedia version for sound
This commit is contained in:
1 parent
70ff70652c
commit
808b403bba
8 files changed
+172
-7
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user