Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > cc8f970be8f3f9d917634bf75d52343e > files > 37

qt3-3.3.4-23mdk.src.rpm

--- qt-x11-free-3.2.3/src/kernel/qdragobject.cpp--	2004-03-04 18:11:36.000000000 +0100
+++ qt-x11-free-3.2.3/src/kernel/qdragobject.cpp	2004-03-04 18:12:17.000000000 +0100
@@ -845,6 +845,17 @@ 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;
 	subtype = *e->cache.txt.subtype;