Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_corelib_kernel_qtestsupport_core.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3#include <QTest>
4
5// dummy class
6class MyObject
7{
8public:
9 int isReady();
10 void startup() {}
11};
12
13// dummy function
15{
16 return 1;
17}
18
20{
22 using namespace std::chrono_literals;
23 int i = 0;
24 while (myNetworkServerNotResponding() && i++ < 50)
25 QTest::qWait(250ms);
27return 1;
28}
29
30[[maybe_unused]] static bool startup()
31{
34 obj.startup();
35 using namespace std::chrono_literals;
36 const bool result = QTest::qWaitFor([&obj]() { return obj.isReady(); },
39 return result;
40}
\inmodule QtCore
bool qWaitFor(Functor predicate, QDeadlineTimer deadline=QDeadlineTimer(std::chrono::seconds{5}))
Q_CORE_EXPORT void qWait(int ms)
This is an overloaded member function, provided for convenience. It differs from the above function o...
GLhandleARB obj
[2]
GLdouble s
[6]
Definition qopenglext.h:235
GLuint64EXT * result
[6]