Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlpreviewdiff_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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// Qt-Security score:significant reason:default
4
5#ifndef QQMLPREVIEWDIFF_P_H
6#define QQMLPREVIEWDIFF_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qv4compileddata_p.h>
20
21#include <QtCore/qbytearray.h>
22#include <QtCore/qlist.h>
23#include <QtCore/qvariant.h>
24
25QT_BEGIN_NAMESPACE
26
27namespace QV4::CompiledData {
28enum class ChangeType : quint8 {
30
31 // -- Changes to various internal tables, source file, timestamp, etc.
33
37
41
45
49
53
57
61
65
69
73
74 // -- Actual document-level changes --
75
80
85
90
95
100
105
110
115
120
122};
123
138
144
150
161
167
169{
171 QList<quint32_le> strings; // 2*size entries: raw[0..size-1] then cooked[0..size-1]
172};
173
179
185
200
201struct NoHunk {};
202
217
219{
221 bool success = false;
222};
223
224// Compare two compilation units and return a diff describing the changes
225CompilationUnitDiff diffCompilationUnits(const Unit *oldUnit, const Unit *newUnit);
226
227} // namespace QV4::CompiledData
228
229QT_END_NAMESPACE
230
231#endif // QQMLPREVIEWDIFF_P_H
static Severity classifyChange(const Change &change)
CompilationUnitDiff diffCompilationUnits(const Unit *oldUnit, const Unit *newUnit)
IndexedElements(AccessorFn, quint32) -> IndexedElements< AccessorFn >
static EnumHunk extractData(const Enum &e)
Data extractData(const Data &data)
static void sortChanges(QSpan< Change > changes)
Definition qjsvalue.h:24
#define COMPARISON_TRAITS(Element)
#define COMPARISON_TRAITS_WITH_LOCATION(Element)
std::variant< NoHunk, ConstantHunk, BindingHunk, PropertyHunk, AliasHunk, EnumHunk, SignalHunk, ObjectHunk, UnitHunk, StringHunk, LookupHunk, RegExpHunk, FunctionHunk, ClassHunk, TemplateObjectHunk, JsClassHunk, BlockHunk, ImportHunk, TranslationDataHunk, InlineComponentHunk, RequiredPropertyExtraDataHunk > data
QList< CodeOffsetToLineAndStatement > lineAndStatementNumbers
QList< RequiredPropertyExtraDataHunk > requiredPropertyExtraData
QList< FunctionIndexHunk > functionIndices
QList< PropertyHunk > properties
QList< NamedObjectInComponentIndexHunk > namedObjectsInComponentIndices
QList< InlineComponentHunk > inlineComponents
bool objectContentEqual(const Object &oldObj, const Object &newObj) const
void compareObjectProperties(const Object *oldObj, const Object *newObj)
bool parameterTypeContentEqual(const ParameterType &oldType, const ParameterType &newType) const
bool aliasContentEqual(const Alias &oldAlias, const Alias &newAlias) const
void compareObjectInlineComponents(const Object *oldObj, const Object *newObj)
bool enumContentEqual(const Enum &oldEnum, const Enum &newEnum) const
bool stringsEqual(uint oldName, uint newName) const
void compareObjectBindings(const Object *oldObj, const Object *newObj)
bool blockContentEqual(const Block &oldBlock, const Block &newBlock) const
void compareObjectRequiredPropertyExtraData(const Object *oldObj, const Object *newObj)
bool jsClassContentEqual(const JSClass &oldJC, const JSClass &newJC) const
void compareObjectAliases(const Object *oldObj, const Object *newObj)
bool translationContentEqual(const TranslationData &oldTrans, const TranslationData &newTrans) const
bool signalContentEqual(const Signal &oldSig, const Signal &newSig) const
void compareObjectEnums(const Object *oldObj, const Object *newObj)
bool templateObjectContentEqual(const TemplateObject &oldTO, const TemplateObject &newTO) const
bool propertyContentEqual(const Property &oldProp, const Property &newProp) const
bool functionContentEqual(const Function &oldFunc, const Function &newFunc) const
bool classContentEqual(const Class &oldCls, const Class &newCls) const
void compareObjectSignals(const Object *oldObj, const Object *newObj)
void compareIndexedElements(OldSource oldSource, NewSource newSource, ContentEqFn contentEq)
bool bindingContentEqual(const Binding &oldBinding, const Binding &newBinding) const