mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-25 19:41:38 -08:00
Use dynamic_cast instead of qobject_cast
This commit is contained in:
1 parent
a8130194df
commit
792feecbe9
1 file changed
+2
-2
@@ -154,7 +154,7 @@ settings::settings(wivrn_server * server_interface) :
|
||||
fill_steam_games_list();
|
||||
load_settings();
|
||||
|
||||
auto encoders = qobject_cast<QStandardItemModel *>(ui->encoder->model());
|
||||
auto encoders = dynamic_cast<QStandardItemModel *>(ui->encoder->model());
|
||||
#if !WIVRN_USE_NVENC
|
||||
encoders->item(1)->setEnabled(false);
|
||||
#endif
|
||||
@@ -227,7 +227,7 @@ void settings::on_selected_encoder_changed()
|
||||
{
|
||||
int encoder = ui->encoder->currentIndex();
|
||||
|
||||
QStandardItemModel * model = qobject_cast<QStandardItemModel *>(ui->codec->model());
|
||||
QStandardItemModel * model = dynamic_cast<QStandardItemModel *>(ui->codec->model());
|
||||
assert(model);
|
||||
|
||||
for (int i = 0, n = model->rowCount(); i < n; i++)
|
||||
|
||||
Reference in new issue
Block a user