summaryrefslogtreecommitdiffstats
path: root/opensuse/core/qt3/0038-dragobject-dont-prefer-unknown.patch
blob: d9a7275e9f7bfd659927280ac069c02fc3b2a21f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- src/kernel/qdragobject.cpp
+++ src/kernel/qdragobject.cpp
@@ -893,6 +893,16 @@
 {
     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;