winrt: fix compilation without drag and drop support
Change-Id: Ifd0d2238e8dacffe34753d95e12cccfd13519c55 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
e8ff3c8cbc
commit
bb30da895e
@ -45,7 +45,9 @@
|
||||
#include "qwinrtfontdatabase.h"
|
||||
#include "qwinrttheme.h"
|
||||
#include "qwinrtclipboard.h"
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
#include "qwinrtdrag.h"
|
||||
#endif
|
||||
|
||||
#include <QtGui/QOffscreenSurface>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
@ -310,6 +312,7 @@ QPlatformClipboard *QWinRTIntegration::clipboard() const
|
||||
return d->clipboard;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
QPlatformDrag *QWinRTIntegration::drag() const
|
||||
{
|
||||
#if _MSC_VER >= 1900
|
||||
@ -318,6 +321,7 @@ QPlatformDrag *QWinRTIntegration::drag() const
|
||||
return QPlatformIntegration::drag();
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_DRAGANDDROP
|
||||
|
||||
Qt::KeyboardModifiers QWinRTIntegration::queryKeyboardModifiers() const
|
||||
{
|
||||
|
@ -39,7 +39,9 @@
|
||||
#include "qwinrtbackingstore.h"
|
||||
#include "qwinrtinputcontext.h"
|
||||
#include "qwinrtcursor.h"
|
||||
#ifndef QT_NO_DRAGANDDROP
|
||||
#include "qwinrtdrag.h"
|
||||
#endif
|
||||
#include "qwinrtwindow.h"
|
||||
#include <private/qeventdispatcher_winrt_p.h>
|
||||
|
||||
@ -554,7 +556,7 @@ QWinRTScreen::QWinRTScreen()
|
||||
ComPtr<Xaml::IUIElement> uiElement;
|
||||
hr = canvas.As(&uiElement);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
#if _MSC_VER >= 1900
|
||||
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
|
||||
QWinRTDrag::instance()->setUiElement(uiElement);
|
||||
#endif
|
||||
hr = window->put_Content(uiElement.Get());
|
||||
@ -766,7 +768,7 @@ void QWinRTScreen::addWindow(QWindow *window)
|
||||
handleExpose();
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
|
||||
#if _MSC_VER >= 1900
|
||||
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
|
||||
QWinRTDrag::instance()->setDropTarget(window);
|
||||
#endif
|
||||
}
|
||||
@ -783,7 +785,7 @@ void QWinRTScreen::removeWindow(QWindow *window)
|
||||
QWindowSystemInterface::handleWindowActivated(window, Qt::OtherFocusReason);
|
||||
handleExpose();
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
#if _MSC_VER >= 1900
|
||||
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
|
||||
if (wasTopWindow)
|
||||
QWinRTDrag::instance()->setDropTarget(topWindow());
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@ HEADERS = \
|
||||
|
||||
OTHER_FILES += winrt.json
|
||||
|
||||
*-msvc2013 {
|
||||
*-msvc2013|contains(DEFINES, QT_NO_DRAGANDDROP) {
|
||||
SOURCES -= qwinrtdrag.cpp
|
||||
HEADERS -= qwinrtdrag.h
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user