wasm: disable text drag for text edits
Disable text drag if asyncify is not enabled. Fixes: QTBUG-131256 Pick-to: 6.8 6.9 Change-Id: I6589f11dda42c2f41db610e7cfece8a3db6573db Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
43874ec9f8
commit
665acc02cf
@ -57,6 +57,9 @@
|
||||
#endif
|
||||
#include <QtGui/qaccessible.h>
|
||||
#include <QtCore/qmetaobject.h>
|
||||
#ifdef Q_OS_WASM
|
||||
#include <QtCore/private/qstdweb_p.h>
|
||||
#endif
|
||||
|
||||
#include <private/qoffsetstringarray_p.h>
|
||||
|
||||
@ -505,6 +508,13 @@ void QWidgetTextControlPrivate::setContent(Qt::TextFormat format, const QString
|
||||
|
||||
void QWidgetTextControlPrivate::startDrag()
|
||||
{
|
||||
|
||||
#ifdef Q_OS_WASM
|
||||
// QDrag::exec() will crash without asyncify; disable drag instead.
|
||||
if (!qstdweb::haveAsyncify())
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(draganddrop)
|
||||
Q_Q(QWidgetTextControl);
|
||||
mousePressed = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user