Index: kmeditor.cpp
===================================================================
--- kmeditor.cpp	(wersja 814021)
+++ kmeditor.cpp	(kopia robocza)
@@ -205,26 +205,36 @@
   static_cast<KTextEdit*>( q )->ensureCursorVisible();
 }
 
-void KMeditor::dragEnterEvent( QDragEnterEvent *e )
+bool KMeditor::handleDragEvent( QDragMoveEvent *e )
 {
-  if ( KPIM::MailList::canDecode( e->mimeData() ) ) {
-    e->setAccepted( true );
-  } else if ( e->mimeData()->hasFormat( "image/png" ) ) {
+  if ( KPIM::MailList::canDecode( e->mimeData() )
+       || e->mimeData()->hasFormat( "image/png" ) )
+  {
     e->accept();
-  } else {
-    return KTextEdit::dragEnterEvent( e );
+    return true;
   }
+
+  // last chance: the source can provide no mimetype but urls (e.g. non KDE apps)
+  KUrl::List urlList = KUrl::List::fromMimeData( e->mimeData() );
+  if ( !urlList.isEmpty() ) {
+    e->accept();
+    return true;
+  }
+  return false;
 }
 
+void KMeditor::dragEnterEvent( QDragEnterEvent *e )
+{
+  if ( handleDragEvent( e ) )
+    return;
+  KTextEdit::dragEnterEvent( e );
+}
+
 void KMeditor::dragMoveEvent( QDragMoveEvent *e )
 {
-  if ( KPIM::MailList::canDecode( e->mimeData() ) ) {
-    e->accept();
-  } else if  ( e->mimeData()->hasFormat( "image/png" ) ) {
-    e->accept();
-  } else {
-    return KTextEdit::dragMoveEvent( e );
-  }
+  if ( handleDragEvent( e ) )
+    return;
+  return KTextEdit::dragMoveEvent( e );
 }
 
 void KMeditor::paste()
Index: kmeditor.h
===================================================================
--- kmeditor.h	(wersja 814021)
+++ kmeditor.h	(kopia robocza)
@@ -315,6 +315,11 @@
      */
     virtual void contextMenuEvent( QContextMenuEvent* );
 
+    /**
+     * Handles drag enter/move event for dragEnterEvent() and dragMoveEvent()
+     */
+    bool handleDragEvent( QDragMoveEvent *e );
+
   private:
     KMeditorPrivate *const d;
     friend class KMeditorPrivate;
