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
quicktestutil_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QUICKTESTUTIL_P_H
5#define QUICKTESTUTIL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuickTest/private/quicktestglobal_p.h>
19
20#include <QtCore/qobject.h>
21#include <QtQml/qqml.h>
22#include <QtQml/private/qqmlsignalnames_p.h>
23#include <QtQml/qjsvalue.h>
24
26
27class Q_QMLTEST_EXPORT QuickTestUtil : public QObject
28{
30 Q_PROPERTY(bool printAvailableFunctions READ printAvailableFunctions NOTIFY printAvailableFunctionsChanged)
31 Q_PROPERTY(int dragThreshold READ dragThreshold NOTIFY dragThresholdChanged)
32 QML_NAMED_ELEMENT(TestUtil)
34public:
35 QuickTestUtil(QObject *parent = nullptr) :QObject(parent) {}
36 ~QuickTestUtil() override {}
37
38 bool printAvailableFunctions() const;
39 int dragThreshold() const;
40
41 Q_INVOKABLE void populateClipboardText(int lineCount);
42
46
47public Q_SLOTS:
48
49 QJSValue typeName(const QVariant& v) const;
50 bool compare(const QVariant& act, const QVariant& exp) const;
51
52 QJSValue callerFile(int frameIndex = 0) const;
53 int callerLine(int frameIndex = 0) const;
54
55 Q_REVISION(6, 7) QString signalHandlerName(const QString &signalName)
56 {
57 if (QQmlSignalNames::isHandlerName(signalName))
58 return signalName;
60 }
61};
62
64
65#endif // QUICKTESTUTIL_P_H
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
\inmodule QtCore
Definition qobject.h:103
static QString signalNameToHandlerName(QAnyStringView signal)
static bool isHandlerName(QStringView signalName)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
void printAvailableFunctionsChanged()
~QuickTestUtil() override
void dragThresholdChanged()
Q_REVISION(6, 7) QString signalHandlerName(const QString &signalName)
Combined button and popup list for selecting options.
const char * typeName
GLsizei const GLfloat * v
[13]
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SLOTS
#define Q_SIGNALS
static int compare(quint64 a, quint64 b)