]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphindetailsview.cpp
assure that the context menu for column view is applied to the correct URL (depends...
[dolphin.git] / src / dolphindetailsview.cpp
index 6a3f4bf187661d1442e1e4e8785e91adde25180d..3672fe18c0209271d72165606899214f40634b8b 100644 (file)
@@ -150,7 +150,7 @@ QStyleOptionViewItem DolphinDetailsView::viewOptions() const
 void DolphinDetailsView::contextMenuEvent(QContextMenuEvent* event)
 {
     QTreeView::contextMenuEvent(event);
-    m_controller->triggerContextMenuRequest(event->pos());
+    m_controller->triggerContextMenuRequest(event->pos(), m_controller->url());
 }
 
 void DolphinDetailsView::mousePressEvent(QMouseEvent* event)
@@ -265,16 +265,10 @@ void DolphinDetailsView::paintEvent(QPaintEvent* event)
         painter.restore();
     }
 
+    // TODO: remove this code when the issue #160611 is solved in Qt 4.4
     if (m_dragging) {
-        // TODO: remove this code when the issue #160611 is solved in Qt 4.4
-        QPainter painter(viewport());
-        painter.save();
-        QBrush brush(m_viewOptions.palette.brush(QPalette::Normal, QPalette::Highlight));
-        QColor color = brush.color();
-        color.setAlpha(64);
-        brush.setColor(color);
-        painter.fillRect(m_dropRect, brush);
-        painter.restore();
+        const QBrush& brush = m_viewOptions.palette.brush(QPalette::Normal, QPalette::Highlight);
+        DolphinController::drawHoverIndication(viewport(), m_dropRect, brush);
     }
 }