diff options
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 7a65391..f14cc20 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -8,8 +8,9 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() ~Qt::WindowMaximizeButtonHint); ao_app->initBASS(); - +#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) // Needed for pre-5.10 RNG stuff qsrand(static_cast<uint>(QDateTime::currentMSecsSinceEpoch() / 1000)); +#endif keepalive_timer = new QTimer(this); keepalive_timer->start(45000); @@ -4142,6 +4143,11 @@ void Courtroom::mod_called(QString p_ip) void Courtroom::case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno) { + Q_UNUSED(def); + Q_UNUSED(pro); + Q_UNUSED(jud); + Q_UNUSED(jur); + Q_UNUSED(steno); if (ui_casing->isChecked()) { ui_server_chatlog->append(msg); modcall_player->play(ao_app->get_court_sfx("case_call")); @@ -4946,7 +4952,11 @@ void Courtroom::music_random() } if (clist.length() == 0) return; +#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) on_music_list_double_clicked(clist.at(qrand() % clist.length()), 1); +#else + on_music_list_double_clicked(clist.at(QRandomGenerator::global()->bounded(0, clist.length())), 1); +#endif } void Courtroom::music_list_expand_all() { ui_music_list->expandAll(); } |
