MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / EditListAddDir

Method EditListAddDir

plugins/scripting/utils/properties-view.cpp:2439–2461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2437}
2438
2439void 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
2463void WidgetInfo::EditListRemove()
2464{

Callers

nothing calls this directly

Calls 2

SelectDirectoryFunction · 0.85
GetSettingsWindowFunction · 0.50

Tested by

no test coverage detected