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
quicktestresult.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 Crimson AS <info@crimson.no>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include "quicktestresult_p.h"
6#include "quicktest.h"
7#include "quicktest_p.h"
8#include <QtTest/qtestcase.h>
9#include <QtTest/qtestsystem.h>
10#include <QtTest/private/qtestblacklist_p.h>
11#include <QtTest/private/qtestresult_p.h>
12#include <QtTest/private/qtesttable_p.h>
13#include <QtTest/private/qtestlog_p.h>
14#include "qtestoptions_p.h"
15#include <QtTest/qbenchmark.h>
16#include <QtTest/private/qbenchmark_p.h>
17#include <QtCore/qset.h>
18#include <QtCore/qmap.h>
19#include <QtCore/qbytearray.h>
20#include <QtCore/qcoreapplication.h>
21#include <QtCore/qdatetime.h>
22#include <QtCore/qdebug.h>
23#include <QtCore/QUrl>
24#include <QtCore/QDir>
25#if QT_CONFIG(regularexpression)
26#include <QtCore/qregularexpression.h>
27#endif
28#include <QtQuick/qquickwindow.h>
29#include <QtGui/qvector3d.h>
30#include <QtGui/qimagewriter.h>
31#include <QtQml/private/qqmlglobal_p.h>
32#include <QtQml/QQmlEngine>
33#include <QtQml/QQmlContext>
34#include <private/qv4qobjectwrapper_p.h>
35
36#include <algorithm>
37
39
40static const char *globalProgramName = nullptr;
41static bool loggingStarted = false;
43
44class Q_QMLTEST_EXPORT QuickTestImageObject : public QObject
45{
47
48 Q_PROPERTY(int width READ width CONSTANT)
49 Q_PROPERTY(int height READ height CONSTANT)
50 Q_PROPERTY(QSize size READ size CONSTANT)
51
52public:
53 QuickTestImageObject(const QImage& img, QObject *parent = nullptr)
54 : QObject(parent)
55 , m_image(img)
56 {
57 }
58
60
61public Q_SLOTS:
62 int red(int x, int y) const
63 {
64 return pixel(x, y).value<QColor>().red();
65 }
66
67 int green(int x, int y) const
68 {
69 return pixel(x, y).value<QColor>().green();
70 }
71
72 int blue(int x, int y) const
73 {
74 return pixel(x, y).value<QColor>().blue();
75 }
76
77 int alpha(int x, int y) const
78 {
79 return pixel(x, y).value<QColor>().alpha();
80 }
81
82 QVariant pixel(int x, int y) const
83 {
84 if (m_image.isNull()
85 || x >= m_image.width()
86 || y >= m_image.height()
87 || x < 0
88 || y < 0
89 || x * y >= m_image.width() * m_image.height())
90 return QVariant();
91
92 return QColor::fromRgba(m_image.pixel(QPoint(x, y)));
93 }
94
96 {
97 if (!other)
98 return m_image.isNull();
99
100 return m_image == other->m_image;
101 }
102
103 void save(const QString &filePath)
104 {
105 QImageWriter writer(filePath);
106 if (!writer.write(m_image)) {
109 v4->throwError(QStringLiteral("Can't save to %1: %2").arg(filePath, writer.errorString()));
110 }
111 }
112
113public:
114 int width() const
115 {
116 return m_image.width();
117 }
118
119 int height() const
120 {
121 return m_image.height();
122 }
123
124 QSize size() const
125 {
126 return m_image.size();
127 }
128
129private:
130 QImage m_image;
131};
132
161
167
174
178
188{
189 Q_D(const QuickTestResult);
190 return d->testCaseName;
191}
192
194{
195 Q_D(QuickTestResult);
196 d->testCaseName = name;
198}
199
210{
211 Q_D(const QuickTestResult);
212 return d->functionName;
213}
214
216{
217 Q_D(QuickTestResult);
218 if (!name.isEmpty()) {
219 if (d->testCaseName.isEmpty()) {
221 (d->intern(name).constData());
222 } else {
223 QString fullName = d->testCaseName + QLatin1String("::") + name;
225 (d->intern(fullName).constData());
226 if (QTestPrivate::checkBlackLists(fullName.toUtf8().constData(), nullptr))
228 }
229 } else {
231 }
232 d->functionName = name;
234}
235
243{
244 const char *tag = QTestResult::currentDataTag();
245 if (tag)
246 return QString::fromUtf8(tag);
247 else
248 return QString();
249}
250
252{
253 if (!tag.isEmpty()) {
254 QTestData *data = &(QTest::newRow(tag.toUtf8().constData()));
257 + functionName()).toUtf8().constData(), tag.toUtf8().constData())) {
259 }
261 } else {
263 }
264}
265
280
290{
292}
293
301
310{
311 return QTestLog::passCount();
312}
313
322{
323 return QTestLog::failCount();
324}
325
334{
335 return QTestLog::skipCount();
336}
337
347
357
364{
365 if (!globalProgramName) // Only if run via qmlviewer.
367}
368
378{
379 // The program name is used for logging headers and footers if it
380 // is set. Otherwise the test case name is used.
381 if (loggingStarted)
382 return;
384 loggingStarted = true;
385}
386
395{
396 Q_D(QuickTestResult);
398 return; // Logging will be stopped by setProgramName(0).
399 QTestResult::setCurrentTestObject(d->intern(d->testCaseName).constData());
401}
402
404{
405 Q_D(QuickTestResult);
406 delete d->table;
407 d->table = new QTestTable;
408 //qmltest does not really need the column for data driven test
409 //add this to avoid warnings.
410 d->table->addColumn(qMetaTypeId<QString>(), "qmltest_dummy_data_column");
411}
412
414{
415 Q_D(QuickTestResult);
416 delete d->table;
417 d->table = nullptr;
418}
419
424
429
434
436{
437 if (location.isLocalFile()) // Use QUrl's logic for Windows drive letters.
438 return QDir::toNativeSeparators(location.toLocalFile());
439 return location.toString();
440}
441
443 (const QString &message, const QUrl &location, int line)
444{
445 QTestResult::addFailure(message.toUtf8().constData(),
446 qtestFixUrl(location).toLatin1().constData(), line);
447}
448
450 (bool success, const QString &message, const QUrl &location, int line)
451{
452 if (!success && message.isEmpty()) {
454 (success, "verify()", "",
455 qtestFixUrl(location).toLatin1().constData(), line);
456 } else {
458 (success, message.toUtf8().constData(), "",
459 qtestFixUrl(location).toLatin1().constData(), line);
460 }
461}
462
464{
465 if (actual.userType() == QMetaType::QColor || expected.userType() == QMetaType::QColor) {
466 if (!actual.canConvert(QMetaType(QMetaType::QColor))
467 || !expected.canConvert(QMetaType(QMetaType::QColor))) {
468 return false;
469 }
470
471 //fuzzy color comparison
472 QColor act;
473 QColor exp;
474 bool ok(false);
475
476 QVariant var = QQml_colorProvider()->colorFromString(actual.toString(), &ok);
477 if (!ok)
478 return false;
479 act = var.value<QColor>();
480
482 if (!ok)
483 return false;
484 exp = var.value<QColor>();
485
486 return ( qAbs(act.red() - exp.red()) <= delta
487 && qAbs(act.green() - exp.green()) <= delta
488 && qAbs(act.blue() - exp.blue()) <= delta
489 && qAbs(act.alpha() - exp.alpha()) <= delta);
490 } else {
491 //number comparison
492 bool ok = true;
493 qreal act = actual.toFloat(&ok);
494 if (!ok)
495 return false;
496
497 qreal exp = expected.toFloat(&ok);
498 if (!ok)
499 return false;
500
501 return (qAbs(act - exp) <= delta);
502 }
503
504 return false;
505}
506
508{
509 if (args->length() < 1)
510 args->setReturnValue(QV4::Encode::null());
511
512 QV4::Scope scope(args->v4engine());
513 QV4::ScopedValue value(scope, (*args)[0]);
514
516
517 //Check for Object Type
518 if (value->isObject()
519 && !value->as<QV4::FunctionObject>()
520 && !value->as<QV4::ArrayObject>()) {
522 if (v.isValid()) {
523 switch (v.userType()) {
524 case QMetaType::QVector3D:
525 {
526 QVector3D v3d = v.value<QVector3D>();
527 result = QString::fromLatin1("Qt.vector3d(%1, %2, %3)").arg(v3d.x()).arg(v3d.y()).arg(v3d.z());
528 break;
529 }
530 case QMetaType::QUrl:
531 {
532 QUrl url = v.value<QUrl>();
533 result = QString::fromLatin1("Qt.url(%1)").arg(url.toString());
534 break;
535 }
536 case QMetaType::QDateTime:
537 {
538 QDateTime dt = v.value<QDateTime>();
539 result = dt.toString(Qt::ISODateWithMs);
540 break;
541 }
542 default:
543 result = v.toString();
544 }
545
546 } else {
547 result = QLatin1String("Object");
548 }
549 }
550
551 if (result.isEmpty()) {
552 QString tmp = value->toQStringNoThrow();
553 if (value->as<QV4::ArrayObject>())
554 result += QLatin1Char('[') + tmp + QLatin1Char(']');
555 else
556 result.append(tmp);
557 }
558
559 args->setReturnValue(QV4::Encode(args->v4engine()->newString(result)));
560}
561
563 (bool success, const QString &message,
564 const QVariant &val1, const QVariant &val2,
565 const QUrl &location, int line)
566{
568 (success, message.toUtf8().constData(),
569 QTest::toString(val1.toString().toLatin1().constData()),
570 QTest::toString(val2.toString().toLatin1().constData()),
571 "", "",
572 qtestFixUrl(location).toLatin1().constData(), line);
573}
574
576 (const QString &message, const QUrl &location, int line)
577{
578 QTestResult::addSkip(message.toUtf8().constData(),
579 qtestFixUrl(location).toLatin1().constData(), line);
581}
582
584 (const QString &tag, const QString &comment, const QUrl &location, int line)
585{
587 (tag.toLatin1().constData(),
589 QTest::Abort, qtestFixUrl(location).toLatin1().constData(), line);
590}
591
593 (const QString &tag, const QString &comment, const QUrl &location, int line)
594{
596 (tag.toLatin1().constData(),
597 QTest::toString(comment.toUtf8().constData()),
598 QTest::Continue, qtestFixUrl(location).toLatin1().constData(), line);
599}
600
602{
603 QTestLog::warn(message.toUtf8().constData(), qtestFixUrl(location).toLatin1().constData(), line);
604}
605
607{
608 if (message.isRegExp()) {
609#if QT_CONFIG(regularexpression)
610 QTestLog::ignoreMessage(QtWarningMsg, qjsvalue_cast<QRegularExpression>(message));
611#endif
612 } else {
613 QTestLog::ignoreMessage(QtWarningMsg, message.toString().toUtf8());
614 }
615}
616
617void QuickTestResult::failOnWarning(const QJSValue &message)
618{
619 if (message.isRegExp()) {
620#if QT_CONFIG(regularexpression)
621 QTestLog::failOnWarning(qjsvalue_cast<QRegularExpression>(message));
622#endif
623 } else {
624 QTestLog::failOnWarning(message.toString().toUtf8());
625 }
626}
627
629{
630 QTest::qWait(ms);
631}
632
634{
635 QTest::qSleep(ms);
636}
637
639{
640 Q_ASSERT(item);
641
642 return qWaitForSignal(item->window(), SIGNAL(frameSwapped()), timeout);
643}
644
646{
647 Q_D(QuickTestResult);
648 delete d->benchmarkData;
649 d->benchmarkData = new QBenchmarkTestMethodData();
650 QBenchmarkTestMethodData::current = d->benchmarkData;
651 d->iterCount = (QBenchmarkGlobalData::current->measurer->needsWarmupIteration()) ? -1 : 0;
652 d->resultsList.clear();
653}
654
659
661{
662 Q_D(QuickTestResult);
664 const QList<QBenchmarkResult> &results = QBenchmarkTestMethodData::current->results;
665 if (results.isEmpty())
666 return; // shouldn't happen
667 if (d->iterCount > -1) // iteration -1 is the warmup iteration.
668 d->resultsList.append(results);
669
670 if (QBenchmarkGlobalData::current->verboseOutput) {
671 if (d->iterCount == -1) {
672 qDebug() << "warmup stage result :" << results.first().measurement.value;
673 } else {
674 qDebug() << "accumulation stage result:" << results.first().measurement.value;
675 }
676 }
677}
678
680{
681 return QBenchmarkTestMethodData::current->resultsAccepted();
682}
683
684static QList<QBenchmarkResult> qMedian(const QList<QList<QBenchmarkResult>> &container)
685{
686 const int count = container.size();
687 if (count == 0)
688 return {};
689
690 if (count == 1)
691 return container.at(0);
692
693 QList<QList<QBenchmarkResult>> containerCopy = container;
694 std::sort(containerCopy.begin(), containerCopy.end(),
695 [](const QList<QBenchmarkResult> &a, const QList<QBenchmarkResult> &b) {
696 return a.first() < b.first();
697 });
698
699 const int middle = count / 2;
700
701 // ### handle even-sized containers here by doing an aritmetic mean of the two middle items.
702 return containerCopy.at(middle);
703}
704
706{
707 Q_D(QuickTestResult);
708 ++(d->iterCount);
709 if (d->iterCount < QBenchmarkGlobalData::current->adjustMedianIterationCount())
710 return true;
711 if (QBenchmarkTestMethodData::current->resultsAccepted())
713 return false;
714}
715
717{
719 QBenchmarkTestMethodData::current->resultAccepted = false;
720 QBenchmarkGlobalData::current->context.tag = tag;
721 QBenchmarkGlobalData::current->context.slotName = functionName();
722
723 Q_D(QuickTestResult);
724 delete d->benchmarkIter;
725 d->benchmarkIter = new QTest::QBenchmarkIterationController
727}
728
730{
731 Q_D(const QuickTestResult);
732 if (d->benchmarkIter)
733 return d->benchmarkIter->isDone();
734 else
735 return true;
736}
737
739{
740 Q_D(QuickTestResult);
741 if (d->benchmarkIter)
742 d->benchmarkIter->next();
743}
744
746{
747 Q_D(QuickTestResult);
748 delete d->benchmarkIter;
749 d->benchmarkIter = nullptr;
750}
751
753{
754 if (item && item->window()) {
756 QImage grabbed = window->grabWindow();
757 const auto dpi = grabbed.devicePixelRatio();
758 QRectF rf(item->x() * dpi, item->y() * dpi, item->width() * dpi, item->height() * dpi);
759 rf = rf.intersected(QRectF(0, 0, grabbed.width(), grabbed.height()));
760 QObject *o = new QuickTestImageObject(grabbed.copy(rf.toAlignedRect()));
762 return o;
763 }
764 return nullptr;
765}
766
767QObject *QuickTestResult::findChild(QObject *parent, const QString &objectName)
768{
769 return parent ? parent->findChild<QObject*>(objectName) : 0;
770}
771
772bool QuickTestResult::isPolishScheduled(QObject *itemOrWindow) const
773{
774 if (auto item = qobject_cast<QQuickItem*>(itemOrWindow))
776
777 if (auto window = qobject_cast<QQuickWindow*>(itemOrWindow))
779
780 qmlWarning(this) << "isPolishScheduled() expects either an Item or Window, but got"
781 << QDebug::toString(itemOrWindow);
782 return false;
783}
784
785bool QuickTestResult::waitForPolish(QObject *itemOrWindow, int timeout) const
786{
787 if (auto item = qobject_cast<QQuickItem*>(itemOrWindow))
789
790 if (auto window = qobject_cast<QQuickWindow*>(itemOrWindow))
792
793 qmlWarning(this) << "waitForItemPolish() expects either an Item or Window, but got"
794 << QDebug::toString(itemOrWindow);
795 return false;
796}
797
798namespace QTest {
799 void qtest_qParseArgs(int argc, char *argv[], bool qml);
800};
801
808
822
823void QuickTestResult::setCurrentAppname(const char *appname)
824{
826}
827
829{
830#if defined(QTEST_NOEXITCODE)
831 return 0;
832#else
833 // make sure our exit code is never going above 127
834 // since that could wrap and indicate 0 test fails
835 return qMin(QTestLog::failCount(), 127);
836#endif
837}
838
840
841#include "quicktestresult.moc"
842#include "moc_quicktestresult_p.cpp"
static QBenchmarkGlobalData * current
static QBenchmarkTestMethodData * current
\inmodule QtCore
Definition qbytearray.h:57
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
Definition qbytearray.h:124
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
static QColor fromRgba(QRgb rgba) noexcept
Static convenience function that returns a QColor constructed from the given QRgb value rgba.
Definition qcolor.cpp:2385
int alpha() const noexcept
Returns the alpha color component of this color.
Definition qcolor.cpp:1466
int red() const noexcept
Returns the red color component of this color.
Definition qcolor.cpp:1528
int blue() const noexcept
Returns the blue color component of this color.
Definition qcolor.cpp:1583
int green() const noexcept
Returns the green color component of this color.
Definition qcolor.cpp:1555
\inmodule QtCore\reentrant
Definition qdatetime.h:283
static QString toNativeSeparators(const QString &pathName)
Definition qdir.cpp:929
qreal y() const
This convenience function is equivalent to calling pos().y().
QGraphicsWidget * window() const
qreal x() const
This convenience function is equivalent to calling pos().x().
The QImageWriter class provides a format independent interface for writing images to files or other d...
\inmodule QtGui
Definition qimage.h:37
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
int width() const
Returns the width of the image.
int height() const
Returns the height of the image.
qreal devicePixelRatio() const
Returns the device pixel ratio for the image.
Definition qimage.cpp:1482
QV4::ExecutionEngine * handle() const
Definition qjsengine.h:298
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
QString toString() const
Returns the string value of this QJSValue, as defined in \l{ECMA-262} section 9.8,...
Definition qjsvalue.cpp:494
Definition qlist.h:75
bool isEmpty() const noexcept
Definition qlist.h:401
T & first()
Definition qlist.h:645
qsizetype length() const noexcept
Definition qlist.h:399
\inmodule QtCore
Definition qmetatype.h:341
\inmodule QtCore
Definition qobject.h:103
T findChild(QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
Returns the child of this object that can be cast into type T and that is called name,...
Definition qobject.h:155
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore\reentrant
Definition qpoint.h:25
virtual QVariant colorFromString(const QString &, bool *)
QQmlEngine * engine() const
Return the context's QQmlEngine, or \nullptr if the context has no QQmlEngine or the QQmlEngine was d...
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
static void setContextForObject(QObject *, QQmlContext *)
Sets the QQmlContext for the object to context.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
Definition qrect.h:484
iterator insert(const T &value)
Definition qset.h:155
\inmodule QtCore
Definition qsize.h:25
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QByteArray toLatin1() const &
Definition qstring.h:630
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5871
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:6018
QByteArray toUtf8() const &
Definition qstring.h:634
static int passCount()
Definition qtestlog.cpp:663
static int failCount()
Definition qtestlog.cpp:668
static void startLogging()
Definition qtestlog.cpp:481
static void addBenchmarkResults(const QList< QBenchmarkResult > &result)
Definition qtestlog.cpp:475
static void stopLogging()
Definition qtestlog.cpp:490
static int skipCount()
Definition qtestlog.cpp:673
static void failOnWarning()
Definition qtestlog.cpp:632
static void warn(const char *msg, const char *file, int line)
Definition qtestlog.cpp:588
static void ignoreMessage(QtMsgType type, const char *msg)
Definition qtestlog.cpp:614
static void finishedCurrentTestDataCleanup()
This function is called after completing each test function, including test functions that are not da...
static void finishedCurrentTestData()
This function is called after completing each test function, including test functions that are not da...
static bool expectFail(const char *dataIndex, const char *comment, QTest::TestFailMode mode, const char *file, int line)
static bool verify(bool statement, const char *statementStr, const char *extraInfo, const char *file, int line)
static bool currentTestFailed()
static void setSkipCurrentTest(bool value)
static void setCurrentAppName(const char *appName)
static void reset()
static void setCurrentTestFunction(const char *func)
static void setBlacklistCurrentTest(bool b)
static void setCurrentTestObject(const char *name)
static const char * currentDataTag()
static bool compare(bool success, const char *failureMsg, char *val1, char *val2, const char *actual, const char *expected, const char *file, int line)
static void addFailure(const char *message, const char *file=nullptr, int line=0)
static bool skipCurrentTest()
static void finishedCurrentTestFunction()
This function is called after completing each test function, including test functions that are data-d...
static void setCurrentTestData(QTestData *data)
static void addSkip(const char *message, const char *file, int line)
void addColumn(int elementType, const char *elementName)
\inmodule QtCore
Definition qurl.h:94
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
Definition qurl.cpp:2831
\inmodule QtCore
Definition qvariant.h:65
T value() const &
Definition qvariant.h:516
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
bool equals(QuickTestImageObject *other) const
int red(int x, int y) const
QVariant pixel(int x, int y) const
void save(const QString &filePath)
int green(int x, int y) const
int alpha(int x, int y) const
int blue(int x, int y) const
QByteArray intern(const QString &str)
QSet< QByteArray > internedStrings
QList< QList< QBenchmarkResult > > resultsList
QTest::QBenchmarkIterationController * benchmarkIter
QBenchmarkTestMethodData * benchmarkData
void warn(const QString &message, const QUrl &location, int line)
void functionNameChanged()
void setFunctionName(const QString &name)
QStringList functionsToRun
bool verify(bool success, const QString &message, const QUrl &location, int line)
bool isBenchmarkDone() const
bool isSkipped() const
\qmlproperty bool TestResult::skipped
const QString & objectName
bool expectFailContinue(const QString &tag, const QString &comment, const QUrl &location, int line)
void reset()
\qmlmethod TestResult::reset()
void setTestCaseName(const QString &name)
static void setCurrentAppname(const char *appname)
bool compare(bool success, const QString &message, const QVariant &val1, const QVariant &val2, const QUrl &location, int line)
QuickTestResult(QObject *parent=nullptr)
QStringList tagsToRun
void stopLogging()
\qmlmethod TestResult::stopLogging()
static void setProgramName(const char *name)
bool isFailed() const
\qmlproperty bool TestResult::failed
void ignoreWarning(const QJSValue &message)
void skippedChanged()
void testCaseNameChanged()
void startBenchmark(RunMode runMode, const QString &tag)
void startLogging()
\qmlmethod TestResult::startLogging()
void fail(const QString &message, const QUrl &location, int line)
void dataTagChanged()
bool expectFail(const QString &tag, const QString &comment, const QUrl &location, int line)
void stringify(QQmlV4FunctionPtr args)
~QuickTestResult() override
static void parseArgs(int argc, char *argv[])
bool fuzzyCompare(const QVariant &actual, const QVariant &expected, qreal delta)
bool waitForRendering(QQuickItem *item, int timeout=5000)
void setDataTag(const QString &tag)
QObject * grabImage(QQuickItem *item)
static int exitCode()
void skip(const QString &message, const QUrl &location, int line)
void setSkipped(bool skip)
QJSValue expected
Definition qjsengine.cpp:12
QString str
[2]
Q_QMLTEST_EXPORT bool qWaitForPolish(const QQuickItem *item, int timeout=defaultTimeout)
Q_QMLTEST_EXPORT bool qIsPolishScheduled(const QQuickItem *item)
Definition quicktest.cpp:76
Combined button and popup list for selecting options.
bool checkBlackLists(const char *slot, const char *data, const char *global)
Q_TESTLIB_EXPORT QTestData & newRow(const char *dataTag)
Appends a new row to the current test data.
Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool qml)
char * toString(const MyPoint &point)
Q_TESTLIB_EXPORT QStringList testFunctions
Q_CORE_EXPORT void qSleep(int ms)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Q_TESTLIB_EXPORT QStringList testTags
Q_CORE_EXPORT void qWait(int ms)
This is an overloaded member function, provided for convenience. It differs from the above function o...
@ ISODateWithMs
AudioChannelLayoutTag tag
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define qDebug
[1]
Definition qlogging.h:164
@ QtWarningMsg
Definition qlogging.h:31
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
constexpr T qAbs(const T &t)
Definition qnumeric.h:328
#define SIGNAL(a)
Definition qobjectdefs.h:53
GLint location
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei width
GLuint GLsizei const GLchar * message
GLuint name
GLint y
GLbyte GLbyte blue
Definition qopenglext.h:385
GLint void * img
Definition qopenglext.h:233
GLuint64EXT * result
[6]
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
GLbyte green
Definition qopenglext.h:385
GLenum GLenum GLsizei void * table
QQmlContext * qmlContext(const QObject *obj)
Definition qqml.cpp:75
Q_AUTOTEST_EXPORT QQmlColorProvider * QQml_colorProvider(void)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
SSL_CTX int void * arg
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
#define QStringLiteral(str)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define emit
double qreal
Definition qtypes.h:187
bool qWaitForSignal(QObject *obj, const char *signal, int timeout)
static QBenchmarkGlobalData globalBenchmarkData
static QString qtestFixUrl(const QUrl &location)
static QList< QBenchmarkResult > qMedian(const QList< QList< QBenchmarkResult > > &container)
static bool loggingStarted
static QT_BEGIN_NAMESPACE const char * globalProgramName
QUrl url("example.com")
[constructor-url-reference]
QObject::connect nullptr
QSharedPointer< T > other(t)
[5]
QGraphicsItem * item
aWidget window() -> setWindowTitle("New Window Title")
[2]
QJSValueList args
QJSValue fullName
QJSEngine engine
[0]
QGraphicsSvgItem * red
\inmodule QtCore \reentrant
Definition qchar.h:18
static constexpr ReturnedValue null()
ReturnedValue throwError(const Value &value)
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, bool createJSValueForObjectsAndSymbols=true)
const T * as() const
Definition qv4value_p.h:132