diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2012-05-17 05:15:08 +0900 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-23 01:03:30 +0200 |
commit | d3e3404d570373fcb746c89827990aa2a9a4cb17 (patch) | |
tree | 4759622d503d66fb2ad71ca22818cadfdaf48955 /src/widgets | |
parent | 5645f3253f47dabed47395278f12129b631dc4cc (diff) |
Fix QtWidgets compilation for -qconfig large
Change-Id: I90ea78944546e93debb41c901d9f128a7b29b1f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow_qpa.cpp | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow_qpa_p.h | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 2e60be70f7..0955e00dd5 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -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; } diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index 720c6bf868..5ddb596b4f 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -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()) { diff --git a/src/widgets/kernel/qwidgetwindow_qpa_p.h b/src/widgets/kernel/qwidgetwindow_qpa_p.h index 80af5e6b77..515cb4d919 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa_p.h +++ b/src/widgets/kernel/qwidgetwindow_qpa_p.h @@ -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 |