1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

More ScopedPointer/unique_ptr compatibility work

This commit is contained in:
jules 2018-01-10 17:35:08 +00:00
parent 48a5fbd333
commit 1a60fa9765
80 changed files with 404 additions and 368 deletions

View file

@ -880,7 +880,8 @@ TextEditor::TextEditor (const String& name, juce_wchar passwordChar)
{
setMouseCursor (MouseCursor::IBeamCursor);
addAndMakeVisible (viewport = new TextEditorViewport (*this));
viewport.reset (new TextEditorViewport (*this));
addAndMakeVisible (viewport.get());
viewport->setViewedComponent (textHolder = new TextHolderComponent (*this));
viewport->setWantsKeyboardFocus (false);
viewport->setScrollBarsShown (false, false);
@ -1082,7 +1083,8 @@ void TextEditor::recreateCaret()
{
if (caret == nullptr)
{
textHolder->addChildComponent (caret = getLookAndFeel().createCaretComponent (this));
caret.reset (getLookAndFeel().createCaretComponent (this));
textHolder->addChildComponent (caret.get());
updateCaretPosition();
}
}