Run clang-format on qwasmdrag.h/.cpp
Change-Id: Id67238566b6e25d8bf1645b5b83d898622eb5f89 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
3e78331dac
commit
0f18dadd5d
@ -137,14 +137,14 @@ static void dropEvent(val event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EMSCRIPTEN_BINDINGS(drop_module) {
|
EMSCRIPTEN_BINDINGS(drop_module)
|
||||||
|
{
|
||||||
function("qtDrop", &dropEvent);
|
function("qtDrop", &dropEvent);
|
||||||
function("qtgetTextPlain", &getTextPlainCallback);
|
function("qtgetTextPlain", &getTextPlainCallback);
|
||||||
function("qtgetTextUrl", &getTextUrlCallback);
|
function("qtgetTextUrl", &getTextUrlCallback);
|
||||||
function("qtgetTextHtml", &getTextHtmlCallback);
|
function("qtgetTextHtml", &getTextHtmlCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QWasmDrag::QWasmDrag()
|
QWasmDrag::QWasmDrag()
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
@ -152,9 +152,7 @@ QWasmDrag::QWasmDrag()
|
|||||||
|
|
||||||
QWasmDrag::~QWasmDrag() = default;
|
QWasmDrag::~QWasmDrag() = default;
|
||||||
|
|
||||||
void QWasmDrag::init()
|
void QWasmDrag::init() { }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QWasmDrag::drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
|
void QWasmDrag::drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
|
||||||
{
|
{
|
||||||
@ -175,25 +173,20 @@ void QWasmDrag::qWasmDrop()
|
|||||||
return; // keep collecting mimetypes
|
return; // keep collecting mimetypes
|
||||||
|
|
||||||
// start drag enter
|
// start drag enter
|
||||||
QWindowSystemInterface::handleDrag(thisDrag->m_wasmScreen->topLevelAt(thisDrag->m_mouseDropPoint),
|
QWindowSystemInterface::handleDrag(
|
||||||
thisDrag->m_mimeData.get(),
|
thisDrag->m_wasmScreen->topLevelAt(thisDrag->m_mouseDropPoint),
|
||||||
thisDrag->m_mouseDropPoint,
|
thisDrag->m_mimeData.get(), thisDrag->m_mouseDropPoint, thisDrag->m_dropActions,
|
||||||
thisDrag->m_dropActions,
|
thisDrag->m_qButton, thisDrag->m_keyModifiers);
|
||||||
thisDrag->m_qButton,
|
|
||||||
thisDrag->m_keyModifiers);
|
|
||||||
|
|
||||||
// drag drop
|
// drag drop
|
||||||
QWindowSystemInterface::handleDrop(thisDrag->m_wasmScreen->topLevelAt(thisDrag->m_mouseDropPoint),
|
QWindowSystemInterface::handleDrop(
|
||||||
thisDrag->m_mimeData.get(),
|
thisDrag->m_wasmScreen->topLevelAt(thisDrag->m_mouseDropPoint),
|
||||||
thisDrag->m_mouseDropPoint,
|
thisDrag->m_mimeData.get(), thisDrag->m_mouseDropPoint, thisDrag->m_dropActions,
|
||||||
thisDrag->m_dropActions,
|
thisDrag->m_qButton, thisDrag->m_keyModifiers);
|
||||||
thisDrag->m_qButton,
|
|
||||||
thisDrag->m_keyModifiers);
|
|
||||||
|
|
||||||
// drag leave
|
// drag leave
|
||||||
QWindowSystemInterface::handleDrag(thisDrag->m_wasmScreen->topLevelAt(thisDrag->m_mouseDropPoint),
|
QWindowSystemInterface::handleDrag(
|
||||||
nullptr,
|
thisDrag->m_wasmScreen->topLevelAt(thisDrag->m_mouseDropPoint), nullptr, QPoint(),
|
||||||
QPoint(),
|
|
||||||
Qt::IgnoreAction, {}, {});
|
Qt::IgnoreAction, {}, {});
|
||||||
|
|
||||||
thisDrag->m_mimeData->clear();
|
thisDrag->m_mimeData->clear();
|
||||||
|
@ -17,7 +17,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QWasmDrag : public QSimpleDrag
|
class QWasmDrag : public QSimpleDrag
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QWasmDrag();
|
QWasmDrag();
|
||||||
~QWasmDrag();
|
~QWasmDrag();
|
||||||
|
|
||||||
@ -37,7 +36,6 @@ private:
|
|||||||
void init();
|
void init();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QWASMDRAG_H
|
#endif // QWASMDRAG_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user