Commit 349e3b04 authored by Matěj Laitl's avatar Matěj Laitl
Browse files

ContextView: move s_self assignment so that assert catches incorrect usage

Thanks to Harald Sitter for suggesting it and Sven for notifying me
about it.

CCBUG: 258741
parent 7ff8068a
......@@ -58,8 +58,6 @@ ContextView::ContextView( Plasma::Containment *cont, Plasma::Corona *corona, QWi
Q_UNUSED( corona )
s_self = this;
// using QGraphicsScene::BspTreeIndex leads to crashes in some Qt versions
scene()->setItemIndexMethod( QGraphicsScene::NoIndex );
//TODO: Figure out a way to use rubberband and ScrollHandDrag
......@@ -109,6 +107,9 @@ ContextView::ContextView( Plasma::Containment *cont, Plasma::Corona *corona, QWi
this, SLOT( slotTrackChanged( Meta::TrackPtr ) ) );
connect( engine, SIGNAL( trackMetadataChanged( Meta::TrackPtr ) ),
this, SLOT( slotMetadataChanged( Meta::TrackPtr ) ) );
// keep this assignment at bottom so that premature usage of ::self() asserts out
s_self = this;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment