Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmlsa.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#include "qqmlsa.h"
5#include "qqmlsa_p.h"
7
8#include "qqmljsscope_p.h"
9#include "qqmljslogger_p.h"
12#include "qqmljsutils_p.h"
13#include "qdeferredpointer_p.h"
14
15#include <QtQmlCompiler/private/qqmlsasourcelocation_p.h>
16
17#include <memory>
18#include <new>
19
21
22using namespace Qt::StringLiterals;
23
24namespace QQmlSA {
25
26static_assert(QQmlJSScope::sizeofQQmlSAElement() == sizeof(Element));
27
45
47
49 : d_ptr{ new BindingsPrivate{ this, *other.d_func() } }
50{
51}
52
54
56 : m_bindings{ other.m_bindings.begin(), other.m_bindings.end() }, q_ptr{ interface }
57{
58}
59
61 : m_bindings{ std::move(other.m_bindings) }, q_ptr{ interface }
62{
63}
64
69{
70 Q_D(const Bindings);
71 return d->constBegin();
72}
73
75{
76 return m_bindings.constBegin();
77}
78
83{
84 Q_D(const Bindings);
85 return d->constEnd();
86}
87
89{
90 return m_bindings.constEnd();
91}
92
100Binding::Binding() : d_ptr{ new BindingPrivate{ this } } { }
101
103
104Binding::Binding(const Binding &other) : d_ptr{ new BindingPrivate{ this, *other.d_func() } } { }
105
107 : d_ptr{ new BindingPrivate{ this, *other.d_func() } } { }
108
110{
111 if (*this == other)
112 return *this;
113
114 d_func()->m_binding = other.d_func()->m_binding;
115 d_func()->q_ptr = this;
116 return *this;
117}
118
120{
121 if (*this == other)
122 return *this;
123
124 d_func()->m_binding = std::move(other.d_func()->m_binding);
125 d_func()->q_ptr = this;
126 return *this;
127}
128
129Binding::~Binding() = default;
130
131bool Binding::operatorEqualsImpl(const Binding &lhs, const Binding &rhs)
132{
133 return lhs.d_func()->m_binding == rhs.d_func()->m_binding;
134}
135
137 : m_binding{ other.m_binding }, q_ptr{ interface }
138{
139}
140
142{
143 QQmlSA::Binding saBinding;
144 saBinding.d_func()->m_binding = binding;
145 return saBinding;
146}
147
149{
150 return binding.d_func()->m_binding;
151}
152
154{
155 return binding.d_func()->m_binding;
156}
157
163{
165}
166
168{
169 return BindingPrivate::binding(*this).bindingType();
170}
171
177{
178 return BindingPrivate::binding(*this).stringValue();
179}
180
185{
187}
188
194{
196}
197
202{
205}
206
212{
213 return BindingPrivate::binding(*this).numberValue();
214}
215
221{
222 return BindingPrivate::binding(*this).scriptKind();
223}
224
229{
230 return BindingPrivate::binding(*this).hasObject();
231}
232
238{
240}
241
243{
245}
246
248{
249 const auto &jsBinding = BindingPrivate::binding(*this);
250 return jsBinding.bindingType() == Script
251 && jsBinding.scriptValueType() == ScriptValue_Undefined;
252}
253
260{
261 return QQmlJSMetaPropertyBinding::isLiteralBinding(bindingType);
262}
263
265
267 : d_ptr{ new MethodsPrivate{ this, *other.d_func() } }
268{
269}
270
272
277{
278 Q_D(const Methods);
279 return d->constBegin();
280}
281
283{
284 return m_methods.constBegin();
285}
286
291{
292 Q_D(const Methods);
293 return d->constEnd();
294}
296{
297 return m_methods.constEnd();
298}
299
301
303 : m_methods{ other.m_methods }, q_ptr{ interface }
304{
305}
306
308 : m_methods{ std::move(other.m_methods) }, q_ptr{ interface }
309{
310}
311
313
315 : m_method{ other.m_method }, q_ptr{ interface }
316{
317}
318
320{
321 return m_method.methodName();
322}
323
325{
326 return m_method.methodType();
327}
328
336Method::Method() : d_ptr{ new MethodPrivate{ this } } { }
337
338Method::Method(const Method &other) : d_ptr{ new MethodPrivate{ this, *other.d_func() } } { }
339
341 : d_ptr{ new MethodPrivate{ this, std::move(*other.d_func()) } }
342{
343}
344
346{
347 if (*this == other)
348 return *this;
349
350 d_func()->m_method = other.d_func()->m_method;
351 d_func()->q_ptr = this;
352 return *this;
353}
354
356{
357 if (*this == other)
358 return *this;
359
360 d_func()->m_method = std::move(other.d_func()->m_method);
361 d_func()->q_ptr = this;
362 return *this;
363}
364
365Method::~Method() = default;
366
371{
372 Q_D(const Method);
373 return d->methodName();
374}
375
381{
382 Q_D(const Method);
383 return d->methodType();
384}
385
386bool Method::operatorEqualsImpl(const Method &lhs, const Method &rhs)
387{
388 return lhs.d_func()->m_method == rhs.d_func()->m_method;
389}
390
392{
393 QQmlSA::Method saMethod;
394 auto &wrappedMethod = saMethod.d_func()->m_method;
395 wrappedMethod = jsMethod;
396 return saMethod;
397}
398
401{
403 for (const auto &[key, value] : hash.asKeyValueRange()) {
405 }
406
408 methods.d_func()->m_methods = std::move(saMethods);
409 return methods;
410}
411
413{
414 return method.d_func()->m_method;
415}
416
418
420 : m_property{ other.m_property }, q_ptr{ interface }
421{
422}
423
425 : m_property{ std::move(other.m_property) }, q_ptr{ interface }
426{
427}
428
430{
431 return m_property.typeName();
432}
433
435{
436 return m_property.isValid();
437}
438
440{
441 return property.d_func()->m_property;
442}
443
445{
446 QQmlSA::Property saProperty;
447 auto &wrappedProperty = saProperty.d_func()->m_property;
448 wrappedProperty = property;
449 return saProperty;
450}
451
460
462 : d_ptr{ new PropertyPrivate{ this, *other.d_func() } } { }
463
465 : d_ptr{ new PropertyPrivate{ this, std::move(*other.d_func()) } }
466{
467}
468
470{
471 if (*this == other)
472 return *this;
473
474 d_func()->m_property = other.d_func()->m_property;
475 d_func()->q_ptr = this;
476 return *this;
477}
478
480{
481 if (*this == other)
482 return *this;
483
484 d_func()->m_property = std::move(other.d_func()->m_property);
485 d_func()->q_ptr = this;
486 return *this;
487}
488
489Property::~Property() = default;
490
495{
496 Q_D(const Property);
497 return d->typeName();
498}
499
501{
502 Q_D(const Property);
503 return d->isValid();
504}
505
506bool Property::operatorEqualsImpl(const Property &lhs, const Property &rhs)
507{
508 return lhs.d_func()->m_property == rhs.d_func()->m_property;
509}
510
519{
520 new (m_data) QQmlJSScope::ConstPtr();
521}
522
524{
526}
527
529{
530 if (this == &other)
531 return *this;
532
533 *reinterpret_cast<QQmlJSScope::ConstPtr *>(m_data) = QQmlJSScope::scope(other);
534 return *this;
535}
536
538{
539 (*reinterpret_cast<QQmlJSScope::ConstPtr *>(m_data)).QQmlJSScope::ConstPtr::~ConstPtr();
540}
541
546{
547 return QQmlJSScope::scope(*this)->scopeType();
548}
549
554{
556}
557
562{
564}
565
570{
572}
573
577bool Element::inherits(const Element &element) const
578{
579 return QQmlJSScope::scope(*this)->inherits(QQmlJSScope::scope(element));
580}
581
582bool Element::isNull() const
583{
584 return QQmlJSScope::scope(*this).isNull();
585}
586
591{
592 return QQmlJSScope::scope(*this)->internalName();
593}
594
600{
601 return QQmlJSScope::scope(*this)->accessSemantics();
602}
603
608{
609 return QQmlJSScope::scope(*this)->isComposite();
610}
611
615bool Element::hasProperty(const QString &propertyName) const
616{
617 return QQmlJSScope::scope(*this)->hasProperty(propertyName);
618}
619
625{
626 return PropertyPrivate::createProperty(QQmlJSScope::scope(*this)->property(propertyName));
627}
628
633bool Element::isPropertyRequired(const QString &propertyName) const
634{
635 return QQmlJSScope::scope(*this)->isPropertyRequired(propertyName);
636}
637
643{
645}
646
651{
653}
654
667{
669}
670
675{
678}
679
684{
685 return QQmlJSScope::scope(*this)->filePath();
686}
687
692{
694}
695
700bool Element::hasOwnPropertyBindings(const QString &propertyName) const
701{
702 return QQmlJSScope::scope(*this)->hasOwnPropertyBindings(propertyName);
703}
704
710{
712}
713
719{
721 QQmlJSScope::scope(*this)->ownPropertyBindings(propertyName));
722}
723
728{
729 const auto &bindings = QQmlJSScope::scope(*this)->propertyBindings(propertyName);
730
731 QList<Binding> saBindings;
732 for (const auto &jsBinding : bindings) {
733 saBindings.push_back(BindingPrivate::createBinding(jsBinding));
734 }
735 return saBindings;
736}
737
740{
742 for (const auto &[key, value] : hash.asKeyValueRange()) {
744 }
745
747 bindings.d_func()->m_bindings = std::move(saBindings);
748 return bindings;
749}
750
754{
756 for (auto it = iterators.first; it != iterators.second; ++it) {
757 saBindings.insert(it.key(), BindingPrivate::createBinding(it.value()));
758 }
759
761 bindings.d_func()->m_bindings = std::move(saBindings);
762 return bindings;
763}
764
769{
770 return QQmlJSScope::scope(*this)->childScopesBegin();
771}
772
777{
778 return QQmlJSScope::scope(*this)->childScopesEnd();
779}
780
781Element::operator bool() const
782{
783 return bool(QQmlJSScope::scope(*this));
784}
785
787{
788 return !QQmlJSScope::scope(*this);
789}
790
795{
796 if (isNull())
797 return {};
799}
800
801bool Element::operatorEqualsImpl(const Element &lhs, const Element &rhs)
802{
803 return QQmlJSScope::scope(lhs) == QQmlJSScope::scope(rhs);
804}
805
806qsizetype Element::qHashImpl(const Element &key, qsizetype seed) noexcept
807{
809}
810
824 Q_DECLARE_PUBLIC(GenericPass);
825
826public:
828 : m_manager{ manager }, q_ptr{ interface }
829 {
831 }
832
833private:
834 PassManager *m_manager;
835
836 GenericPass *q_ptr;
837};
838
839GenericPass::~GenericPass() = default;
840
845 : d_ptr{ new GenericPassPrivate{ this, manager } } { }
846
851{
852 emitWarning(diagnostic, id, QQmlSA::SourceLocation{});
853}
854
860 QQmlSA::SourceLocation srcLocation)
861{
862 Q_D(const GenericPass);
863 PassManagerPrivate::visitor(*d->m_manager)
864 ->logger()
865 ->log(diagnostic.toString(), id,
867}
868
874 QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix)
875{
876 Q_D(const GenericPass);
877 PassManagerPrivate::visitor(*d->m_manager)
878 ->logger()
879 ->log(diagnostic.toString(), id,
880 QQmlSA::SourceLocationPrivate::sourceLocation(srcLocation), true, true,
882}
883
889{
890 Q_D(const GenericPass);
891 const auto scope =
892 PassManagerPrivate::visitor(*d->m_manager)->imports().type(typeName.toString()).scope;
894}
895
901{
903 const auto scope = QQmlJSScope::scope(type);
904 return QQmlJSScope::createQQmlSAElement(scope->attachedType());
905}
906
915{
916 Q_D(const GenericPass);
917 QQmlJSImporter *typeImporter = PassManagerPrivate::visitor(*d->m_manager)->importer();
918 const auto module = typeImporter->importModule(moduleName.toString());
919 const auto scope = module.type(typeName.toString()).scope;
921}
922
931{
932 Q_D(const GenericPass);
933 QQmlJSImporter *typeImporter = PassManagerPrivate::visitor(*d->m_manager)->importer();
934 auto typeNameString = typeName.toString();
935 // we have to check both cpp names
936 auto scope = typeImporter->builtinInternalNames().type(typeNameString).scope;
937 if (!scope) {
938 // and qml names (e.g. for bool) - builtinImportHelper is private, so we can't do it in one call
939 auto builtins = typeImporter->importBuiltins();
940 scope = builtins.type(typeNameString).scope;
941 }
943}
944
949{
950 const auto &resolvedType = resolveType(moduleName, typeName);
951 return QQmlJSScope::createQQmlSAElement(QQmlJSScope::scope(resolvedType)->attachedType());
952}
953
959{
960 Q_D(const GenericPass);
961 return binding.literalType(PassManagerPrivate::resolver(*d->m_manager));
962}
963
968{
969 Q_D(const GenericPass);
970 const auto scope = PassManagerPrivate::visitor(*d->m_manager)
974}
975
980{
981 Q_D(const GenericPass);
982 return PassManagerPrivate::visitor(*d->m_manager)
985}
986
991{
992 Q_D(const GenericPass);
993 return PassManagerPrivate::visitor(*d->m_manager)
994 ->logger()
995 ->code()
996 .mid(location.offset(), location.length());
997}
998
1010 : d_ptr{ new PassManagerPrivate{ this, visitor, resolver } }
1011{
1012}
1013
1014PassManager::~PassManager() = default; // explicitly defaulted out-of-line for PIMPL
1015
1019void PassManager::registerElementPass(std::unique_ptr<ElementPass> pass)
1020{
1021 Q_D(PassManager);
1022 d->registerElementPass(std::move(pass));
1023}
1024
1031void PassManagerPrivate::registerElementPass(std::unique_ptr<ElementPass> pass)
1032{
1033 m_elementPasses.push_back(std::move(pass));
1034}
1035
1038{
1039 QString name;
1040 if (element.isNull() || QQmlJSScope::scope(element)->internalName().isEmpty()) {
1041 // Bail out with an invalid name, this type is so screwed up we can't do anything reasonable
1042 // with it We should have warned about it in another plac
1043 if (element.isNull() || element.baseType().isNull())
1044 return u"$INVALID$"_s;
1046 } else {
1047 name = QQmlJSScope::scope(element)->internalName();
1048 }
1049
1050 const QString filePath =
1051 (mode == Register || !element.baseType() ? element : element.baseType()).filePath();
1052
1053 if (QQmlJSScope::scope(element)->isComposite() && !filePath.endsWith(u".h"))
1054 name += u'@' + filePath;
1055 return name;
1056}
1057
1088bool PassManager::registerPropertyPass(std::shared_ptr<PropertyPass> pass,
1090 QAnyStringView propertyName, bool allowInheritance)
1091{
1092 Q_D(PassManager);
1093 return d->registerPropertyPass(pass, moduleName, typeName, propertyName, allowInheritance);
1094}
1095
1096bool PassManagerPrivate::registerPropertyPass(std::shared_ptr<PropertyPass> pass,
1098 QAnyStringView propertyName, bool allowInheritance)
1099{
1100 if (moduleName.isEmpty() != typeName.isEmpty()) {
1101 qWarning() << "Both the moduleName and the typeName must be specified "
1102 "for the pass to be registered for a specific element.";
1103 }
1104
1105 QString name;
1106 if (!moduleName.isEmpty() && !typeName.isEmpty()) {
1107 auto typeImporter = m_visitor->importer();
1108 auto module = typeImporter->importModule(moduleName.toString());
1109 auto element = QQmlJSScope::createQQmlSAElement(module.type(typeName.toString()).scope);
1110
1111 if (element.isNull())
1112 return false;
1113
1114 name = lookupName(element, Register);
1115 }
1116 const QQmlSA::PropertyPassInfo passInfo{ propertyName.isEmpty()
1117 ? QStringList{}
1118 : QStringList{ propertyName.toString() },
1119 std::move(pass), allowInheritance };
1120 m_propertyPasses.insert({ name, passInfo });
1121
1122 return true;
1123}
1124
1125void PassManagerPrivate::addBindingSourceLocations(const Element &element, const Element &scope,
1126 const QString prefix, bool isAttached)
1127{
1128 const Element &currentScope = scope.isNull() ? element : scope;
1129 const auto ownBindings = currentScope.ownPropertyBindings();
1130 for (const auto &binding : ownBindings) {
1131 switch (binding.bindingType()) {
1133 addBindingSourceLocations(element, Element{ binding.groupType() },
1134 prefix + binding.propertyName() + u'.');
1135 break;
1137 addBindingSourceLocations(element, Element{ binding.attachingType() },
1138 prefix + binding.propertyName() + u'.', true);
1139 break;
1140 default:
1141 m_bindingsByLocation.insert({ binding.sourceLocation().offset(),
1142 BindingInfo{ prefix + binding.propertyName(), binding,
1143 currentScope, isAttached } });
1144
1145 if (binding.bindingType() != QQmlSA::BindingType::Script)
1146 analyzeBinding(element, QQmlSA::Element(), binding.sourceLocation());
1147 }
1148 }
1149}
1150
1155{
1156 Q_D(PassManager);
1157 d->analyze(root);
1158}
1159
1161{
1162 QList<Element> runStack;
1163 runStack.push_back(root);
1164 while (!runStack.isEmpty()) {
1165 auto element = runStack.takeLast();
1166 addBindingSourceLocations(element);
1167 for (auto &elementPass : m_elementPasses)
1168 if (elementPass->shouldRun(element))
1169 elementPass->run(element);
1170
1171 for (auto it = element.childScopesBegin(); it != element.childScopesEnd(); ++it) {
1172 if ((*it)->scopeType() == QQmlSA::ScopeType::QMLScope)
1174 }
1175 }
1176}
1177
1178void PassManagerPrivate::analyzeWrite(const Element &element, QString propertyName,
1179 const Element &value, const Element &writeScope,
1181{
1182 for (PropertyPass *pass : findPropertyUsePasses(element, propertyName))
1183 pass->onWrite(element, propertyName, value, writeScope, location);
1184}
1185
1186void PassManagerPrivate::analyzeRead(const Element &element, QString propertyName,
1187 const Element &readScope, QQmlSA::SourceLocation location)
1188{
1189 for (PropertyPass *pass : findPropertyUsePasses(element, propertyName))
1190 pass->onRead(element, propertyName, readScope, location);
1191}
1192
1193void PassManagerPrivate::analyzeBinding(const Element &element, const QQmlSA::Element &value,
1195{
1196 const auto info = m_bindingsByLocation.find(location.offset());
1197
1198 // If there's no matching binding that means we're in a nested Ret somewhere inside an
1199 // expression
1200 if (info == m_bindingsByLocation.end())
1201 return;
1202
1203 const QQmlSA::Element &bindingScope = info->second.bindingScope;
1204 const QQmlSA::Binding &binding = info->second.binding;
1205 const QString &propertyName = info->second.fullPropertyName;
1206
1207 for (PropertyPass *pass : findPropertyUsePasses(element, propertyName))
1208 pass->onBinding(element, propertyName, binding, bindingScope, value);
1209
1210 if (!info->second.isAttached || bindingScope.baseType().isNull())
1211 return;
1212
1213 for (PropertyPass *pass : findPropertyUsePasses(bindingScope.baseType(), propertyName))
1214 pass->onBinding(element, propertyName, binding, bindingScope, value);
1215}
1216
1234{
1235 return PassManagerPrivate::visitor(*this)->imports().hasType(u"$module$." + module.toString());
1236}
1237
1242{
1244}
1245
1247{
1248 return manager.d_func()->m_visitor;
1249}
1250
1252{
1253 return manager.d_func()->m_typeResolver;
1254}
1255
1256QSet<PropertyPass *> PassManagerPrivate::findPropertyUsePasses(const QQmlSA::Element &element,
1257 const QString &propertyName)
1258{
1259 QStringList typeNames { lookupName(element) };
1260
1262 QQmlJSScope::scope(element),
1264 Q_UNUSED(mode);
1265 typeNames.append(lookupName(QQmlJSScope::createQQmlSAElement(scope)));
1266 return false;
1267 });
1268
1270
1271 for (const QString &typeName : typeNames) {
1272 for (auto &pass :
1273 { m_propertyPasses.equal_range(u""_s), m_propertyPasses.equal_range(typeName) }) {
1274 if (pass.first == pass.second)
1275 continue;
1276
1277 for (auto it = pass.first; it != pass.second; it++) {
1278 if (typeName != typeNames.constFirst() && !it->second.allowInheritance)
1279 continue;
1280 if (it->second.properties.isEmpty()
1281 || it->second.properties.contains(propertyName)) {
1282 passes.insert(it->second.pass.get());
1283 }
1284 }
1285 }
1286 }
1287 return passes;
1288}
1289
1290void DebugElementPass::run(const Element &element) {
1291 emitWarning(u"Type: " + element.baseTypeName(), qmlPlugin);
1292 if (auto bindings = element.propertyBindings(u"objectName"_s); !bindings.isEmpty()) {
1293 emitWarning(u"is named: " + bindings.first().stringValue(), qmlPlugin);
1294 }
1295 if (auto defPropName = element.defaultPropertyName(); !defPropName.isEmpty()) {
1296 emitWarning(u"binding " + QString::number(element.propertyBindings(defPropName).size())
1297 + u" elements to property "_s + defPropName,
1298 qmlPlugin);
1299 }
1300}
1301
1333{
1334 (void)element;
1335 return true;
1336}
1337
1353void PropertyPass::onBinding(const Element &element, const QString &propertyName,
1354 const QQmlSA::Binding &binding, const Element &bindingScope,
1355 const Element &value)
1356{
1357 Q_UNUSED(element);
1358 Q_UNUSED(propertyName);
1359 Q_UNUSED(binding);
1360 Q_UNUSED(bindingScope);
1361 Q_UNUSED(value);
1362}
1363
1370void PropertyPass::onRead(const Element &element, const QString &propertyName,
1371 const Element &readScope, QQmlSA::SourceLocation location)
1372{
1373 Q_UNUSED(element);
1374 Q_UNUSED(propertyName);
1375 Q_UNUSED(readScope);
1377}
1378
1386void PropertyPass::onWrite(const Element &element, const QString &propertyName,
1387 const Element &value, const Element &writeScope,
1389{
1390 Q_UNUSED(element);
1391 Q_UNUSED(propertyName);
1392 Q_UNUSED(writeScope);
1393 Q_UNUSED(value);
1395}
1396
1398{
1399}
1400
1401void DebugPropertyPass::onRead(const QQmlSA::Element &element, const QString &propertyName,
1403{
1404 emitWarning(u"onRead "_s
1405 + (QQmlJSScope::scope(element)->internalName().isEmpty()
1406 ? element.baseTypeName()
1407 : QQmlJSScope::scope(element)->internalName())
1408 + u' ' + propertyName + u' ' + QQmlJSScope::scope(readScope)->internalName()
1409 + u' ' + QString::number(location.startLine()) + u':'
1410 + QString::number(location.startColumn()),
1412}
1413
1414void DebugPropertyPass::onBinding(const QQmlSA::Element &element, const QString &propertyName,
1415 const QQmlSA::Binding &binding,
1416 const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)
1417{
1418 const auto location = QQmlSA::SourceLocation{ binding.sourceLocation() };
1419 emitWarning(u"onBinding element: '"_s
1420 + (QQmlJSScope::scope(element)->internalName().isEmpty()
1421 ? element.baseTypeName()
1422 : QQmlJSScope::scope(element)->internalName())
1423 + u"' property: '"_s + propertyName + u"' value: '"_s
1424 + (value.isNull() ? u"NULL"_s
1426 ? value.baseTypeName()
1428 + u"' binding_scope: '"_s
1429 + (QQmlJSScope::scope(bindingScope)->internalName().isEmpty()
1430 ? bindingScope.baseTypeName()
1431 : QQmlJSScope::scope(bindingScope)->internalName())
1432 + u"' "_s + QString::number(location.startLine()) + u':'
1433 + QString::number(location.startColumn()),
1435}
1436
1437void DebugPropertyPass::onWrite(const QQmlSA::Element &element, const QString &propertyName,
1438 const QQmlSA::Element &value, const QQmlSA::Element &writeScope,
1440{
1441 emitWarning(u"onWrite "_s + element.baseTypeName() + u' ' + propertyName + u' '
1443 + QQmlJSScope::scope(writeScope)->internalName() + u' '
1444 + QString::number(location.startLine()) + u':'
1445 + QString::number(location.startColumn()),
1447}
1448
1452std::vector<std::shared_ptr<ElementPass>> PassManager::elementPasses() const
1453{
1454 Q_D(const PassManager);
1455 return d->m_elementPasses;
1456}
1457
1461std::multimap<QString, PropertyPassInfo> PassManager::propertyPasses() const
1462{
1463 Q_D(const PassManager);
1464 return d->m_propertyPasses;
1465}
1466
1470std::unordered_map<quint32, BindingInfo> PassManager::bindingsByLocation() const
1471{
1472 Q_D(const PassManager);
1473 return d->m_bindingsByLocation;
1474}
1475
1477
1480 const QString &replacement)
1481 : m_fixSuggestion{ fixDescription, QQmlSA::SourceLocationPrivate::sourceLocation(location),
1482 replacement },
1483 q_ptr{ interface }
1484{
1485}
1486
1489 : m_fixSuggestion{ other.m_fixSuggestion }, q_ptr{ interface }
1490{
1491}
1492
1494 : m_fixSuggestion{ std::move(other.m_fixSuggestion) }, q_ptr{ interface }
1495{
1496}
1497
1499{
1500 return m_fixSuggestion.fixDescription();
1501}
1502
1504{
1506}
1507
1509{
1510 return m_fixSuggestion.replacement();
1511}
1512
1514{
1515 m_fixSuggestion.setFilename(fileName);
1516}
1517
1519{
1520 return m_fixSuggestion.filename();
1521}
1522
1524{
1525 m_fixSuggestion.setHint(hint);
1526}
1527
1529{
1530 return m_fixSuggestion.hint();
1531}
1532
1534{
1535 m_fixSuggestion.setAutoApplicable(autoApplicable);
1536}
1537
1539{
1540 return m_fixSuggestion.isAutoApplicable();
1541}
1542
1544{
1545 return saFixSuggestion.d_func()->m_fixSuggestion;
1546}
1547
1549{
1550 return saFixSuggestion.d_func()->m_fixSuggestion;
1551}
1552
1562 const QString &replacement)
1563 : d_ptr{ new FixSuggestionPrivate{ this, fixDescription, location, replacement } }
1564{
1565}
1566
1568 : d_ptr{ new FixSuggestionPrivate{ this, *other.d_func() } }
1569{
1570}
1571
1573 : d_ptr{ new FixSuggestionPrivate{ this, std::move(*other.d_func()) } }
1574{
1575}
1576
1578{
1579 if (*this == other)
1580 return *this;
1581
1582 d_func()->m_fixSuggestion = other.d_func()->m_fixSuggestion;
1583 return *this;
1584}
1585
1587{
1588 if (*this == other)
1589 return *this;
1590
1591 d_func()->m_fixSuggestion = std::move(other.d_func()->m_fixSuggestion);
1592 return *this;
1593}
1594
1596
1601{
1603}
1604
1609{
1612}
1613
1618{
1620}
1621
1626{
1628}
1629
1634{
1636}
1637
1642{
1644}
1645
1650{
1652}
1653
1657void FixSuggestion::setAutoApplicable(bool autoApplicable)
1658{
1659 return FixSuggestionPrivate::fixSuggestion(*this).setAutoApplicable(autoApplicable);
1660}
1661
1666{
1668}
1669
1670bool FixSuggestion::operatorEqualsImpl(const FixSuggestion &lhs, const FixSuggestion &rhs)
1671{
1672 return lhs.d_func()->m_fixSuggestion == rhs.d_func()->m_fixSuggestion;
1673}
1674
1675} // namespace QQmlSA
1676
static JNINativeMethod methods[]
\inmodule QtCore
QString toString() const
Returns a deep copy of this string view's data as a QString.
Definition qstring.h:1071
constexpr bool isEmpty() const noexcept
Returns whether this string view is empty - that is, whether {size() == 0}.
Definition qlist.h:74
bool isEmpty() const noexcept
Definition qlist.h:390
void push_back(parameter_type t)
Definition qlist.h:672
value_type takeLast()
Definition qlist.h:550
\inmodule QtCore
Definition qhash.h:1748
\inmodule QtCore
Definition qhash.h:1348
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition qhash.h:1930
QString filename() const
void setFilename(const QString &filename)
QQmlJS::SourceLocation location() const
QString hint() const
bool isAutoApplicable() const
QString replacement() const
QString fixDescription() const
void setHint(const QString &hint)
void setAutoApplicable(bool autoApply=true)
QQmlJSImporter::ImportedTypes imports() const
QQmlJSImporter * importer()
const QQmlJSLogger * logger() const
QQmlJSScopesById addressableScopes() const
ImportedTypes builtinInternalNames()
ImportedTypes importBuiltins()
Imports builtins.qmltypes and jsroot.qmltypes found in any of the import paths.
ImportedTypes importModule(const QString &module, const QString &prefix=QString(), QTypeRevision version=QTypeRevision(), QStringList *staticModuleList=nullptr)
QString code() const
bool isCategoryIgnored(QQmlJS::LoggerWarningId id) const
void log(const QString &message, QQmlJS::LoggerWarningId id, const QQmlJS::SourceLocation &srcLocation, bool showContext=true, bool showFileName=true, const std::optional< QQmlJSFixSuggestion > &suggestion={}, const QString overrideFileName=QString())
QString methodName() const
QQmlJSMetaMethodType methodType() const
QSharedPointer< const QQmlJSScope > literalType(const QQmlJSTypeResolver *resolver) const
QSharedPointer< const QQmlJSScope > objectType() const
ScriptBindingKind scriptKind() const
QSharedPointer< const QQmlJSScope > groupType() const
BindingType bindingType() const
const QQmlJS::SourceLocation & sourceLocation() const
QSharedPointer< const QQmlJSScope > attachingType() const
QString typeName() const
QList< QQmlJSMetaPropertyBinding > propertyBindings(const QString &name) const
bool isComposite() const
bool hasOwnPropertyBindings(const QString &name) const
QString defaultPropertyName() const
bool hasPropertyBindings(const QString &name) const
QString filePath() const
QQmlJS::ConstPtrWrapperIterator childScopesEnd() const
QQmlJS::ConstPtrWrapperIterator childScopesBegin() const
QQmlJSScope::Ptr parentScope()
ScopeType scopeType() const
QString baseTypeName() const
QString internalName() const
AccessSemantics accessSemantics() const
static QQmlSA::Element createQQmlSAElement(const ConstPtr &)
bool hasMethod(const QString &name) const
static const QQmlJSScope::ConstPtr & scope(const QQmlSA::Element &)
bool isPropertyRequired(const QString &name) const
bool inherits(const QQmlJSScope::ConstPtr &base) const
QQmlJSMetaProperty property(const QString &name) const
static QString prettyName(QAnyStringView name)
QQmlJSScope::ConstPtr baseType() const
static constexpr qsizetype sizeofQQmlSAElement()
bool hasProperty(const QString &name) const
QMultiHash< QString, QQmlJSMetaPropertyBinding > ownPropertyBindings() const
QQmlJS::SourceLocation sourceLocation() const
QMultiHash< QString, QQmlJSMetaMethod > ownMethods() const
QString id(const QQmlJSScope::ConstPtr &scope, const QQmlJSScope::ConstPtr &referrer) const
QQmlJSScope::ConstPtr scope(const QString &id, const QQmlJSScope::ConstPtr &referrer) const
static QQmlJSMetaPropertyBinding binding(QQmlSA::Binding &binding)
Definition qqmlsa.cpp:148
static QQmlSA::Binding createBinding(const QQmlJSMetaPropertyBinding &)
Definition qqmlsa.cpp:141
BindingPrivate(Binding *)
Definition qqmlsa.cpp:102
\inmodule QtQmlCompiler
Definition qqmlsa.h:63
QMultiHash< QString, Binding >::const_iterator constBegin() const
Returns an iterator to the beginning of the bindings.
Definition qqmlsa.cpp:68
QMultiHash< QString, Binding >::const_iterator constEnd() const
Returns an iterator to the end of the bindings.
Definition qqmlsa.cpp:82
\inmodule QtQmlCompiler
Definition qqmlsa.h:58
BindingType bindingType() const
Definition qqmlsa.cpp:167
bool hasUndefinedScriptValue() const
Definition qqmlsa.cpp:247
Binding & operator=(const Binding &)
Definition qqmlsa.cpp:109
bool hasObject() const
Returns true if this binding has an objects, otherwise returns false.
Definition qqmlsa.cpp:228
Element attachingType() const
Returns the attached type if the content type of this binding is AttachedProperty,...
Definition qqmlsa.cpp:193
static bool isLiteralBinding(BindingType)
Returns true if bindingType is a literal type, and false otherwise.
Definition qqmlsa.cpp:259
Element literalType(const QQmlJSTypeResolver *) const
Definition qqmlsa.cpp:242
QString propertyName() const
Returns the name of the property using this binding.
Definition qqmlsa.cpp:184
QString stringValue() const
Returns the associated string literal if the content type of this binding is StringLiteral,...
Definition qqmlsa.cpp:176
Element objectType() const
Returns the type of the associated object if the content type of this binding is Object,...
Definition qqmlsa.cpp:237
QQmlSA::SourceLocation sourceLocation() const
Returns the location in the QML code where this binding is defined.
Definition qqmlsa.cpp:201
ScriptBindingKind scriptKind() const
Returns the kind of associated associated script if the content type of this binding is Script,...
Definition qqmlsa.cpp:220
double numberValue() const
Returns the associated number if the content type of this binding is NumberLiteral,...
Definition qqmlsa.cpp:211
Element groupType() const
Returns the type of the property if this element is a group property, otherwise returns an invalid El...
Definition qqmlsa.cpp:162
BindingsPrivate(QQmlSA::Binding::Bindings *)
Definition qqmlsa.cpp:46
QMultiHash< QString, Binding >::const_iterator constBegin() const
Definition qqmlsa.cpp:74
static QQmlSA::Binding::Bindings createBindings(const QMultiHash< QString, QQmlJSMetaPropertyBinding > &)
Definition qqmlsa.cpp:739
QMultiHash< QString, Binding >::const_iterator constEnd() const
Definition qqmlsa.cpp:88
void run(const Element &element) override
Executes if shouldRun() returns true.
Definition qqmlsa.cpp:1290
void onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &value, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location) override
Executes whenever a property is written to.
Definition qqmlsa.cpp:1437
void onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value) override
Executes whenever a property gets bound to a value.
Definition qqmlsa.cpp:1414
DebugPropertyPass(QQmlSA::PassManager *manager)
Definition qqmlsa.cpp:1397
void onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location) override
Executes whenever a property is read.
Definition qqmlsa.cpp:1401
virtual bool shouldRun(const Element &element)
Returns true if the run() function should be executed on the given element.
Definition qqmlsa.cpp:1332
\inmodule QtQmlCompiler
Definition qqmlsa.h:197
QString internalId() const
Definition qqmlsa.cpp:590
Element baseType() const
Returns the Element this Element derives from.
Definition qqmlsa.cpp:553
bool hasMethod(const QString &methodName) const
Returns whether this Element has a method with the name methodName.
Definition qqmlsa.cpp:650
QString defaultPropertyName() const
Returns the name of the default property of this Element.
Definition qqmlsa.cpp:642
QQmlJS::ConstPtrWrapperIterator childScopesBegin() const
Returns an iterator to the beginning of this Element's children.
Definition qqmlsa.cpp:768
bool isPropertyRequired(const QString &propertyName) const
Returns whether the property with the name propertyName resolved on this Element is required.
Definition qqmlsa.cpp:633
QQmlJS::ConstPtrWrapperIterator childScopesEnd() const
Returns an iterator to the end of this Element's children.
Definition qqmlsa.cpp:776
QString name() const
Returns the name of this Element.
Definition qqmlsa.cpp:794
Element & operator=(const Element &)
Definition qqmlsa.cpp:528
bool operator!() const
Definition qqmlsa.cpp:786
QQmlSA::SourceLocation sourceLocation() const
Returns the location in the QML code where this method is defined.
Definition qqmlsa.cpp:674
QString filePath() const
Returns the file path of the QML code that defines this method.
Definition qqmlsa.cpp:683
bool isNull() const
Definition qqmlsa.cpp:582
Binding::Bindings ownPropertyBindings() const
Returns this Element's property bindings which are not defined on its base or extension objects.
Definition qqmlsa.cpp:709
QList< Binding > propertyBindings(const QString &propertyName) const
Returns this Element's property bindings that have the name propertyName.
Definition qqmlsa.cpp:727
Method::Methods ownMethods() const
Returns this Elements's method which are not defined on its base or extension objects.
Definition qqmlsa.cpp:666
bool isComposite() const
Returns true for objects defined from Qml, and false for objects declared from C++.
Definition qqmlsa.cpp:607
Property property(const QString &propertyName) const
Returns the property with the name propertyName if it is found in this Element or its base and extens...
Definition qqmlsa.cpp:624
bool hasPropertyBindings(const QString &name) const
Returns whethe this Element has a property binding with the name name.
Definition qqmlsa.cpp:691
bool hasProperty(const QString &propertyName) const
Returns whether this Element has a property with the name propertyName.
Definition qqmlsa.cpp:615
Element parentScope() const
Returns the Element that encloses this Element.
Definition qqmlsa.cpp:569
bool inherits(const Element &) const
Returns whether this Element inherits from element.
Definition qqmlsa.cpp:577
AccessSemantics accessSemantics() const
Returns the access semantics of this Element.
Definition qqmlsa.cpp:599
QString baseTypeName() const
Returns the name of the Element this Element derives from.
Definition qqmlsa.cpp:561
bool hasOwnPropertyBindings(const QString &propertyName) const
Returns whether this Element has property bindings which are not defined in its base or extension obj...
Definition qqmlsa.cpp:700
ScopeType scopeType() const
Returns the type of Element's scope.
Definition qqmlsa.cpp:545
QQmlSA::SourceLocation location() const
Definition qqmlsa.cpp:1503
void setHint(const QString &)
Definition qqmlsa.cpp:1523
void setFileName(const QString &)
Definition qqmlsa.cpp:1513
QString fixDescription() const
Definition qqmlsa.cpp:1498
FixSuggestionPrivate(FixSuggestion *)
Definition qqmlsa.cpp:1476
void setAutoApplicable(bool autoApplicable=true)
Definition qqmlsa.cpp:1533
QString replacement() const
Definition qqmlsa.cpp:1508
static QQmlJSFixSuggestion & fixSuggestion(QQmlSA::FixSuggestion &)
Definition qqmlsa.cpp:1543
\inmodule QtQmlCompiler
Definition qqmlsa.h:392
FixSuggestion(const QString &fixDescription, const QQmlSA::SourceLocation &location, const QString &replacement=QString())
Definition qqmlsa.cpp:1561
void setHint(const QString &)
Sets hint as the hint for this fix suggestion.
Definition qqmlsa.cpp:1641
QString fileName() const
Returns the name of the file where this fix suggestion applies.
Definition qqmlsa.cpp:1633
FixSuggestion & operator=(const FixSuggestion &)
Definition qqmlsa.cpp:1577
void setFileName(const QString &)
Sets fileName as the name of the file where this fix suggestion applies.
Definition qqmlsa.cpp:1625
QString hint() const
Returns the hint for this fix suggestion.
Definition qqmlsa.cpp:1649
QString replacement() const
Returns the fix that will replace the problematic source code.
Definition qqmlsa.cpp:1617
QString fixDescription() const
Returns the description of the fix.
Definition qqmlsa.cpp:1600
QQmlSA::SourceLocation location() const
Returns the location where the fix would be applied.
Definition qqmlsa.cpp:1608
bool isAutoApplicable() const
Returns whether this suggested fix can be applied automatically.
Definition qqmlsa.cpp:1665
void setAutoApplicable(bool autoApplicable=true)
Sets uses autoApplicable to set whtether this suggested fix can be applied automatically.
Definition qqmlsa.cpp:1657
GenericPassPrivate(GenericPass *interface, PassManager *manager)
Definition qqmlsa.cpp:827
\inmodule QtQmlCompiler
Definition qqmlsa.h:278
Element resolveLiteralType(const Binding &binding)
Returns the element representing the type of literal in binding.
Definition qqmlsa.cpp:958
void emitWarning(QAnyStringView diagnostic, QQmlJS::LoggerWarningId id)
Emits a warning message diagnostic about an issue of type id.
Definition qqmlsa.cpp:850
Element resolveBuiltinType(QAnyStringView typeName) const
Returns the type of the built-in type identified by typeName.
Definition qqmlsa.cpp:930
virtual ~GenericPass()
Element resolveAttached(QAnyStringView moduleName, QAnyStringView typeName)
Returns the attached type of typeName defined in module moduleName.
Definition qqmlsa.cpp:948
QString resolveElementToId(const Element &element, const Element &context)
Returns the id of element in a given context.
Definition qqmlsa.cpp:979
Element resolveTypeInFileScope(QAnyStringView typeName)
Returns the type corresponding to typeName inside the currently analysed file.
Definition qqmlsa.cpp:888
QString sourceCode(QQmlSA::SourceLocation location)
Returns the source code located within location.
Definition qqmlsa.cpp:990
Element resolveAttachedInFileScope(QAnyStringView typeName)
Returns the attached type corresponding to typeName used inside the currently analysed file.
Definition qqmlsa.cpp:900
Element resolveIdToElement(QAnyStringView id, const Element &context)
Returns the element in context that has id id.
Definition qqmlsa.cpp:967
GenericPass(PassManager *manager)
Creates a generic pass.
Definition qqmlsa.cpp:844
Element resolveType(QAnyStringView moduleName, QAnyStringView typeName)
Returns the type of typeName defined in module moduleName.
Definition qqmlsa.cpp:914
MethodPrivate(Method *)
Definition qqmlsa.cpp:312
static QQmlSA::Method createMethod(const QQmlJSMetaMethod &)
Definition qqmlsa.cpp:391
MethodType methodType() const
Definition qqmlsa.cpp:324
static QQmlJSMetaMethod method(const QQmlSA::Method &)
Definition qqmlsa.cpp:412
QString methodName() const
Definition qqmlsa.cpp:319
\inmodule QtQmlCompiler
Definition qqmlsa.h:123
QMultiHash< QString, Method >::const_iterator constBegin() const
Returns an iterator to the beginning of the methods.
Definition qqmlsa.cpp:276
QMultiHash< QString, Method >::const_iterator constEnd() const
Returns an iterator to the end of the methods.
Definition qqmlsa.cpp:290
\inmodule QtQmlCompiler
Definition qqmlsa.h:118
QString methodName() const
Returns the name of the this method.
Definition qqmlsa.cpp:370
Method & operator=(const Method &)
Definition qqmlsa.cpp:345
MethodType methodType() const
Returns the type of this method.
Definition qqmlsa.cpp:380
static QQmlSA::Method::Methods createMethods(const QMultiHash< QString, QQmlJSMetaMethod > &)
Definition qqmlsa.cpp:400
QMultiHash< QString, Method >::const_iterator constEnd() const
Definition qqmlsa.cpp:295
MethodsPrivate(QQmlSA::Method::Methods *)
Definition qqmlsa.cpp:300
QMultiHash< QString, Method >::const_iterator constBegin() const
Definition qqmlsa.cpp:282
void analyze(const Element &root)
Definition qqmlsa.cpp:1160
void registerElementPass(std::unique_ptr< ElementPass > pass)
PassManager::registerElementPass registers ElementPass with the pass manager.
Definition qqmlsa.cpp:1031
static QQmlJSTypeResolver * resolver(const QQmlSA::PassManager &)
Definition qqmlsa.cpp:1251
static QQmlJSImportVisitor * visitor(const QQmlSA::PassManager &)
Definition qqmlsa.cpp:1246
bool registerPropertyPass(std::shared_ptr< PropertyPass > pass, QAnyStringView moduleName, QAnyStringView typeName, QAnyStringView propertyName=QAnyStringView(), bool allowInheritance=true)
Definition qqmlsa.cpp:1096
\inmodule QtQmlCompiler
Definition qqmlsa.h:309
void analyze(const Element &root)
Runs the element passes over root and all its children.
Definition qqmlsa.cpp:1154
std::multimap< QString, PropertyPassInfo > propertyPasses() const
Returns the list of property passes.
Definition qqmlsa.cpp:1461
bool registerPropertyPass(std::shared_ptr< PropertyPass > pass, QAnyStringView moduleName, QAnyStringView typeName, QAnyStringView propertyName=QAnyStringView(), bool allowInheritance=true)
Registers a static analysis pass for properties.
Definition qqmlsa.cpp:1088
PassManager(QQmlJSImportVisitor *visitor, QQmlJSTypeResolver *resolver)
Constructs a pass manager given an import visitor and a type resolver.
Definition qqmlsa.cpp:1009
void registerElementPass(std::unique_ptr< ElementPass > pass)
Registers a static analysis pass to be run on all elements.
Definition qqmlsa.cpp:1019
std::unordered_map< quint32, BindingInfo > bindingsByLocation() const
Returns bindings by their source location.
Definition qqmlsa.cpp:1470
bool isCategoryEnabled(QQmlJS::LoggerWarningId category) const
Returns true if warnings of category are enabled, false otherwise.
Definition qqmlsa.cpp:1241
std::vector< std::shared_ptr< ElementPass > > elementPasses() const
Returns the list of element passes.
Definition qqmlsa.cpp:1452
bool hasImportedModule(QAnyStringView name) const
Returns true if the module named module has been imported by the QML to be analyzed,...
Definition qqmlsa.cpp:1233
\inmodule QtQmlCompiler
Definition qqmlsa.h:348
PropertyPass(PassManager *manager)
Definition qqmlsa.cpp:1346
virtual void onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &value, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location)
Executes whenever a property is written to.
Definition qqmlsa.cpp:1386
virtual void onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
Executes whenever a property is read.
Definition qqmlsa.cpp:1370
virtual void onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)
Executes whenever a property gets bound to a value.
Definition qqmlsa.cpp:1353
static QQmlSA::Property createProperty(const QQmlJSMetaProperty &)
Definition qqmlsa.cpp:444
static QQmlJSMetaProperty property(const QQmlSA::Property &property)
Definition qqmlsa.cpp:439
bool isValid() const
Definition qqmlsa.cpp:434
PropertyPrivate(Property *)
Definition qqmlsa.cpp:417
QString typeName() const
Definition qqmlsa.cpp:429
\inmodule QtQmlCompiler
Definition qqmlsa.h:166
QString typeName() const
Returns the name of the type of this property.
Definition qqmlsa.cpp:494
bool isValid() const
Definition qqmlsa.cpp:500
Property & operator=(const Property &)
Definition qqmlsa.cpp:469
static const QQmlJS::SourceLocation & sourceLocation(const QQmlSA::SourceLocation &sourceLocation)
static QQmlSA::SourceLocation createQQmlSASourceLocation(const QQmlJS::SourceLocation &jsLocation)
\inmodule QtQmlCompiler
Definition qset.h:18
bool isEmpty() const
Definition qset.h:52
bool contains(const T &value) const
Definition qset.h:71
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition qstring.h:898
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
Definition qstring.cpp:5204
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Definition qstring.cpp:5350
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:1083
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:7822
#define this
Definition dialogs.cpp:9
const QLoggingCategory & category()
[1]
QHash< int, QWidget * > hash
[35multi]
QSet< QString >::iterator it
\inmodule QtQmlCompiler
MethodType
Definition qqmlsa.h:55
@ Register
Definition qqmlsa.cpp:1036
AccessSemantics
Definition qqmlsa_p.h:40
static QString lookupName(const QQmlSA::Element &element, LookupMode mode=Lookup)
Definition qqmlsa.cpp:1037
Combined button and popup list for selecting options.
int passes
Definition qtestlog.cpp:78
static void * context
std::pair< T1, T2 > QPair
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char * interface
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
static QString methodName(const QDBusIntrospection::Method &method)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
#define qWarning
Definition qlogging.h:162
const char * typeName
GLint location
GLenum mode
GLuint64 key
GLuint GLuint end
GLenum type
GLenum GLuint GLintptr offset
GLuint name
static QString internalName(const QQmlJSScope::ConstPtr &scope)
const QQmlJS::LoggerWarningId qmlPlugin
@ ScriptValue_Undefined
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define Q_UNUSED(x)
ptrdiff_t qsizetype
Definition qtypes.h:70
const char property[13]
Definition qwizard.cpp:101
QFileInfo info(fileName)
[8]
QSharedPointer< T > other(t)
[5]
QNetworkAccessManager manager
char * toString(const MyType &t)
[31]
bool hasType(const QString &name) const
ImportedScope< ConstPtr > type(const QString &name) const
static bool searchBaseAndExtensionTypes(QQmlJSScopePtr type, const Action &check)