]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphiniconsview.cpp
differ between pasting one folder, pasting one file and pasting n items
[dolphin.git] / src / dolphiniconsview.cpp
index e92d8ba3b95a8d8773aead89cca923ac4a156428..45fbf25b2888f80b83bbadaf020f08f299721df1 100644 (file)
@@ -46,7 +46,6 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
     m_decorationPosition(QStyleOptionViewItem::Top),
     m_displayAlignment(Qt::AlignHCenter),
     m_itemSize(),
-    m_dragging(false),
     m_dropRect()
 {
     Q_ASSERT(controller != 0);
@@ -58,7 +57,6 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
     viewport()->setAcceptDrops(true);
 
     setMouseTracking(true);
-    viewport()->setAttribute(Qt::WA_Hover);
 
     // TODO: Connecting to the signal 'activated()' is not possible, as kstyle
     // does not forward the single vs. doubleclick to it yet (KDE 4.1?). Hence it is
@@ -221,15 +219,11 @@ void DolphinIconsView::dragEnterEvent(QDragEnterEvent* event)
     if (event->mimeData()->hasUrls()) {
         event->acceptProposedAction();
     }
-    m_dragging = true;
 }
 
 void DolphinIconsView::dragLeaveEvent(QDragLeaveEvent* event)
 {
     KCategorizedView::dragLeaveEvent(event);
-
-    // TODO: remove this code when the issue #160611 is solved in Qt 4.4
-    m_dragging = false;
     setDirtyRegion(m_dropRect);
 }
 
@@ -273,19 +267,6 @@ void DolphinIconsView::dropEvent(QDropEvent* event)
     }
 
     KCategorizedView::dropEvent(event);
-
-    m_dragging = false;
-}
-
-void DolphinIconsView::paintEvent(QPaintEvent* event)
-{
-    KCategorizedView::paintEvent(event);
-
-    // TODO: remove this code when the issue #160611 is solved in Qt 4.4
-    if (m_dragging) {
-        const QBrush& brush = viewOptions().palette.brush(QPalette::Normal, QPalette::Highlight);
-        DragAndDropHelper::drawHoverIndication(this, m_dropRect, brush);
-    }
 }
 
 void DolphinIconsView::keyPressEvent(QKeyEvent* event)
@@ -345,10 +326,6 @@ void DolphinIconsView::zoomIn()
         } else {
             newIconSize = increasedIconSize(oldIconSize);
             settings->setIconSize(newIconSize);
-            if (settings->previewSize() < newIconSize) {
-                // assure that the preview size is always >= the icon size
-                settings->setPreviewSize(newIconSize);
-            }
         }
 
         // increase also the grid size
@@ -372,11 +349,6 @@ void DolphinIconsView::zoomOut()
         if (showPreview) {
             const int previewSize = decreasedIconSize(settings->previewSize());
             settings->setPreviewSize(previewSize);
-            if (settings->iconSize() > previewSize) {
-                // assure that the icon size is always <= the preview size
-                newIconSize = previewSize;
-                settings->setIconSize(newIconSize);
-            }
         } else {
             newIconSize = decreasedIconSize(settings->iconSize());
             settings->setIconSize(newIconSize);
@@ -462,7 +434,6 @@ void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount)
     if (showPreview) {
         const int previewSize = settings->previewSize();
         const int diff = previewSize - size;
-        Q_ASSERT(diff >= 0);
         itemWidth  += diff;
         itemHeight += diff;