aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-12-02 23:42:08 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-12-04 11:32:12 +0100
commit2971585b88cc12b65f54ba424023e5fb4598fd7e (patch)
tree45a8905d9456c5b4031619c64d33dd157315d766 /src/qml/qml
parent3a9cb08160ed567ee1dd2d918f5fa2901f8f1725 (diff)
Fix some style problems
qAsConst, an unused variable, indentation. Change-Id: Idc2020d0d012ef1d4207fa487572699e5e0bc32c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmltypedata.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmltypedata.cpp b/src/qml/qml/qqmltypedata.cpp
index c4b22629a9..89bccc0c39 100644
--- a/src/qml/qml/qqmltypedata.cpp
+++ b/src/qml/qml/qqmltypedata.cpp
@@ -501,7 +501,7 @@ void QQmlTypeData::done()
auto type = QQmlMetaType::typeForUrl(finalUrlString(), hashedStringRef, false, &errors);
Q_ASSERT(errors.empty());
if (type.isValid()) {
- for (auto const &icDatum : m_inlineComponentData) {
+ for (auto const &icDatum : qAsConst(m_inlineComponentData)) {
Q_ASSERT(icDatum.typeIds.isValid());
QQmlType existingType = type.lookupInlineComponentById(type.lookupInlineComponentIdByName(m_compiledData->stringAt(icDatum.nameIndex)));
type.associateInlineComponent(m_compiledData->stringAt(icDatum.nameIndex),
@@ -652,7 +652,6 @@ void QQmlTypeData::continueLoadFromIR()
for (auto const& object: m_document->objects) {
for (auto it = object->inlineComponentsBegin(); it != object->inlineComponentsEnd(); ++it) {
QString const nameString = m_document->stringAt(it->nameIndex);
- QByteArray const name = nameString.toUtf8();
auto importUrl = finalUrl();
importUrl.setFragment(QString::number(it->objectIndex));
auto import = new QQmlImportInstance(); // Note: The cache takes ownership of the QQmlImportInstance
@@ -888,8 +887,7 @@ void QQmlTypeData::resolveTypes()
QQmlError QQmlTypeData::buildTypeResolutionCaches(
QQmlRefPointer<QQmlTypeNameCache> *typeNameCache,
- QV4::ResolvedTypeReferenceMap *resolvedTypeCache
- ) const
+ QV4::ResolvedTypeReferenceMap *resolvedTypeCache) const
{
typeNameCache->adopt(new QQmlTypeNameCache(m_importCache));