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