Fix QtWidgets compilation for -qconfig large
authorTasuku Suzuki <tasuku.suzuki@nokia.com>
Wed, 16 May 2012 20:15:08 +0000 (05:15 +0900)
committerQt by Nokia <qt-info@nokia.com>
Tue, 22 May 2012 23:03:30 +0000 (01:03 +0200)
Change-Id: I90ea78944546e93debb41c901d9f128a7b29b1f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/widgets/dialogs/qdialog.cpp
src/widgets/kernel/qwidgetwindow_qpa.cpp
src/widgets/kernel/qwidgetwindow_qpa_p.h

index 2e60be7..0955e00 100644 (file)
@@ -64,12 +64,16 @@ QT_BEGIN_NAMESPACE
 
 static inline int themeDialogType(const QDialog *dialog)
 {
+#ifndef QT_NO_FILEDIALOG
     if (qobject_cast<const QFileDialog *>(dialog))
         return QPlatformTheme::FileDialog;
+#endif
     if (qobject_cast<const QColorDialog *>(dialog))
         return QPlatformTheme::ColorDialog;
+#ifndef QT_NO_FONTDIALOG
     if (qobject_cast<const QFontDialog *>(dialog))
         return QPlatformTheme::FontDialog;
+#endif
     return -1;
 }
 
index 720c6bf..5ddb596 100644 (file)
@@ -154,12 +154,14 @@ bool QWidgetWindow::event(QEvent *event)
         handleWheelEvent(static_cast<QWheelEvent *>(event));
         return true;
 
+#ifndef QT_NO_DRAGANDDROP
     case QEvent::DragEnter:
     case QEvent::DragLeave:
     case QEvent::DragMove:
     case QEvent::Drop:
         handleDragEvent(event);
         break;
+#endif
 
     case QEvent::Expose:
         handleExposeEvent(static_cast<QExposeEvent *>(event));
@@ -390,6 +392,8 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event)
     QGuiApplication::sendSpontaneousEvent(widget, &translated);
 }
 
+#ifndef QT_NO_DRAGANDDROP
+
 void QWidgetWindow::handleDragEvent(QEvent *event)
 {
     switch (event->type()) {
@@ -448,6 +452,8 @@ void QWidgetWindow::handleDragEvent(QEvent *event)
     }
 }
 
+#endif // QT_NO_DRAGANDDROP
+
 void QWidgetWindow::handleExposeEvent(QExposeEvent *event)
 {
     if (isExposed()) {
index 80af5e6..515cb4d 100644 (file)
@@ -78,7 +78,9 @@ protected:
     void handleMoveEvent(QMoveEvent *);
     void handleResizeEvent(QResizeEvent *);
     void handleWheelEvent(QWheelEvent *);
+#ifndef QT_NO_DRAGANDDROP
     void handleDragEvent(QEvent *);
+#endif
     void handleExposeEvent(QExposeEvent *);
     void handleWindowStateChangedEvent(QWindowStateChangeEvent *event);
     bool nativeEvent(const QByteArray &eventType, void *message, long *result);
@@ -91,7 +93,9 @@ private:
 
     QWidget *m_widget;
     QWeakPointer<QWidget> m_implicit_mouse_grabber;
+#ifndef QT_NO_DRAGANDDROP
     QWeakPointer<QWidget> m_dragTarget;
+#endif
 };
 
 QT_END_NAMESPACE