From 8cb15ca445708b8462630426d7e7e53793baf7e6 Mon Sep 17 00:00:00 2001 From: FiniteSingularity Date: Mon, 7 Oct 2024 10:01:24 -0500 Subject: [PATCH] Fixes formatting. --- src/quick-access-source.cpp | 5 +---- src/quick-access-utility.cpp | 27 +++++++++++++-------------- src/quick-access-utility.hpp | 2 +- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/quick-access-source.cpp b/src/quick-access-source.cpp index 3fee6e3..7f262f3 100644 --- a/src/quick-access-source.cpp +++ b/src/quick-access-source.cpp @@ -364,10 +364,7 @@ QuickAccessSource::QuickAccessSource(obs_source_t *source) qRegisterMetaType(); } _source = obs_source_get_weak_source(source); - //_tmpName = obs_source_get_name(source); - _tmpName = "tmpname"; - const char* source_id = obs_source_get_id(source); - const char* source_type_name = obs_source_get_display_name(source_id); + _tmpName = obs_source_get_name(source); _sourceClass = obs_source_is_group(source) ? SourceClass::Group : obs_source_is_scene(source) ? SourceClass::Scene : SourceClass::Source; diff --git a/src/quick-access-utility.cpp b/src/quick-access-utility.cpp index ef726cb..26b44b7 100644 --- a/src/quick-access-utility.cpp +++ b/src/quick-access-utility.cpp @@ -205,7 +205,7 @@ void QuickAccessUtility::_SetupDocks() obs_enum_scenes(QuickAccessUtility::LinkScenes, qau); const auto mainWindow = - static_cast(obs_frontend_get_main_window()); + static_cast(obs_frontend_get_main_window()); for (size_t i = 0; i < obs_data_array_count(_dockSettings); i++) { auto dockData = obs_data_array_item(_dockSettings, i); @@ -220,7 +220,7 @@ void QuickAccessUtility::_SetupDocks() // the first time we pop open the search, it is a tiny // window and then disappears. if (!QuickAccessSearchModal::dialog) { - const QRect& hostRect = mainWindow->geometry(); + const QRect &hostRect = mainWindow->geometry(); QuickAccessSearchModal::dialog = new QuickAccessSearchModal(mainWindow); @@ -359,7 +359,8 @@ void QuickAccessUtility::FrontendCallback(enum obs_frontend_event event, { UNUSED_PARAMETER(data); if (event == OBS_FRONTEND_EVENT_FINISHED_LOADING) { - blog(LOG_INFO, "======== OBS_FRONTEND_EVENT_FINISHED_LOADING called."); + blog(LOG_INFO, + "======== OBS_FRONTEND_EVENT_FINISHED_LOADING called."); qau->_sceneCollectionChanging = false; qau->_SetupDocks(); qau->_SetupSignals(); @@ -374,7 +375,8 @@ void QuickAccessUtility::FrontendCallback(enum obs_frontend_event event, qau->_TearDownSignals(); qau->_sceneCollectionChanging = true; } else if (event == OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGED) { - blog(LOG_INFO, "======== OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGED called."); + blog(LOG_INFO, + "======== OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGED called."); qau->_sceneCollectionChanging = false; qau->_SetupDocks(); qau->_SetupSignals(); @@ -594,21 +596,18 @@ bool QuickAccessUtility::AddSource(void *data, obs_source_t *source) { UNUSED_PARAMETER(data); + bool priv = obs_obj_is_private(source); + + if (priv) { + return true; + } + obs_source_type st = obs_source_get_type(source); if (st == OBS_SOURCE_TYPE_FILTER || st == OBS_SOURCE_TYPE_TRANSITION) { return true; } - std::string uuid = obs_source_get_uuid(source); - - bool priv = obs_obj_is_private(source); - const char* source_id = obs_source_get_id(source); - const char* source_type_name = obs_source_get_display_name(source_id); - const char* source_name = obs_source_get_name(source); - std::string name = source_name ? source_name : "NULL NAME"; - - if (priv) - return true; + std::string uuid = obs_source_get_uuid(source); if (qau->_allSources.find(uuid) == qau->_allSources.end()) { qau->_allSources.emplace( diff --git a/src/quick-access-utility.hpp b/src/quick-access-utility.hpp index 88c794f..fbefc0b 100644 --- a/src/quick-access-utility.hpp +++ b/src/quick-access-utility.hpp @@ -104,7 +104,7 @@ class QuickAccessUtility { bool _sceneCollectionChanging = true; bool _sourceCloneInstalled = false; bool _dskInstalled = false; - obs_data_array_t* _dockSettings; + obs_data_array_t *_dockSettings; obs_hotkey_id _quick_search_hotkey_id;