On Tue, Jul 14, 2015 at 2:49 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
Please don't add anymore friend classes. Instead, we use a Private class
that offers the private methods to other classes.
There are lots of examples in our code already, BRoster or BMessenger would
be such cases.
void
-BTab::Select(BView* owner)
+BTab::Select(BView*)
How about checking if the owner is still the one we think it is?
{
- // TODO: Shouldn't we still maintain fSelected like in Deselect()?
- if (!owner || !View() || !owner->Window())
+ fSelected = true;
+
+ if (!fTabView || !View())
== NULL, not !
+ if (!fTabView->ContainerView()->GetLayout() &&
View()->Parent() == NULL)
+ fTabView->AddChild(fView);
Stray tab. Also, == NULL, and I don't like that BTab is doing this -- this
is really outside of its scope; it shouldn't have to know how its parent
deals with this stuff.