_plugins.append(entry);
- } else if (sections[0] == QLatin1String("internal")) {
- if (sectionCount != 3) {
- reportError(lineNumber, -1,
- QString::fromUtf8("internal types require 2 arguments, but %1 were provided").arg(sectionCount + 1));
- continue;
- }
- Component entry(sections[1], sections[2], -1, -1);
- entry.internal = true;
- _components.append(entry);
- } else if (sections[0] == QLatin1String("typeinfo")) {
- if (sectionCount != 2) {
- reportError(lineNumber, -1,
- QString::fromUtf8("typeinfo requires 1 argument, but %1 were provided").arg(sectionCount - 1));
- continue;
- }
-
} else if (sectionCount == 2) {
// No version specified (should only be used for relative qmldir files)
const Component entry(sections[0], sections[1], -1, -1);
struct Component
{
Component()
- : majorVersion(0), minorVersion(0), internal(false) {}
+ : majorVersion(0), minorVersion(0) {}
Component(const QString &typeName, const QString &fileName, int majorVersion, int minorVersion)
- : typeName(typeName), fileName(fileName), majorVersion(majorVersion), minorVersion(minorVersion),
- internal(false) {}
+ : typeName(typeName), fileName(fileName), majorVersion(majorVersion), minorVersion(minorVersion)
+ {}
QString typeName;
QString fileName;
int majorVersion;
int minorVersion;
- bool internal;
};
QList<Component> components() const;
QString _filePathSouce;
QList<Component> _components;
QList<Plugin> _plugins;
- unsigned _isParsed: 1;
+ bool _isParsed;
};
typedef QList<QDeclarativeDirParser::Component> QDeclarativeDirComponents;
if ((vmaj == -1) || (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion))) {
QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
QUrl candidate = url.resolved(QUrl(c.fileName));
- if (c.internal && base) {
- if (base->resolved(QUrl(c.fileName)) != candidate)
- continue; // failed attempt to access an internal type
- }
if (base && *base == candidate) {
if (typeRecursionDetected)
*typeRecursionDetected = true;