$OpenBSD: patch-src_kernel_qdragobject_cpp,v 1.2 2007/01/04 18:34:46 espie Exp $
--- src/kernel/qdragobject.cpp.orig	Thu Oct 19 16:25:12 2006
+++ src/kernel/qdragobject.cpp	Tue Jan  2 15:36:11 2007
@@ -893,6 +893,16 @@ bool QTextDrag::decode( const QMimeSourc
 {
     if(!e)
 	return FALSE;
+        
+    // when subtype is not specified, try text/plain first, otherwise this may read
+    // things like text/x-moz-url even though better targets are available
+    if( subtype.isNull()) {
+        QCString subtmp = "plain";
+        if( decode( e, str, subtmp )) {
+            subtype = subtmp;
+            return true;
+        }
+    }
 
     if ( e->cacheType == QMimeSource::Text ) {
 	str = *e->cache.txt.str;
