Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -58,8 +58,6 @@ ContextView::ContextView( Plasma::Containment *cont, Plasma::Corona *corona, QWi
Q_UNUSED( corona )
DEBUG_BLOCK
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;
}
ContextView::~ContextView()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment