please test: fix for bug 68975

Alexander Neundorf neundorf at kde.org
Sat Feb 7 21:14:37 GMT 2004


Hi, 

the following bug has 80 votes:
http://bugs.kde.org/show_bug.cgi?id=68975

It is not possible to paste files into a listview using the mouse if no free 
room in the view is left.

I already committed a possible fix to HEAD, please test whether everything 
works correctly. If clicking with the RMB on an item, and this item is not 
selected, QListView::contentsMousePressEvent() is called. This seems to 
select the current item if the listview is in multi-selection mode and it is 
currently not selected.

From qlistview.cpp QListView::contentsMousePressEventEx()
...
    d->select = d->selectionMode == Multi ? !i->isSelected() : TRUE;

This is true in this case in konqy. So, skipping the call to the inherited 
QListView function seems to help. Are there any side effects ?

Please let me know whether it works correctly or not so that I can backport it 
to the branch.

Bye
Alex

Index: konq_listviewwidget.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/listview/konq_listviewwidget.cc,v
retrieving revision 1.230
diff -b -u -p -r1.230 konq_listviewwidget.cc
--- konq_listviewwidget.cc      5 Feb 2004 15:00:45 -0000       1.230
+++ konq_listviewwidget.cc      7 Feb 2004 21:05:12 -0000
@@ -372,7 +372,7 @@ void KonqBaseListViewWidget::contentsMou
          if ( ! ( e->state() & ControlButton ) )
             setSelected( itemAt( vp ), false );
       }
-
+      if ( e->button() != RightButton )
       QListView::contentsMousePressEvent( e );
    }
    // Store list of selected items at mouse-press time.


Index: konq_textviewwidget.h
===================================================================
RCS file: /home/kde/kdebase/konqueror/listview/konq_textviewwidget.h,v
retrieving revision 1.14
diff -b -u -p -r1.14 konq_textviewwidget.h
--- konq_textviewwidget.h       10 Jan 2002 13:31:13 -0000      1.14
+++ konq_textviewwidget.h       7 Feb 2004 21:05:20 -0000
@@ -36,6 +36,7 @@ class KonqTextViewWidget : public KonqBa
    public:
       KonqTextViewWidget( KonqListView *parent, QWidget *parentWidget );
       ~KonqTextViewWidget();
+      virtual bool isExecuteArea( const QPoint& point );

    protected slots:
       // slots connected to the directory lister

Index: konq_textviewwidget.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/listview/konq_textviewwidget.cc,v
retrieving revision 1.42
diff -b -u -p -r1.42 konq_textviewwidget.cc
--- konq_textviewwidget.cc      26 Jul 2003 10:41:24 -0000      1.42
+++ konq_textviewwidget.cc      7 Feb 2004 21:05:25 -0000
@@ -72,6 +72,11 @@ KonqTextViewWidget::KonqTextViewWidget(
 KonqTextViewWidget::~KonqTextViewWidget()
 {}

+bool KonqTextViewWidget::isExecuteArea( const QPoint& point )
+{
+   return isNameColumn(point);
+}
+
 void KonqTextViewWidget::createColumns()
 {
    //the textview has fixed size columns

-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the kfm-devel mailing list