From: Flavio Date: Wed, 12 Dec 2012 16:39:54 +0000 (+0100) Subject: Fixed access to MainWindow statusbar X-Git-Tag: 2.0~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e180dd50f7e031f1a5048c7804fc2a4eae413a0;p=minitube Fixed access to MainWindow statusbar --- diff --git a/src/segmentedcontrol.cpp b/src/segmentedcontrol.cpp index d347ba0..418d3c8 100644 --- a/src/segmentedcontrol.cpp +++ b/src/segmentedcontrol.cpp @@ -1,5 +1,6 @@ #include "segmentedcontrol.h" #include "fontutils.h" +#include "mainwindow.h" static const QColor borderColor = QColor(0x26, 0x26, 0x26); @@ -104,7 +105,7 @@ void SegmentedControl::mouseMoveEvent (QMouseEvent *event) { update(); // status tip - static_cast(window())->statusBar()->showMessage(action->statusTip()); + MainWindow::instance()->statusBar()->showMessage(action->statusTip()); } } @@ -127,8 +128,8 @@ void SegmentedControl::mouseReleaseEvent(QMouseEvent *event) { void SegmentedControl::leaveEvent(QEvent *event) { QWidget::leaveEvent(event); - // status tip - static_cast(window())->statusBar()->clearMessage(); + // status tip + MainWindow::instance()->statusBar()->clearMessage(); d->hoveredAction = 0; d->pressedAction = 0; update();