Index: /trunk/src/gui/kernel/qdnd_pm.cpp
===================================================================
--- /trunk/src/gui/kernel/qdnd_pm.cpp	(revision 470)
+++ /trunk/src/gui/kernel/qdnd_pm.cpp	(revision 471)
@@ -611,4 +611,6 @@
             DrgFreeDraginfo(info);
 
+            DEBUG(("DM_DRAGOVER: return %08lx default %08lx",
+                   dropReply, toPmDragDropOp(dragData->lastAction)));
             return MRFROM2SHORT(dropReply, toPmDragDropOp(dragData->lastAction));
         }
@@ -913,24 +915,4 @@
     }
 
-    if (!mimeData->formats().count()) {
-        // The drag source doesn't provide any format, so we've got no workers.
-        // Although it may look strange, but it is a supported case: for
-        // example, designer uses it a lot for in-process DnD. Instead of MIME
-        // data, it works directly with the QMimeData object from the drag
-        // source. We will go through the converters passing a special value of
-        // QString::null as MIME type -- one of them (e.g. QPMAnyMime) should
-        // take it over and return itself.
-        Q_ASSERT(!workers.count());
-        DEBUG(() << "QPMCoopDragWorker: Source provides NO data, looking for a "
-                    "converter that can handle this");
-        foreach (QPMMime *mime, QPMMime::all()) {
-            DragWorker *wrk = mime->dragWorkerFor(QString::null, mimeData);
-            if (wrk) {
-                workers.append(wrk);
-                break;
-            }
-        }
-    }
-
 #if defined(QDND_DEBUG)
     foreach (DragWorker *wrk, workers) {
@@ -941,4 +923,16 @@
 #endif
 
+    if (!mimeData->formats().count()) {
+        // The drag source doesn't provide any format, so we've got no workers.
+        // Although it may look strange, it is a supported case: for example,
+        // designer uses it a lot for in-process DnD. Instead of MIME data, it
+        // works directly with the QMimeData object from the drag source. We
+        // will handle this situation by providing a dummy DRAGINFO structure.
+        DEBUG(() << "QPMCoopDragWorker: Source provides NO data, will use "
+                    "dummy DRAGINFO");
+        Q_ASSERT(!workers.count());
+        return true;
+    }
+
     Q_ASSERT(workers.count() > 0);
     return workers.count() > 0;
@@ -947,12 +941,12 @@
 HWND QPMCoopDragWorker::hwnd() const
 {
-    DragWorker *firstWorker = workers.first();
-    Q_ASSERT(firstWorker);
-    if (!firstWorker)
-        return 0;
-
-    if (firstWorker->isExclusive() && firstWorker->itemCount() == 0) {
-        // this is a super exclusive worker that will do everything on its own
-        return firstWorker->hwnd();
+    if (!workers.count()) {
+        // The drag source doesn't provide any format; will handle it ourselves
+    } else {
+        DragWorker *firstWorker = workers.first();
+        if (firstWorker->isExclusive() && firstWorker->itemCount() == 0) {
+            // this is a super exclusive worker that will do everything on its own
+            return firstWorker->hwnd();
+        }
     }
 
@@ -989,4 +983,35 @@
     if (info)
         return 0;
+
+    if (!workers.count()) {
+        // The drag source doesn't provide any format; provide a dummy DRAGINFO
+        // with a null DRAGITEM that we will never render
+        info = DrgAllocDraginfo(1);
+        Q_ASSERT(info);
+        if (!info)
+            return 0;
+
+        DRAGITEM *item = DrgQueryDragitemPtr(info, 0);
+        Q_ASSERT(item);
+        if (!item) {
+            DrgFreeDraginfo(info);
+            info = 0;
+            return 0;
+        }
+
+        item->hwndItem = hwnd();
+        item->ulItemID = 0;
+        item->hstrType = 0;
+        item->hstrRMF = 0;
+        item->hstrContainerName = 0;
+        item->hstrSourceName = 0;
+        item->hstrTargetName = 0;
+        item->cxOffset = 0;
+        item->cyOffset = 0;
+        item->fsControl = DC_PREPARE; // require DM_RENDERPREPARE from target
+        item->fsSupportedOps = supportedOps;
+
+        return info;
+    }
 
     DragWorker *firstWorker = workers.first();
Index: /trunk/src/gui/kernel/qmime_pm.cpp
===================================================================
--- /trunk/src/gui/kernel/qmime_pm.cpp	(revision 470)
+++ /trunk/src/gui/kernel/qmime_pm.cpp	(revision 471)
@@ -365,16 +365,11 @@
         return formats;
 
-    if (qstrcmp(formats, "DRF_NULL") == 0) {
-        // special case, see QPMMimeAnyMime::dragWorkerFor()
-        formats = "<DRM_NULL," + formats + ">";
-    } else {
-        // DRM_SHAREDMEM comes first to prevent native DRM_OS2FILE
-        // rendering on the target side w/o involving the source.
-        // Also, we add <DRM_SHAREDMEM,DRF_POINTERDATA> just like WPS does it
-        // (however, it doesn't help when dropping objects to it -- WPS still
-        // chooses DRM_OS2FILE).
-        formats = "(DRM_SHAREDMEM,DRM_OS2FILE)x(" + formats + "),"
-                  "<DRM_SHAREDMEM,DRF_POINTERDATA>";
-    }
+    // DRM_SHAREDMEM comes first to prevent native DRM_OS2FILE
+    // rendering on the target side w/o involving the source.
+    // Also, we add <DRM_SHAREDMEM,DRF_POINTERDATA> just like WPS does it
+    // (however, it doesn't help when dropping objects to it -- WPS still
+    // chooses DRM_OS2FILE).
+    formats = "(DRM_SHAREDMEM,DRM_OS2FILE)x(" + formats + "),"
+              "<DRM_SHAREDMEM,DRF_POINTERDATA>";
 
     DEBUG(() << "DefaultDragWorker: formats" << formats
@@ -832,9 +827,4 @@
     if (!provider)
         return ret;
-
-    if (mimeType.isEmpty()) {
-        // special case, see QPMMimeAnyMime::dropWorkerFor()
-        return ret;
-    }
 
     QByteArray drf = provider->drf(mimeType);
@@ -1127,9 +1117,6 @@
                                              Provider *provider)
 {
-    // note: as a special case, mimeType may be null (see
-    // QPMCoopDragWorker::collectWorkers())
-
-    Q_ASSERT(provider);
-    if (provider && !d->exclusive) {
+    Q_ASSERT(!mimeType.isEmpty() && provider);
+    if (!mimeType.isEmpty() && provider && !d->exclusive) {
         // ensure there are no dups (several providers for the same mime)
         if (!d->providerFor(mimeType))
@@ -1304,9 +1291,11 @@
 {
     ULONG cf = WinAddAtom(WinQuerySystemAtomTable(), mime.toLocal8Bit());
+    if (!cf) {
 #ifndef QT_NO_DEBUG
-    if (!cf)
         qWarning("QPMMime: WinAddAtom failed with 0x%lX",
                  WinGetLastError(NULLHANDLE));
 #endif
+        return 0;
+    }
 
     return cf;
@@ -2734,12 +2723,7 @@
                                                QString &type, QString &ext)
 {
-    if (qstrcmp(drf, "DRF_NULL") == 0) {
-        // special case (see QPMMimeAnyMime::dragWorkerFor())
-        type = QString::null;
-    } else {
-        // file type = mime
-        type = format(drf);
-        Q_ASSERT(!type.isEmpty());
-    }
+    // file type = mime
+    type = format(drf);
+    Q_ASSERT(!type.isEmpty());
 
     // no way to determine the extension
@@ -2775,16 +2759,4 @@
                                                    QMimeData *mimeData)
 {
-    if (mimeType.isEmpty()) {
-        // special case: QMimeData with no formats() (see
-        // QPMCoopDragWorker::collectWorkers())
-        Q_ASSERT(!mimeData->formats().count());
-        // add an exclusive provider with a special format DRF_NULL. Note that
-        // any attemt to render this format should fail so we don't expect
-        // AnyDragProvider::format()/provide() to be actually called.
-        DefaultDragWorker *defWorker = defaultExclDragWorker();
-        defWorker->addProvider(QByteArray("DRF_NULL"), &anyDragProvider);
-        return defWorker;
-    }
-
     ULONG cf = cfMap.value(mimeType);
     if (!cf)
@@ -2816,14 +2788,4 @@
         DefaultDropWorker *defWorker = defaultDropWorker();
         bool atLeastOneSupported = false;
-
-        if (qstrcmp(queryHSTR(item->hstrRMF), "<DRM_NULL,DRF_NULL>") == 0) {
-            // special case: QMimeData with no formats() (see
-            // QPMCoopDragWorker::collectWorkers()), use a special MIME format
-            // value of null.  Note that any attemt to retrieve data in this
-            // format should fail so we don't expect AnyDropProvider::drf()/
-            // provide() to be actually called.
-            defWorker->addProvider(QString::null, &anyDropProvider);
-            return defWorker;
-        }
 
         // check that we support one of DRMs and the format is CF_hhhhhhh
@@ -2902,11 +2864,10 @@
     if (atomStr.startsWith(mimePrefix)) {
         // the format represents the mime type we can recognize
+        // increase the reference count
+        ULONG cf = QPMMime::registerMimeType(atomStr);
+        Q_ASSERT(cf == format);
         // extract the real mime type (w/o our prefix)
         mime = atomStr.mid(mimePrefix.size());
-        Q_ASSERT(!mime.isEmpty());
         if (!mime.isEmpty()) {
-            // increase the reference count (will decrease on destruction)
-            ULONG cf = QPMMime::registerMimeType(atomStr);
-            Q_ASSERT(cf == format);
             cfMap[mime] = cf;
             mimeMap[cf] = mime;
