Commit e7c60ca3 authored by Wescoeur's avatar Wescoeur

feat(App): add an import qml path for plugins

parent 73e0f0b7
...@@ -142,6 +142,7 @@ inline void activeSplashScreen (QQmlApplicationEngine *engine) { ...@@ -142,6 +142,7 @@ inline void activeSplashScreen (QQmlApplicationEngine *engine) {
void App::initContentApp () { void App::initContentApp () {
shared_ptr<linphone::Config> config = ::getConfigIfExists(*mParser); shared_ptr<linphone::Config> config = ::getConfigIfExists(*mParser);
const QString pluginsPath = ::Utils::coreStringToAppString(Paths::getPluginsDirPath());
// Destroy qml components and linphone core if necessary. // Destroy qml components and linphone core if necessary.
if (mEngine) { if (mEngine) {
...@@ -167,7 +168,7 @@ void App::initContentApp () { ...@@ -167,7 +168,7 @@ void App::initContentApp () {
}); });
// Add plugins directory. // Add plugins directory.
addLibraryPath(::Utils::coreStringToAppString(Paths::getPluginsDirPath())); addLibraryPath(pluginsPath);
qInfo() << QStringLiteral("Library paths:") << libraryPaths(); qInfo() << QStringLiteral("Library paths:") << libraryPaths();
} }
...@@ -185,6 +186,8 @@ void App::initContentApp () { ...@@ -185,6 +186,8 @@ void App::initContentApp () {
mEngine->addImportPath(":/ui/modules"); mEngine->addImportPath(":/ui/modules");
mEngine->addImportPath(":/ui/scripts"); mEngine->addImportPath(":/ui/scripts");
mEngine->addImportPath(":/ui/views"); mEngine->addImportPath(":/ui/views");
mEngine->addImportPath(pluginsPath);
qInfo() << QStringLiteral("Engine import paths:") << mEngine->importPathList();
// Provide avatars/thumbnails providers. // Provide avatars/thumbnails providers.
mEngine->addImageProvider(AvatarProvider::PROVIDER_ID, new AvatarProvider()); mEngine->addImageProvider(AvatarProvider::PROVIDER_ID, new AvatarProvider());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment