Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp	(revision 50305)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp	(revision 50306)
@@ -46,4 +46,7 @@
 
 UIDnDHandler::UIDnDHandler(void)
+#ifdef VBOX_WITH_DRAG_AND_DROP_GH
+    : pMData(NULL)
+#endif
 {
 }
@@ -180,5 +183,5 @@
         LogFlowFunc(("\tFormat %d: %s\n", i,
                      strFmtGuest.toAscii().constData()));
-#ifdef RT_OS_WINDOWS
+# ifdef RT_OS_WINDOWS
         /* CF_TEXT */
         if (   strFmtGuest.contains("text/plain", Qt::CaseInsensitive)
@@ -193,18 +196,18 @@
             lstFmtNative << "text/uri-list";
         }
-#else
+# else
         /* On non-Windows just do a 1:1 mapping. */
         lstFmtNative << strFmtGuest;
-# ifdef RT_OS_MACOS
+#  ifdef RT_OS_MACOS
         /** @todo Does the mapping apply here? Don't think so ... */
-# endif
-#endif
+#  endif
+# endif /* !RT_OS_WINDOWS */
     }
 
     LogFlowFunc(("Number of native formats: %d\n", lstFmtNative.size()));
-#ifdef DEBUG
+# ifdef DEBUG
     for (int i = 0; i < lstFmtNative.size(); i++)
         LogFlowFunc(("\tFormat %d: %s\n", i, lstFmtNative.at(i).toAscii().constData()));
-#endif
+# endif
 
     if (    defaultAction != KDragAndDropAction_Ignore
@@ -238,5 +241,5 @@
                  pDrag->exec(toQtDnDActions(vecActions), toQtDnDAction(defaultAction));
             LogFlowFunc(("dropAction=%ld\n", toVBoxDnDAction(dropAction)));
-#ifdef RT_OS_WINDOWS
+# ifdef RT_OS_WINDOWS
             /* Since the QDrag::exec() call above was blocking on Windows, decide what
              * to do now, e.g. if there was a "drop" action.
@@ -245,5 +248,5 @@
              *       since QDrag had its ownership and deleted it after the (blocking)
              *       QDrag::exec() call. */
-#endif
+# endif
             rc = VINF_SUCCESS;
         }
@@ -256,4 +259,8 @@
         rc = VINF_SUCCESS;
 #else
+    NOREF(session);
+    NOREF(screenId);
+    NOREF(pParent);
+
     rc = VERR_NOT_SUPPORTED;
 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
@@ -338,4 +345,5 @@
 void UIDnDHandler::sltDataAvailable(const QString &mimeType)
 {
+#ifdef VBOX_WITH_DRAG_AND_DROP_GH
     LogFlowFunc(("pMData=0x%p, mimeType=%s\n",
                  pMData, mimeType.toAscii().constData()));
@@ -343,4 +351,5 @@
     if (pMData)
         pMData->setData(mimeType);
+#endif
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h	(revision 50305)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h	(revision 50306)
@@ -76,7 +76,8 @@
     static Qt::DropActions             toQtDnDActions(const QVector<KDragAndDropAction> &vecActions);
 
+#ifdef VBOX_WITH_DRAG_AND_DROP_GH
     UIDnDMimeData *pMData;
-
     friend class UIDnDMimeData;
+#endif
 };
 
