| 1937 | } |
| 1938 | |
| 1939 | bool WidgetInfo::PathChanged(const char *setting) |
| 1940 | { |
| 1941 | const char *desc = obs_property_description(property); |
| 1942 | obs_path_type type = obs_property_path_type(property); |
| 1943 | const char *filter = obs_property_path_filter(property); |
| 1944 | const char *default_path = obs_property_path_default_path(property); |
| 1945 | QString path; |
| 1946 | |
| 1947 | if (type == OBS_PATH_DIRECTORY) |
| 1948 | path = SelectDirectory(view, QT_UTF8(desc), |
| 1949 | QT_UTF8(default_path)); |
| 1950 | else if (type == OBS_PATH_FILE) |
| 1951 | path = OpenFile(view, QT_UTF8(desc), QT_UTF8(default_path), |
| 1952 | QT_UTF8(filter)); |
| 1953 | else if (type == OBS_PATH_FILE_SAVE) |
| 1954 | path = SaveFile(view, QT_UTF8(desc), QT_UTF8(default_path), |
| 1955 | QT_UTF8(filter)); |
| 1956 | |
| 1957 | #ifdef __APPLE__ |
| 1958 | // TODO: Revisit when QTBUG-42661 is fixed |
| 1959 | widget->window()->raise(); |
| 1960 | #endif |
| 1961 | |
| 1962 | if (path.isEmpty()) |
| 1963 | return false; |
| 1964 | |
| 1965 | QLineEdit *edit = static_cast<QLineEdit *>(widget); |
| 1966 | edit->setText(path); |
| 1967 | obs_data_set_string(view->settings, setting, QT_TO_UTF8(path)); |
| 1968 | return true; |
| 1969 | } |
| 1970 | |
| 1971 | void WidgetInfo::ListChanged(const char *setting) |
| 1972 | { |
nothing calls this directly
no test coverage detected