[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.0/kdelibs/khtml
From:       Maks Orlovich <maksim () kde ! org>
Date:       2008-01-26 20:46:36
Message-ID: 1201380396.957585.4992.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 766879 by orlovich:

Don't crash on drop in frames. Same deal as r739370, #151836 ---
this was playing ping-pong-with Qt with drop events, trying to propagate them
up, and Qt sending them back down because it doesn't match its internal
DND state. Just as in khtmlimagepart, just let Qt bubble them itself.
This makes behavior match KDE3.5.x --- one can drop things from
different documents here, and that'll affect the document (one can't
DND from one frame to another, but that was the case in 3.5.x, too,
and it's probably the right thing to do..)

 M  +5 -19     khtmlview.cpp  


--- branches/KDE/4.0/kdelibs/khtml/khtmlview.cpp #766878:766879
@@ -248,7 +248,7 @@
 	accessKeysPreActivate = false;
 
         // the view might have been built before the part it will be assigned to,
-        // so exceptionally, we need to directly ref/deref KHTMLGlobal to 
+        // so exceptionally, we need to directly ref/deref KHTMLGlobal to
         // account for this transitory case.
         KHTMLGlobal::ref();
         accessKeysEnabled = KHTMLGlobal::defaultHTMLSettings()->accessKeysEnabled();
@@ -3631,7 +3631,7 @@
         if (d->scrollingFromWheelTimerId)
             killTimer(d->scrollingFromWheelTimerId);
         d->scrollingFromWheelTimerId = startTimer(400);
-        
+
         if (m_part->parentPart()) {
             // don't propagate if we are a sub-frame and our scrollbars are already at end of range
             bool h = (static_cast<QWheelEvent*>(e)->orientation() == Qt::Horizontal);
@@ -3643,7 +3643,7 @@
                 e->accept();
                 return;
             }
-        }            
+        }
         QScrollArea::wheelEvent( e );
     }
 
@@ -3652,27 +3652,13 @@
 
 void KHTMLView::dragEnterEvent( QDragEnterEvent* ev )
 {
-    // Handle drops onto frames (#16820)
-    // Drops on the main html part is handled by Konqueror (and shouldn't do anything
-    // in e.g. kmail, so not handled here).
-    if ( m_part->parentPart() )
-    {
-    	QApplication::sendEvent(m_part->parentPart()->widget(), ev);
-	return;
-    }
+    // Still overriden for BC reasons only...
     QScrollArea::dragEnterEvent( ev );
 }
 
 void KHTMLView::dropEvent( QDropEvent *ev )
 {
-    // Handle drops onto frames (#16820)
-    // Drops on the main html part is handled by Konqueror (and shouldn't do anything
-    // in e.g. kmail, so not handled here).
-    if ( m_part->parentPart() )
-    {
-    	QApplication::sendEvent(m_part->parentPart()->widget(), ev);
-	return;
-    }
+    // Still overriden for BC reasons only...
     QScrollArea::dropEvent( ev );
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic