Index: /trunk/tools/designer/src/components/formeditor/tool_widgeteditor.cpp
===================================================================
--- /trunk/tools/designer/src/components/formeditor/tool_widgeteditor.cpp	(revision 371)
+++ /trunk/tools/designer/src/components/formeditor/tool_widgeteditor.cpp	(revision 372)
@@ -166,4 +166,5 @@
         return !passive && handleContextMenu(widget, managedWidget, static_cast<QContextMenuEvent*>(event));
 
+#ifndef QT_NO_DRAGANDDROP
     case QEvent::DragEnter:
         return handleDragEnterMoveEvent(widget, managedWidget, static_cast<QDragEnterEvent *>(event), true);
@@ -174,4 +175,5 @@
     case QEvent::Drop:
         return handleDropEvent(widget, managedWidget, static_cast<QDropEvent *>(event));
+#endif
     default:
         break;
@@ -247,4 +249,5 @@
 }
 
+#ifndef QT_NO_DRAGANDDROP
 bool WidgetEditorTool::handleDragEnterMoveEvent(QWidget *widget, QWidget * /*managedWidget*/, QDragMoveEvent *e, bool isEnter)
 {
@@ -315,4 +318,5 @@
     return true;
 }
+#endif
 
 bool WidgetEditorTool::restoreDropHighlighting()
@@ -326,4 +330,5 @@
 }
 
+#ifndef QT_NO_DRAGANDDROP
 bool WidgetEditorTool::handleDragLeaveEvent(QWidget *, QWidget *, QDragLeaveEvent *event)
 {
@@ -334,4 +339,5 @@
     return false;
 }
+#endif
 
 QWidget *WidgetEditorTool::editor() const
Index: /trunk/tools/designer/src/components/formeditor/tool_widgeteditor.h
===================================================================
--- /trunk/tools/designer/src/components/formeditor/tool_widgeteditor.h	(revision 371)
+++ /trunk/tools/designer/src/components/formeditor/tool_widgeteditor.h	(revision 372)
@@ -84,7 +84,9 @@
     bool handlePaintEvent(QWidget *widget, QWidget *managedWidget, QPaintEvent *e);
 
+#ifndef QT_NO_DRAGANDDROP
     bool handleDragEnterMoveEvent(QWidget *widget, QWidget *managedWidget, QDragMoveEvent *e, bool isEnter);
     bool handleDragLeaveEvent(QWidget *widget, QWidget *managedWidget, QDragLeaveEvent *e);
     bool handleDropEvent(QWidget *widget, QWidget *managedWidget, QDropEvent *e);
+#endif
 
 private:
Index: /trunk/tools/designer/src/components/lib/lib.pro
===================================================================
--- /trunk/tools/designer/src/components/lib/lib.pro	(revision 371)
+++ /trunk/tools/designer/src/components/lib/lib.pro	(revision 372)
@@ -1,4 +1,5 @@
 TEMPLATE = lib
 TARGET = QtDesignerComponents
+os2:TARGET_SHORT = QtDsgC
 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 CONFIG += qt depend_prl no_objective_c designer
Index: /trunk/tools/designer/src/components/objectinspector/objectinspector.cpp
===================================================================
--- /trunk/tools/designer/src/components/objectinspector/objectinspector.cpp	(revision 371)
+++ /trunk/tools/designer/src/components/objectinspector/objectinspector.cpp	(revision 372)
@@ -346,4 +346,5 @@
 void ObjectInspector::ObjectInspectorPrivate::handleDragEnterMoveEvent(const QWidget *objectInspectorWidget, QDragMoveEvent * event, bool isDragEnter)
 {
+#ifndef QT_NO_DRAGANDDROP
     if (!m_formWindow) {
         event->ignore();
@@ -379,7 +380,9 @@
     else
         event->ignore();
+#endif
 }
 void  ObjectInspector::ObjectInspectorPrivate::dropEvent (QDropEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     if (!m_formWindow || !m_formFakeDropTarget) {
         event->ignore();
@@ -399,4 +402,5 @@
     }
     mimeData->acceptEvent(event);
+#endif
 }
 
@@ -818,20 +822,28 @@
 void  ObjectInspector::dragEnterEvent (QDragEnterEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     m_impl->handleDragEnterMoveEvent(this, event, true);
+#endif
 }
 
 void  ObjectInspector::dragMoveEvent(QDragMoveEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     m_impl->handleDragEnterMoveEvent(this, event, false);
+#endif
 }
 
 void  ObjectInspector::dragLeaveEvent(QDragLeaveEvent * /* event*/)
 {
+#ifndef QT_NO_DRAGANDDROP
     m_impl->restoreDropHighlighting();
+#endif
 }
 
 void  ObjectInspector::dropEvent (QDropEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     m_impl->dropEvent(event);
+#endif
 
 QT_END_NAMESPACE
Index: /trunk/tools/designer/src/components/propertyeditor/paletteeditor.cpp
===================================================================
--- /trunk/tools/designer/src/components/propertyeditor/paletteeditor.cpp	(revision 371)
+++ /trunk/tools/designer/src/components/propertyeditor/paletteeditor.cpp	(revision 372)
@@ -88,6 +88,8 @@
                 this, SLOT(paletteChanged(const QPalette &)));
     ui.paletteView->setSelectionBehavior(QAbstractItemView::SelectRows);
+#ifndef QT_NO_DRAGANDDROP
     ui.paletteView->setDragEnabled(true);
     ui.paletteView->setDropIndicatorShown(true);
+#endif
     ui.paletteView->setRootIsDecorated(false);
     ui.paletteView->setColumnHidden(2, true);
Index: /trunk/tools/designer/src/components/widgetbox/widgetbox.cpp
===================================================================
--- /trunk/tools/designer/src/components/widgetbox/widgetbox.cpp	(revision 371)
+++ /trunk/tools/designer/src/components/widgetbox/widgetbox.cpp	(revision 372)
@@ -180,4 +180,5 @@
                                                bool acceptEventsFromWidgetBox)
 {
+#ifndef QT_NO_DRAGANDDROP
     const QDesignerMimeData *mimeData = qobject_cast<const QDesignerMimeData *>(event->mimeData());
     if (!mimeData) {
@@ -196,20 +197,28 @@
     mimeData->acceptEvent(event);
     return mimeData;
+#else
+    return 0;
+#endif
 }
 
 void WidgetBox::dragEnterEvent (QDragEnterEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     // We accept event originating from the widget box also here,
     // because otherwise Windows will not show the DnD pixmap.
     checkDragEvent(event, true);
+#endif
 }
 
 void WidgetBox::dragMoveEvent(QDragMoveEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     checkDragEvent(event, true);
+#endif
 }
 
 void WidgetBox::dropEvent(QDropEvent * event)
 {
+#ifndef QT_NO_DRAGANDDROP
     const QDesignerMimeData *mimeData = checkDragEvent(event, false);
     if (!mimeData)
@@ -218,4 +227,5 @@
     dropWidgets(mimeData->items(), event->pos());
     QDesignerMimeData::removeMovedWidgetsFromSourceForm(mimeData->items());
+#endif
 }
 
Index: /trunk/tools/designer/src/designer/assistantclient.cpp
===================================================================
--- /trunk/tools/designer/src/designer/assistantclient.cpp	(revision 371)
+++ /trunk/tools/designer/src/designer/assistantclient.cpp	(revision 372)
@@ -120,5 +120,5 @@
 #endif
 
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
     app += QLatin1String(".exe");
 #endif
Index: /trunk/tools/designer/src/designer/main.cpp
===================================================================
--- /trunk/tools/designer/src/designer/main.cpp	(revision 371)
+++ /trunk/tools/designer/src/designer/main.cpp	(revision 372)
@@ -57,5 +57,5 @@
     reporterPath += QDir::separator();
     reporterPath += QLatin1String("qtusagereporter");
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
     reporterPath += QLatin1String(".exe");
 #endif
Index: /trunk/tools/designer/src/designer/mainwindow.cpp
===================================================================
--- /trunk/tools/designer/src/designer/mainwindow.cpp	(revision 371)
+++ /trunk/tools/designer/src/designer/mainwindow.cpp	(revision 372)
@@ -177,4 +177,5 @@
     // dropped.
     switch (event->type()) {
+#ifndef QT_NO_DRAGANDDROP
     case QEvent::DragEnter: {
         QDragEnterEvent *e = static_cast<QDragEnterEvent*>(event);
@@ -196,4 +197,5 @@
     }
         break;
+#endif
     default:
         break;
Index: /trunk/tools/designer/src/lib/shared/actionrepository.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/actionrepository.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/actionrepository.cpp	(revision 372)
@@ -291,4 +291,5 @@
 static bool handleImageDragEnterMoveEvent(QDropEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     QtResourceView::ResourceType type;
     const bool rc = QtResourceView::decodeMimeData(event->mimeData(), &type) && type ==  QtResourceView::ResourceImage;
@@ -298,8 +299,12 @@
         event->ignore();
     return rc;
+#else
+    return 0;
+#endif
 }
 
 static void handleImageDropEvent(const QAbstractItemView *iv, QDropEvent *event, ActionModel *am)
 {
+#ifndef QT_NO_DRAGANDDROP
     const QModelIndex index = iv->indexAt(event->pos());
     if (!index.isValid()) {
@@ -307,9 +312,12 @@
         return;
     }
+#endif
 
     if (!handleImageDragEnterMoveEvent(event))
         return;
 
+#ifndef QT_NO_DRAGANDDROP
     am->dropMimeData(event->mimeData(),  event->proposedAction(), index.row(), 0, iv->rootIndex());
+#endif
 }
 
@@ -322,4 +330,5 @@
         return;
 
+#ifndef QT_NO_DRAGANDDROP
     QDrag *drag = new QDrag(dragParent);
     QMimeData *data = model->mimeData(indexes);
@@ -329,4 +338,5 @@
 
     drag->start(supportedActions);
+#endif
 }
 
@@ -336,8 +346,10 @@
     m_model(model)
 {
+#ifndef QT_NO_DRAGANDDROP
     setDragEnabled(true);
     setAcceptDrops(true);
     setDropIndicatorShown(true);
     setDragDropMode(DragDrop);
+#endif
     setModel(model);
     setRootIsDecorated(false);
@@ -368,15 +380,21 @@
 void ActionTreeView::dragEnterEvent(QDragEnterEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     handleImageDragEnterMoveEvent(event);
+#endif
 }
 
 void ActionTreeView::dragMoveEvent(QDragMoveEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     handleImageDragEnterMoveEvent(event);
+#endif
 }
 
 void ActionTreeView::dropEvent(QDropEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     handleImageDropEvent(this, event, m_model);
+#endif
 }
 
@@ -414,8 +432,10 @@
     m_model(model)
 {
+#ifndef QT_NO_DRAGANDDROP
     setDragEnabled(true);
     setAcceptDrops(true);
     setDropIndicatorShown(true);
     setDragDropMode(DragDrop);
+#endif
     setModel(model);
     setTextElideMode(Qt::ElideMiddle);
@@ -449,15 +469,21 @@
 void ActionListView::dragEnterEvent(QDragEnterEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     handleImageDragEnterMoveEvent(event);
+#endif
 }
 
 void ActionListView::dragMoveEvent(QDragMoveEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     handleImageDragEnterMoveEvent(event);
+#endif
 }
 
 void ActionListView::dropEvent(QDropEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     handleImageDropEvent(this, event, m_model);
+#endif
 }
 
@@ -647,4 +673,5 @@
 void ActionRepositoryMimeData::accept(QDragMoveEvent *event) const
 {
+#ifndef QT_NO_DRAGANDDROP
     if (event->proposedAction() == m_dropAction) {
         event->acceptProposedAction();
@@ -653,4 +680,5 @@
         event->accept();
     }
+#endif
 }
 
Index: /trunk/tools/designer/src/lib/shared/formwindowbase_p.h
===================================================================
--- /trunk/tools/designer/src/lib/shared/formwindowbase_p.h	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/formwindowbase_p.h	(revision 372)
@@ -170,5 +170,5 @@
         CRLFLineTerminator,
         NativeLineTerminator =
-#if defined (Q_OS_WIN)
+#if defined (Q_OS_WIN) || defined(Q_OS_OS2)
             CRLFLineTerminator
 #else
Index: /trunk/tools/designer/src/lib/shared/orderdialog.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/orderdialog.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/orderdialog.cpp	(revision 372)
@@ -46,5 +46,9 @@
 #include "orderdialog_p.h"
 #include "iconloader_p.h"
-#include "ui_orderdialog.h"
+#ifndef QT_NO_DRAGANDDROP
+# include "ui_orderdialog.h"
+#else
+# include "ui_orderdialog_nodnd.h"
+#endif
 
 #include <QtDesigner/QExtensionManager>
Index: /trunk/tools/designer/src/lib/shared/orderdialog_nodnd.ui
===================================================================
--- /trunk/tools/designer/src/lib/shared/orderdialog_nodnd.ui	(revision 372)
+++ /trunk/tools/designer/src/lib/shared/orderdialog_nodnd.ui	(revision 372)
@@ -0,0 +1,195 @@
+<ui version="4.0" >
+ <comment>*********************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+*********************************************************************</comment>
+ <class>qdesigner_internal::OrderDialog</class>
+ <widget class="QDialog" name="qdesigner_internal::OrderDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>467</width>
+    <height>310</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Change Page Order</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Page Order</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <property name="leftMargin" >
+       <number>9</number>
+      </property>
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
+      <item>
+       <widget class="QListWidget" name="pageList" >
+        <property name="minimumSize" >
+         <size>
+          <width>344</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="selectionMode" >
+         <enum>QAbstractItemView::ContiguousSelection</enum>
+        </property>
+        <property name="movement" >
+         <enum>QListView::Snap</enum>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QVBoxLayout" >
+        <property name="spacing" >
+         <number>6</number>
+        </property>
+        <property name="leftMargin" >
+         <number>0</number>
+        </property>
+        <property name="topMargin" >
+         <number>0</number>
+        </property>
+        <property name="rightMargin" >
+         <number>0</number>
+        </property>
+        <property name="bottomMargin" >
+         <number>0</number>
+        </property>
+        <item>
+         <widget class="QToolButton" name="upButton" >
+          <property name="toolTip" >
+           <string>Move page up</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QToolButton" name="downButton" >
+          <property name="toolTip" >
+           <string>Move page down</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer>
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="orientation" >
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>20</width>
+            <height>99</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>qdesigner_internal::OrderDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>50</x>
+     <y>163</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>6</x>
+     <y>151</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>qdesigner_internal::OrderDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>300</x>
+     <y>160</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>348</x>
+     <y>148</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp	(revision 372)
@@ -154,5 +154,7 @@
         drag->setPixmap(QPixmap::fromImage(image));
 #else
+#ifndef QT_NO_DRAGANDDROP
         drag->setPixmap(widgetPixmap);
+#endif
 #endif
     }
@@ -189,5 +191,7 @@
         QPixmap pixmap = QPixmap::fromImage(image);
         pixmap.setMask(mask);
+#ifndef QT_NO_DRAGANDDROP
         drag->setPixmap(pixmap);
+#endif
     }
         break;
@@ -197,7 +201,9 @@
     m_globalStartPos =  m_items.first()->decoration()->pos() +  m_items.first()->hotSpot();
     m_hotSpot = m_globalStartPos - decorationTopLeft;
+#ifndef QT_NO_DRAGANDDROP
     drag->setHotSpot(m_hotSpot);
 
     drag->setMimeData(this);
+#endif
 }
 
@@ -219,4 +225,5 @@
         return Qt::IgnoreAction;
 
+#ifndef QT_NO_DRAGANDDROP
     QDrag *drag = new QDrag(dragSource);
     QDesignerMimeData *mimeData = new QDesignerMimeData(items, drag);
@@ -237,4 +244,7 @@
 
     return executedAction;
+#else
+    return Qt::IgnoreAction;
+#endif
 }
 
@@ -270,4 +280,5 @@
 void QDesignerMimeData::acceptEventWithAction(Qt::DropAction desiredAction, QDropEvent *e)
 {
+#ifndef QT_NO_DRAGANDDROP
     if (e->proposedAction() == desiredAction) {
         e->acceptProposedAction();
@@ -276,4 +287,5 @@
         e->accept();
     }
+#endif
 }
 
Index: /trunk/tools/designer/src/lib/shared/qdesigner_menu.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/qdesigner_menu.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/qdesigner_menu.cpp	(revision 372)
@@ -165,12 +165,18 @@
     }
 
+#ifndef QT_NO_DRAGANDDROP
     QDrag *drag = new QDrag(this);
     drag->setPixmap(ActionRepositoryMimeData::actionDragPixmap(action));
     drag->setMimeData(new ActionRepositoryMimeData(action, dropAction));
+#endif
 
     const int old_index = m_currentIndex;
     m_currentIndex = -1;
 
+#ifndef QT_NO_DRAGANDDROP
     if (drag->start(dropAction) == Qt::IgnoreAction) {
+#else
+    {
+#endif
         if (dropAction == Qt::MoveAction) {
             QAction *previous = safeActionAt(index);
@@ -712,4 +718,5 @@
 void QDesignerMenu::dragEnterEvent(QDragEnterEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData());
     if (!d || d->actionList().empty()) {
@@ -734,8 +741,10 @@
         break;
     }
+#endif
 }
 
 void QDesignerMenu::dragMoveEvent(QDragMoveEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     if (actionGeometry(m_addSeparator).contains(event->pos())) {
         event->ignore();
@@ -773,4 +782,5 @@
         break;
     }
+#endif
 }
 
@@ -784,4 +794,5 @@
 void QDesignerMenu::dropEvent(QDropEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     m_showSubMenuTimer->stop();
     hideSubMenu();
@@ -820,4 +831,5 @@
         event->ignore();
     }
+#endif
     adjustIndicator(QPoint(-1, -1));
 }
Index: /trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp	(revision 372)
@@ -328,12 +328,18 @@
     hideMenu(index);
 
+#ifndef QT_NO_DRAGANDDROP
     QDrag *drag = new QDrag(this);
     drag->setPixmap(ActionRepositoryMimeData::actionDragPixmap(action));
     drag->setMimeData(new ActionRepositoryMimeData(action, Qt::MoveAction));
+#endif
 
     const int old_index = m_currentIndex;
     m_currentIndex = -1;
 
+#ifndef QT_NO_DRAGANDDROP
     if (drag->start(Qt::MoveAction) == Qt::IgnoreAction) {
+#else
+    {
+#endif
         InsertActionIntoCommand *cmd = new InsertActionIntoCommand(fw);
         cmd->init(this, action, safeActionAt(index));
@@ -629,4 +635,5 @@
 void QDesignerMenuBar::dragEnterEvent(QDragEnterEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData());
     if (!d || d->actionList().empty()) {
@@ -650,8 +657,10 @@
         break;
     }
+#endif
 }
 
 void QDesignerMenuBar::dragMoveEvent(QDragMoveEvent *event)
 {
+#ifndef QT_NO_DRAGANDDROP
     const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData());
     if (!d || d->actionList().empty()) {
@@ -674,4 +683,5 @@
         break;
     }
+#endif
 }
 
@@ -687,4 +697,5 @@
     m_dragging = false;
 
+    #ifndef QT_NO_DRAGANDDROP
     if (const ActionRepositoryMimeData *d = qobject_cast<const ActionRepositoryMimeData*>(event->mimeData())) {
 
@@ -707,4 +718,5 @@
     }
     event->ignore();
+#endif
 }
 
