Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
6.8
-
None
-
-
57b681eb5 (dev)
Description
Reorder imports alphabetically:
qqmldomexternalitems.cpp
void QmlFile::writeOut(const DomItem &self, OutWriter &ow) const { ensurePopulated(); for (const DomItem &p : self.field(Fields::pragmas).values()) { p.writeOut(ow); } auto imports = self.field(Fields::imports).values(); std::stable_sort (imports.begin(), imports.end(), [=](const DomItem& item1, const DomItem& item2) { const auto uri1 = item1[QStringLiteral(u"uri")].toString(); const auto uri2 = item2[QStringLiteral(u"uri")].toString(); return uri1 < uri2; }); for (const DomItem& i : imports) { i.writeOut(ow); } ow.ensureNewline(2); DomItem mainC = self.field(Fields::components).key(QString()).index(0); mainC.writeOut(ow); }
Also needed to disable the internal stability checks because they are not done on the output and fail after this change.