<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15295">View Revision</a></tr></table><br /><div><div><p>Sorry for the delay; I thought this would be straightforward and then ran into questions...</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D15295#inline-88008">View Inline</a><span style="color: #4b4d51; font-weight: bold;">sandsmark</span> wrote in <span style="color: #4b4d51; font-weight: bold;">ViewSplitter.cpp:46</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">why a foreach instead of a normal for (foo : bar) {}?</p>

<p style="padding: 0; margin: 8px;">and I'm a bit allergic to auto, I don't know what container is without opening viewsplitter.h. but that's a personal preference.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I simply haven't adapted yet to the fact that there's now a "normal for" equivalent of Qt's equally "normal foreach"...</p>

<p style="padding: 0; margin: 8px;">If you prefer I can use an explicit type but I think this is as good a place to be lazy as any. Besides, in any self-respecting IDE you can hover the mouse cursor over either the variable or <tt style="background: #ebebeb; font-size: 13px;">unregisterContainer()</tt> and a popup will tell you what type the variable (must) be ;)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D15295#inline-88009">View Inline</a><span style="color: #4b4d51; font-weight: bold;">sandsmark</span> wrote in <span style="color: #4b4d51; font-weight: bold;">ViewSplitter.h:185</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">change this to a QPointer while you're at it, and maybe add some null checks, so we can avoid similar issues in the future.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I'm not certain I get this. Put <tt style="background: #ebebeb; font-size: 13px;">_containers</tt> in a QPointer or make it a <tt style="background: #ebebeb; font-size: 13px;">QList< QPointer<TabbedViewContainer *> ></tt>?</p>

<p style="padding: 0; margin: 8px;">The former is impossible AFAIK (QList doesn't inherit QObject), while the latter isn't relevant because the crash was caused by accessing a stale <tt style="background: #ebebeb; font-size: 13px;">_containers</tt> instance (i.e. a member variable of a stale <tt style="background: #ebebeb; font-size: 13px;">ViewSplitter</tt> instance).</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R319 Konsole</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15295">https://phabricator.kde.org/D15295</a></div></div><br /><div><strong>To: </strong>rjvbb, Konsole, hindenburg<br /><strong>Cc: </strong>sandsmark, anthonyfieroni, tcanabrava, konsole-devel, KDE Applications, ngraham, maximilianocuria, hindenburg<br /></div>