Index: /trunk/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp	(revision 372)
@@ -215,6 +215,8 @@
 
             m_mousePressed = false;
+#ifndef QT_NO_DRAGANDDROP
             QDrag *drg = new QDrag(m_tabWidget);
             drg->setMimeData(new qdesigner_internal::MyMimeData(m_tabWidget));
+#endif
 
             m_dragIndex = index;
@@ -225,13 +227,21 @@
                 QLabel *label = new QLabel(m_dragLabel);
                 label->adjustSize();
+#ifndef QT_NO_DRAGANDDROP
                 drg->setPixmap(QPixmap::grabWidget(label));
+#endif
                 label->deleteLater();
             } else {
+#ifndef QT_NO_DRAGANDDROP
                 drg->setPixmap(m_dragIcon.pixmap(22, 22));
+#endif
             }
 
             m_tabWidget->removeTab(m_dragIndex);
 
+#ifndef QT_NO_DRAGANDDROP
             const Qt::DropActions dropAction = drg->start(Qt::MoveAction);
+#else
+            const Qt::DropActions dropAction = Qt::IgnoreAction;
+#endif
 
             if (dropAction == Qt::IgnoreAction) {
@@ -253,4 +263,5 @@
     case QEvent::DragEnter:
     case QEvent::DragMove: {
+#ifndef QT_NO_DRAGANDDROP
         QDragMoveEvent *de = static_cast<QDragMoveEvent*>(e);
         if (!qdesigner_internal::MyMimeData::fromMyTab(de->mimeData(), m_tabWidget))
@@ -282,7 +293,12 @@
         m_dropIndicator->setGeometry(pos.x(), pos.y() , 3, rect.height());
         m_dropIndicator->show();
+#else
+        return false;
+#endif
+
     } break;
 
     case QEvent::Drop: {
+#ifndef QT_NO_DRAGANDDROP
         QDropEvent *de = static_cast<QDropEvent*>(e);
         if (!qdesigner_internal::MyMimeData::fromMyTab(de->mimeData(), m_tabWidget))
@@ -298,4 +314,7 @@
         cmd->init(m_tabWidget, m_dragPage, m_dragIcon, m_dragLabel, m_dragIndex, newIndex);
         fw->commandHistory()->push(cmd);
+#else
+        return false;
+#endif
     } break;
 
Index: /trunk/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/qdesigner_toolbar.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/qdesigner_toolbar.cpp	(revision 372)
@@ -122,4 +122,5 @@
     case QEvent::ContextMenu:
         return handleContextMenuEvent(static_cast<QContextMenuEvent*>(event));
+#ifndef QT_NO_DRAGANDDROP
     case QEvent::DragEnter:
     case QEvent::DragMove:
@@ -129,4 +130,5 @@
     case QEvent::Drop:
         return handleDropEvent(static_cast<QDropEvent *>(event));
+#endif
     case QEvent::MouseButtonPress:
         return handleMousePressEvent(static_cast<QMouseEvent*>(event));
@@ -327,4 +329,5 @@
 }
 
