]> git.sur5r.net Git - minitube/commitdiff
Fixed access to MainWindow statusbar
authorFlavio <flavio@odisseo.local>
Wed, 12 Dec 2012 16:39:54 +0000 (17:39 +0100)
committerFlavio <flavio@odisseo.local>
Wed, 12 Dec 2012 16:39:54 +0000 (17:39 +0100)
src/segmentedcontrol.cpp

index d347ba0631ea7075d68a1d9be6bae51250a45c91..418d3c8287241e805969a0971825f6c70ed9d88f 100644 (file)
@@ -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<QMainWindow*>(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<QMainWindow*>(window())->statusBar()->clearMessage();
+    // status tip    
+    MainWindow::instance()->statusBar()->clearMessage();
     d->hoveredAction = 0;
     d->pressedAction = 0;
     update();