| 2437 | } |
| 2438 | |
| 2439 | void WidgetInfo::EditListAddDir() |
| 2440 | { |
| 2441 | QListWidget *list = reinterpret_cast<QListWidget *>(widget); |
| 2442 | const char *desc = obs_property_description(property); |
| 2443 | const char *default_path = |
| 2444 | obs_property_editable_list_default_path(property); |
| 2445 | |
| 2446 | QString title = QTStr("Basic.PropertiesWindow.AddEditableListDir") |
| 2447 | .arg(QT_UTF8(desc)); |
| 2448 | |
| 2449 | QString dir = SelectDirectory(GetSettingsWindow(), title, |
| 2450 | QT_UTF8(default_path)); |
| 2451 | #ifdef __APPLE__ |
| 2452 | // TODO: Revisit when QTBUG-42661 is fixed |
| 2453 | widget->window()->raise(); |
| 2454 | #endif |
| 2455 | |
| 2456 | if (dir.isEmpty()) |
| 2457 | return; |
| 2458 | |
| 2459 | list->addItem(dir); |
| 2460 | EditableListChanged(); |
| 2461 | } |
| 2462 | |
| 2463 | void WidgetInfo::EditListRemove() |
| 2464 | { |
nothing calls this directly
no test coverage detected