+#ifndef QT_NO_DRAGANDDROP
 bool ToolBarEventFilter::handleDragEnterMoveEvent(QDragMoveEvent *event)
 {
@@ -400,4 +403,5 @@
     return true;
 }
+#endif
 
 void ToolBarEventFilter::startDrag(const QPoint &pos, Qt::KeyboardModifiers modifiers)
@@ -420,4 +424,5 @@
     }
 
+#ifndef QT_NO_DRAGANDDROP
     QDrag *drag = new QDrag(m_toolBar);
     drag->setPixmap(ActionRepositoryMimeData::actionDragPixmap( action));
@@ -425,4 +430,7 @@
 
     if (drag->start(dropAction) == Qt::IgnoreAction) {
+#else
+    {
+#endif
         hideDragIndicator();
         if (dropAction == Qt::MoveAction) {
Index: /trunk/tools/designer/src/lib/shared/qtresourceview.cpp
===================================================================
--- /trunk/tools/designer/src/lib/shared/qtresourceview.cpp	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/qtresourceview.cpp	(revision 372)
@@ -94,5 +94,7 @@
     QListWidget(parent)
 {
+#ifndef QT_NO_DRAGANDDROP
     setDragEnabled(true);
+#endif
 }
 
@@ -106,4 +108,5 @@
         return;
 
+#ifndef QT_NO_DRAGANDDROP
     const QString filePath = item->data(Qt::UserRole).toString();
     const QIcon icon = item->icon();
@@ -122,4 +125,5 @@
     drag->setMimeData(mimeData);
     drag->exec(Qt::CopyAction);
+#endif
 }
 
@@ -605,10 +609,14 @@
 void QtResourceView::setDragEnabled(bool dragEnabled)
 {
+#ifndef QT_NO_DRAGANDDROP
     d_ptr->m_listWidget->setDragEnabled(dragEnabled);
+#endif
 }
 
 bool QtResourceView::dragEnabled() const
 {
+#ifndef QT_NO_DRAGANDDROP
     return d_ptr->m_listWidget->dragEnabled();
+#endif
 }
 
Index: /trunk/tools/designer/src/lib/shared/shared.pri
===================================================================
--- /trunk/tools/designer/src/lib/shared/shared.pri	(revision 371)
+++ /trunk/tools/designer/src/lib/shared/shared.pri	(revision 372)
@@ -188,2 +188,7 @@
 
 RESOURCES += $$PWD/shared.qrc
+
+contains(DEFINES, QT_NO_DRAGANDDROP) { 
+    FORMS -= $$PWD/orderdialog.ui
+    FORMS += $$PWD/orderdialog_nodnd.ui
+}
Index: /trunk/tools/shared/qtgradienteditor/qtcolorbutton.cpp
===================================================================
--- /trunk/tools/shared/qtgradienteditor/qtcolorbutton.cpp	(revision 371)
+++ /trunk/tools/shared/qtgradienteditor/qtcolorbutton.cpp	(revision 372)
@@ -126,5 +126,7 @@
     d_ptr = new QtColorButtonPrivate;
     d_ptr->q_ptr = this;
+#ifndef QT_NO_DRAGANDDROP
     d_ptr->m_dragging = false;
+#endif
     d_ptr->m_backgroundCheckered = true;
 
