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
qqmljsvaluetypefromstringcheck_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QQMLJSVALUETYPEFROMSTRINGCHECK_H
5#define QQMLJSVALUETYPEFROMSTRINGCHECK_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 <QtCore/qglobal.h>
19#include <QtCore/qstring.h>
20
21#include <qtqmlcompilerexports.h>
22
24
25struct Q_QMLCOMPILER_EXPORT QQmlJSStructuredTypeError
26{
28 bool constructedFromInvalidString = false;
29
30 bool isValid() const { return !code.isEmpty() || constructedFromInvalidString; }
31 static QQmlJSStructuredTypeError withInvalidString() { return { QString(), true }; }
32 static QQmlJSStructuredTypeError withValidString() { return { QString(), false }; }
34 {
35 return { enhancedString, false };
36 }
37};
38
39
40class Q_QMLCOMPILER_EXPORT QQmlJSValueTypeFromStringCheck
41{
42public:
43 static QQmlJSStructuredTypeError hasError(const QString &typeName, const QString &value);
44};
45
47
48#endif // QQMLJSVALUETYPEFROMSTRINGCHECK_H
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const char * typeName
static QQmlJSStructuredTypeError withValidString()
static QQmlJSStructuredTypeError withInvalidString()
static QQmlJSStructuredTypeError fromSuggestedString(const QString &enhancedString)