summaryrefslogtreecommitdiff
path: root/tests/auto/qml/testwebchannel.cpp
blob: a353c50b14f2bf3d05fc3c06ad3ee54716e184a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "testwebchannel.h"

#include <private/qwebchannel_p.h>
#include <private/qmetaobjectpublisher_p.h>

QT_BEGIN_NAMESPACE

TestWebChannel::TestWebChannel(QObject *parent)
    : QQmlWebChannel(parent)
{

}

TestWebChannel::~TestWebChannel()
{

}

bool TestWebChannel::clientIsIdle() const
{
    for (auto *transport : QWebChannel::d_func()->transports) {
        if (QWebChannel::d_func()->publisher->isClientIdle(transport))
            return true;
    }
    return false;
}

QT_END_NAMESPACE