aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlimport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r--src/qml/qml/qqmlimport.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index ff48a10d95..b17bb0455d 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -169,6 +169,7 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa
} // namespace
+#ifndef QT_NO_LIBRARY
struct RegisteredPlugin {
QString uri;
QPluginLoader* loader;
@@ -193,6 +194,7 @@ void qmlClearEnginePlugins()
}
typedef QPair<QStaticPlugin, QJsonArray> StaticPluginPair;
+#endif
class QQmlImportNamespace
{
@@ -292,9 +294,10 @@ public:
const QString &uri, const QString &url,
int vmaj, int vmin, QV4::CompiledData::Import::ImportType type,
QList<QQmlError> *errors, bool lowPrecedence = false);
-
+#ifndef QT_NO_LIBRARY
bool populatePluginPairVector(QVector<StaticPluginPair> &result, const QString &uri,
const QString &qmldirPath, QList<QQmlError> *errors);
+#endif
};
/*!
@@ -382,7 +385,7 @@ void QQmlImports::populateCache(QQmlTypeNameCache *cache) const
// We need to exclude the entry for the current baseUrl. This can happen for example
// when handling qmldir files on the remote dir case and the current type is marked as
// singleton.
-bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QString baseUrl)
+bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QString &baseUrl)
{
if (importUrl.isEmpty())
return false;
@@ -398,7 +401,7 @@ bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QSt
return true;
}
-void findCompositeSingletons(const QQmlImportNamespace &set, QList<QQmlImports::CompositeSingletonReference> &resultList, QUrl baseUrl)
+void findCompositeSingletons(const QQmlImportNamespace &set, QList<QQmlImports::CompositeSingletonReference> &resultList, const QUrl &baseUrl)
{
typedef QQmlDirComponents::const_iterator ConstIterator;
@@ -826,6 +829,7 @@ QQmlImportNamespace *QQmlImportsPrivate::findQualifiedNamespace(const QHashedStr
}
+#ifndef QT_NO_LIBRARY
/*!
Get all static plugins that are QML plugins and has a meta data URI that begins with \a uri.
Note that if e.g uri == "a", and different plugins have meta data "a", "a.2.1", "a.b.c", all
@@ -869,6 +873,7 @@ bool QQmlImportsPrivate::populatePluginPairVector(QVector<StaticPluginPair> &res
}
return true;
}
+#endif
/*!
Import an extension defined by a qmldir file.
@@ -995,6 +1000,13 @@ bool QQmlImportsPrivate::importExtension(const QString &qmldirFilePath,
}
#else
+ Q_UNUSED(qmldirFilePath);
+ Q_UNUSED(uri);
+ Q_UNUSED(vmaj);
+ Q_UNUSED(vmin);
+ Q_UNUSED(database);
+ Q_UNUSED(qmldir);
+ Q_UNUSED(errors);
return false;
#endif // QT_NO_LIBRARY
return true;
@@ -1931,6 +1943,12 @@ bool QQmlImportDatabase::importStaticPlugin(QObject *instance, const QString &ba
return true;
#else
+ Q_UNUSED(instance);
+ Q_UNUSED(basePath);
+ Q_UNUSED(uri);
+ Q_UNUSED(typeNamespace);
+ Q_UNUSED(vmaj);
+ Q_UNUSED(errors);
return false;
#endif
}
@@ -2011,6 +2029,11 @@ bool QQmlImportDatabase::importDynamicPlugin(const QString &filePath, const QStr
return true;
#else
+ Q_UNUSED(filePath);
+ Q_UNUSED(uri);
+ Q_UNUSED(typeNamespace);
+ Q_UNUSED(vmaj);
+ Q_UNUSED(errors);
return false;
#endif
}