| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlimport_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | class QQmlTypeNameCache; | - |
| 4 | class QQmlEngine; | - |
| 5 | class QDir; | - |
| 6 | class QQmlImportNamespace; | - |
| 7 | class QQmlImportsPrivate; | - |
| 8 | class QQmlImportDatabase; | - |
| 9 | class QQmlTypeLoader; | - |
| 10 | class QQmlTypeLoaderQmldirContent; | - |
| 11 | - | |
| 12 | namespace QQmlImport { | - |
| 13 | enum RecursionRestriction { PreventRecursion, AllowRecursion }; | - |
| 14 | } | - |
| 15 | - | |
| 16 | struct QQmlImportInstance | - |
| 17 | { | - |
| 18 | QString uri; | - |
| 19 | QString url; | - |
| 20 | int majversion; | - |
| 21 | int minversion; | - |
| 22 | bool isLibrary; | - |
| 23 | bool implicitlyImported = false; | - |
| 24 | QQmlDirComponents qmlDirComponents; | - |
| 25 | QQmlDirScripts qmlDirScripts; | - |
| 26 | - | |
| 27 | bool setQmldirContent(const QString &resolvedUrl, const QQmlTypeLoaderQmldirContent &qmldir, | - |
| 28 | QQmlImportNamespace *nameSpace, QList<QQmlError> *errors); | - |
| 29 | - | |
| 30 | static QQmlDirScripts getVersionedScripts(const QQmlDirScripts &qmldirscripts, int vmaj, int vmin); | - |
| 31 | - | |
| 32 | bool resolveType(QQmlTypeLoader *typeLoader, const QHashedStringRef &type, | - |
| 33 | int *vmajor, int *vminor, QQmlType* type_return, | - |
| 34 | QString *base = nullptr, bool *typeRecursionDetected = nullptr, | - |
| 35 | QQmlType::RegistrationType = QQmlType::AnyRegistrationType, | - |
| 36 | QQmlImport::RecursionRestriction recursionRestriction = QQmlImport::PreventRecursion, | - |
| 37 | QList<QQmlError> *errors = nullptr) const; | - |
| 38 | }; | - |
| 39 | - | |
| 40 | class QQmlImportNamespace | - |
| 41 | { | - |
| 42 | public: | - |
| 43 | QQmlImportNamespace() : nextNamespace(nullptr) {} executed 56775 times by 142 tests: end of blockExecuted by:
| 56775 |
| 44 | ~QQmlImportNamespace() { qDeleteAll(imports); } executed 14861 times by 135 tests: end of blockExecuted by:
| 14861 |
| 45 | - | |
| 46 | QList<QQmlImportInstance *> imports; | - |
| 47 | - | |
| 48 | QQmlImportInstance *findImport(const QString &uri) const; | - |
| 49 | - | |
| 50 | bool resolveType(QQmlTypeLoader *typeLoader, const QHashedStringRef& type, | - |
| 51 | int *vmajor, int *vminor, QQmlType* type_return, | - |
| 52 | QString *base = nullptr, QList<QQmlError> *errors = nullptr, | - |
| 53 | QQmlType::RegistrationType registrationType = QQmlType::AnyRegistrationType, | - |
| 54 | QQmlImport::RecursionRestriction recursionRestriction = QQmlImport::PreventRecursion); | - |
| 55 | - | |
| 56 | - | |
| 57 | QHashedString prefix; | - |
| 58 | - | |
| 59 | - | |
| 60 | QQmlImportNamespace *nextNamespace; | - |
| 61 | }; | - |
| 62 | - | |
| 63 | class __attribute__((visibility("default"))) QQmlImports | - |
| 64 | { | - |
| 65 | public: | - |
| 66 | enum ImportVersion { FullyVersioned, PartiallyVersioned, Unversioned }; | - |
| 67 | - | |
| 68 | QQmlImports(QQmlTypeLoader *); | - |
| 69 | QQmlImports(const QQmlImports &); | - |
| 70 | ~QQmlImports(); | - |
| 71 | QQmlImports &operator=(const QQmlImports &); | - |
| 72 | - | |
| 73 | void setBaseUrl(const QUrl &url, const QString &urlString = QString()); | - |
| 74 | QUrl baseUrl() const; | - |
| 75 | - | |
| 76 | bool resolveType(const QHashedStringRef &type, | - |
| 77 | QQmlType *type_return, | - |
| 78 | int *version_major, int *version_minor, | - |
| 79 | QQmlImportNamespace **ns_return, | - |
| 80 | QList<QQmlError> *errors = nullptr, | - |
| 81 | QQmlType::RegistrationType registrationType = QQmlType::AnyRegistrationType, | - |
| 82 | QQmlImport::RecursionRestriction recursionRestriction | - |
| 83 | = QQmlImport::PreventRecursion) const; | - |
| 84 | bool resolveType(QQmlImportNamespace *, | - |
| 85 | const QHashedStringRef& type, | - |
| 86 | QQmlType *type_return, int *version_major, int *version_minor, | - |
| 87 | QQmlType::RegistrationType registrationType | - |
| 88 | = QQmlType::AnyRegistrationType) const; | - |
| 89 | - | |
| 90 | bool addImplicitImport(QQmlImportDatabase *importDb, QList<QQmlError> *errors); | - |
| 91 | - | |
| 92 | bool addFileImport(QQmlImportDatabase *, | - |
| 93 | const QString& uri, const QString& prefix, int vmaj, int vmin, bool incomplete, | - |
| 94 | QList<QQmlError> *errors); | - |
| 95 | - | |
| 96 | bool addLibraryImport(QQmlImportDatabase *importDb, | - |
| 97 | const QString &uri, const QString &prefix, int vmaj, int vmin, | - |
| 98 | const QString &qmldirIdentifier, const QString &qmldirUrl, bool incomplete, QList<QQmlError> *errors); | - |
| 99 | - | |
| 100 | bool updateQmldirContent(QQmlImportDatabase *importDb, | - |
| 101 | const QString &uri, const QString &prefix, | - |
| 102 | const QString &qmldirIdentifier, const QString &qmldirUrl, QList<QQmlError> *errors); | - |
| 103 | - | |
| 104 | bool locateQmldir(QQmlImportDatabase *, | - |
| 105 | const QString &uri, int vmaj, int vmin, | - |
| 106 | QString *qmldirFilePath, QString *url); | - |
| 107 | - | |
| 108 | void populateCache(QQmlTypeNameCache *cache) const; | - |
| 109 | - | |
| 110 | struct ScriptReference | - |
| 111 | { | - |
| 112 | QString nameSpace; | - |
| 113 | QString qualifier; | - |
| 114 | QUrl location; | - |
| 115 | }; | - |
| 116 | - | |
| 117 | QList<ScriptReference> resolvedScripts() const; | - |
| 118 | - | |
| 119 | struct CompositeSingletonReference | - |
| 120 | { | - |
| 121 | QString typeName; | - |
| 122 | QString prefix; | - |
| 123 | int majorVersion; | - |
| 124 | int minorVersion; | - |
| 125 | }; | - |
| 126 | - | |
| 127 | QList<CompositeSingletonReference> resolvedCompositeSingletons() const; | - |
| 128 | - | |
| 129 | static QStringList completeQmldirPaths(const QString &uri, const QStringList &basePaths, int vmaj, int vmin); | - |
| 130 | static QString versionString(int vmaj, int vmin, ImportVersion version); | - |
| 131 | - | |
| 132 | static bool isLocal(const QString &url); | - |
| 133 | static bool isLocal(const QUrl &url); | - |
| 134 | static QUrl urlFromLocalFileOrQrcOrUrl(const QString &); | - |
| 135 | - | |
| 136 | static void setDesignerSupportRequired(bool b); | - |
| 137 | - | |
| 138 | private: | - |
| 139 | friend class QQmlImportDatabase; | - |
| 140 | QQmlImportsPrivate *d; | - |
| 141 | }; | - |
| 142 | - | |
| 143 | class QQmlImportDatabase | - |
| 144 | { | - |
| 145 | public: static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1) { return QCoreApplication::translate("QQmlImportDatabase", sourceText, disambiguation, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *sourceText, const char *disambiguation = nullptr, int n = -1) { return QCoreApplication::translate("QQmlImportDatabase", sourceText, disambiguation, n); } private: | - |
| 146 | public: | - |
| 147 | enum PathType { Local, Remote, LocalOrRemote }; | - |
| 148 | - | |
| 149 | QQmlImportDatabase(QQmlEngine *); | - |
| 150 | ~QQmlImportDatabase(); | - |
| 151 | - | |
| 152 | bool importDynamicPlugin(const QString &filePath, const QString &uri, const QString &importNamespace, int vmaj, QList<QQmlError> *errors); | - |
| 153 | - | |
| 154 | QStringList importPathList(PathType type = LocalOrRemote) const; | - |
| 155 | void setImportPathList(const QStringList &paths); | - |
| 156 | void addImportPath(const QString& dir); | - |
| 157 | - | |
| 158 | QStringList pluginPathList() const; | - |
| 159 | void setPluginPathList(const QStringList &paths); | - |
| 160 | void addPluginPath(const QString& path); | - |
| 161 | - | |
| 162 | private: | - |
| 163 | friend class QQmlImportsPrivate; | - |
| 164 | QString resolvePlugin(QQmlTypeLoader *typeLoader, | - |
| 165 | const QString &qmldirPath, const QString &qmldirPluginPath, | - |
| 166 | const QString &baseName, const QStringList &suffixes, | - |
| 167 | const QString &prefix = QString()); | - |
| 168 | QString resolvePlugin(QQmlTypeLoader *typeLoader, | - |
| 169 | const QString &qmldirPath, const QString &qmldirPluginPath, | - |
| 170 | const QString &baseName); | - |
| 171 | bool importStaticPlugin(QObject *instance, const QString &basePath, const QString &uri, | - |
| 172 | const QString &typeNamespace, int vmaj, QList<QQmlError> *errors); | - |
| 173 | bool registerPluginTypes(QObject *instance, const QString &basePath, | - |
| 174 | const QString &uri, const QString &typeNamespace, int vmaj, QList<QQmlError> *errors); | - |
| 175 | void clearDirCache(); | - |
| 176 | - | |
| 177 | struct QmldirCache { | - |
| 178 | int versionMajor; | - |
| 179 | int versionMinor; | - |
| 180 | QString qmldirFilePath; | - |
| 181 | QString qmldirPathUrl; | - |
| 182 | QmldirCache *next; | - |
| 183 | }; | - |
| 184 | - | |
| 185 | - | |
| 186 | QStringHash<QmldirCache *> qmldirCache; | - |
| 187 | - | |
| 188 | - | |
| 189 | QStringList filePluginPath; | - |
| 190 | QStringList fileImportPath; | - |
| 191 | - | |
| 192 | QSet<QString> qmlDirFilesForWhichPluginsHaveBeenLoaded; | - |
| 193 | QSet<QString> initializedPlugins; | - |
| 194 | QQmlEngine *engine; | - |
| 195 | }; | - |
| 196 | - | |
| 197 | void qmlClearEnginePlugins(); | - |
| 198 | - | |
| 199 | - | |
| Switch to Source code | Preprocessed file |