-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MythContext refactoring #671
Open
ulmus-scott
wants to merge
12
commits into
MythTV:master
Choose a base branch
from
ulmus-scott:mythcontext
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These details do not need to be exposed in the header, since MythContextPrivate is already a QObject.
Convert it to a nested private class and rename MythContext::d to m_impl.
It was only used once by a shockingly old (17 years old, commit 0d4ef8e) line. Use MythContext::Impl's own members and methods instead of redirecting back to them through MythContext.
Whether to show the prompt was never determined at runtime and in one case was forced regardless of whether or not a temporary window already existed (which would have prevented the prompt from showing as it would return early from TempMainWindow()).
and directly access the MythDB singleton. This should help reasoning about further changes.
…calls The only functional difference is that m_dbParams::m_localEnabled is now conditionally set before the first `gCoreContext->GetDB()->SetDatabaseParams(m_dbParams);` call. This doesn't matter since it was set before the second SetDatabaseParams() call, likely via ResetDatabase(). Also, DatabaseParams::m_localEnabled is practically unused. This split is to enable refactoring out the DatabaseSettingsCache into its own class by reducing LoadDatabaseSettings() to its core functionality. This is necessary to enable loading the cache in its constructor before the MythCoreContext constructor has finished, i.e. while gCoreContext is nullptr.
…ingleton This should allow moving the DatabaseSettingsCache to MythDB since save can now be called at any time.
ulmus-scott
force-pushed
the
mythcontext
branch
from
November 29, 2022 22:43
c8c801d
to
da41b45
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had planned to do more, but I got fed up with the use of global state and Singletons, so this is all I have done for now.
Checklist