| 2412 | } |
| 2413 | |
| 2414 | void WidgetInfo::EditListAddFiles() |
| 2415 | { |
| 2416 | QListWidget *list = reinterpret_cast<QListWidget *>(widget); |
| 2417 | const char *desc = obs_property_description(property); |
| 2418 | const char *filter = obs_property_editable_list_filter(property); |
| 2419 | const char *default_path = |
| 2420 | obs_property_editable_list_default_path(property); |
| 2421 | |
| 2422 | QString title = QTStr("Basic.PropertiesWindow.AddEditableListFiles") |
| 2423 | .arg(QT_UTF8(desc)); |
| 2424 | |
| 2425 | QStringList files = OpenFiles(GetSettingsWindow(), title, |
| 2426 | QT_UTF8(default_path), QT_UTF8(filter)); |
| 2427 | #ifdef __APPLE__ |
| 2428 | // TODO: Revisit when QTBUG-42661 is fixed |
| 2429 | widget->window()->raise(); |
| 2430 | #endif |
| 2431 | |
| 2432 | if (files.count() == 0) |
| 2433 | return; |
| 2434 | |
| 2435 | list->addItems(files); |
| 2436 | EditableListChanged(); |
| 2437 | } |
| 2438 | |
| 2439 | void WidgetInfo::EditListAddDir() |
| 2440 | { |
nothing calls this directly
no test coverage detected