Skip to content

Conversation

@Warchamp7
Copy link
Member

Description

This adds a signal to ScreenshotObj so it doesn't have to directly call OBSBasic. Updated after the changes due to the Add Source dialog.

Revised version that supersedes #12186

Motivation and Context

Less friends for OBSBasic and better code.

How Has This Been Tested?

Took screenshots to make sure they still worked.

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Co-Authored-By: Clayton Groeneveld <19962531+cg2121@users.noreply.github.com>
@Warchamp7 Warchamp7 added Code Cleanup Non-breaking change which makes code smaller or more readable UI/UX Anything to do with changes or additions to UI/UX elements. labels Jan 16, 2026
#include <utility/BasicOutputHandler.hpp>
#include <utility/OBSCanvas.hpp>
#include <utility/PreviewProgramSizeObserver.hpp>
#include <utility/ScreenshotObj.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This include is not necessary here, a forward-declaration of the class should suffice and thus avoids "leaking" that header into every other piece of code that still has to include OBSBasic.h one way or another.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include ScreenshotObj.hpp here instead - this translation unit is the only one that needs to know the actual memory layout of the QPointer and thus requires the class definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Cleanup Non-breaking change which makes code smaller or more readable UI/UX Anything to do with changes or additions to UI/UX elements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants