mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ModalComponentManager: Remove friendship with Component
This change makes it slightly easier to audit invariants of ModalComponentManager, as we can now be certain that only member functions of ModalComponentManager can access its data members.
This commit is contained in:
parent
24f3a91a35
commit
d7788100d5
3 changed files with 17 additions and 21 deletions
|
|
@ -1384,7 +1384,7 @@ void Component::enterModalState (bool shouldTakeKeyboardFocus,
|
|||
}
|
||||
|
||||
auto& mcm = *ModalComponentManager::getInstance();
|
||||
mcm.startModal (this, deleteWhenDismissed);
|
||||
mcm.startModal ({}, this, deleteWhenDismissed);
|
||||
mcm.attachCallback (this, callback);
|
||||
|
||||
setVisible (true);
|
||||
|
|
@ -1408,7 +1408,7 @@ void Component::exitModalState (int returnValue)
|
|||
if (MessageManager::getInstance()->isThisTheMessageThread())
|
||||
{
|
||||
auto& mcm = *ModalComponentManager::getInstance();
|
||||
mcm.endModal (this, returnValue);
|
||||
mcm.endModal ({}, this, returnValue);
|
||||
mcm.bringModalComponentsToFront();
|
||||
|
||||
// While this component is in modal state it may block other components from receiving
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue