Make qtbase compile with QT_NO_DRAGANDDROP
Change-Id: Id1a74c6b22b388d20103b4e73f83c8345ec70ba6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
parent
f3612f39ff
commit
02713994bf
@ -73,12 +73,14 @@ public:
|
||||
QScopedPointer<QPlatformCursor> m_cursor;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
class QOffscreenDrag : public QPlatformDrag
|
||||
{
|
||||
public:
|
||||
QMimeData *platformDropData() { return 0; }
|
||||
Qt::DropAction drag(QDrag *) { return Qt::IgnoreAction; }
|
||||
};
|
||||
#endif
|
||||
|
||||
class QOffscreenBackingStore : public QPlatformBackingStore
|
||||
{
|
||||
|
@ -106,7 +106,9 @@ QOffscreenIntegration::QOffscreenIntegration()
|
||||
m_fontDatabase.reset(new QBasicFontDatabase());
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
m_drag.reset(new QOffscreenDrag);
|
||||
#endif
|
||||
m_services.reset(new QPlatformServices);
|
||||
|
||||
QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
|
||||
@ -149,10 +151,12 @@ QPlatformFontDatabase *QOffscreenIntegration::fontDatabase() const
|
||||
return m_fontDatabase.data();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
QPlatformDrag *QOffscreenIntegration::drag() const
|
||||
{
|
||||
return m_drag.data();
|
||||
}
|
||||
#endif
|
||||
|
||||
QPlatformServices *QOffscreenIntegration::services() const
|
||||
{
|
||||
|
@ -60,7 +60,9 @@ public:
|
||||
|
||||
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
QPlatformDrag *drag() const;
|
||||
#endif
|
||||
QPlatformServices *services() const;
|
||||
|
||||
QPlatformFontDatabase *fontDatabase() const;
|
||||
@ -71,7 +73,9 @@ public:
|
||||
private:
|
||||
QAbstractEventDispatcher *m_eventDispatcher;
|
||||
QScopedPointer<QPlatformFontDatabase> m_fontDatabase;
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
QScopedPointer<QPlatformDrag> m_drag;
|
||||
#endif
|
||||
QScopedPointer<QPlatformServices> m_services;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user