mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
parent
072f459ba5
commit
4144fc9827
@ -112,7 +112,7 @@ QVariant WebPage::execJavaScript(const QString &scriptSource, int timeout)
|
|||||||
{
|
{
|
||||||
QPointer<QEventLoop> loop = new QEventLoop;
|
QPointer<QEventLoop> loop = new QEventLoop;
|
||||||
QVariant result;
|
QVariant result;
|
||||||
QTimer::singleShot(timeout, loop, &QEventLoop::quit);
|
QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit);
|
||||||
|
|
||||||
runJavaScript(scriptSource, [loop, &result](const QVariant &res) {
|
runJavaScript(scriptSource, [loop, &result](const QVariant &res) {
|
||||||
if (loop && loop->isRunning()) {
|
if (loop && loop->isRunning()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user