mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Another batch of ScopedPointer cleanups
This commit is contained in:
parent
5b13063162
commit
48a5fbd333
74 changed files with 311 additions and 292 deletions
|
|
@ -64,12 +64,12 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
|
|||
filename = initialFileOrDirectory.getFileName();
|
||||
}
|
||||
|
||||
fileList = new DirectoryContentsList (this, thread);
|
||||
fileList.reset (new DirectoryContentsList (this, thread));
|
||||
|
||||
if ((flags & useTreeView) != 0)
|
||||
{
|
||||
auto tree = new FileTreeComponent (*fileList);
|
||||
fileListComponent = tree;
|
||||
fileListComponent.reset (tree);
|
||||
|
||||
if ((flags & canSelectMultipleItems) != 0)
|
||||
tree->setMultiSelectEnabled (true);
|
||||
|
|
@ -79,7 +79,7 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
|
|||
else
|
||||
{
|
||||
auto list = new FileListComponent (*fileList);
|
||||
fileListComponent = list;
|
||||
fileListComponent.reset (list);
|
||||
list->setOutlineThickness (1);
|
||||
|
||||
if ((flags & canSelectMultipleItems) != 0)
|
||||
|
|
@ -105,7 +105,8 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
|
|||
addAndMakeVisible (fileLabel);
|
||||
fileLabel.attachToComponent (&filenameBox, true);
|
||||
|
||||
addAndMakeVisible (goUpButton = getLookAndFeel().createFileBrowserGoUpButton());
|
||||
goUpButton.reset (getLookAndFeel().createFileBrowserGoUpButton());
|
||||
addAndMakeVisible (goUpButton.get());
|
||||
goUpButton->onClick = [this] { goUp(); };
|
||||
goUpButton->setTooltip (TRANS ("Go up to parent directory"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue