summaryrefslogtreecommitdiff
path: root/src/plugincontainer.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2022-04-28 19:36:39 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2022-05-02 17:04:04 +0200
commitabe926dc1519e7a29769a1a050e80cc5512146a3 (patch)
tree3794c9de48bbc29fa9b2bcaf2ac5f0953c238f4f /src/plugincontainer.h
parent14c6ee4d27b443d271b59d894ac6c06028aa45ff (diff)
Allow Qt plugins in subfolder.
Diffstat (limited to 'src/plugincontainer.h')
-rw-r--r--src/plugincontainer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugincontainer.h b/src/plugincontainer.h
index b250573a..2ab9a4b7 100644
--- a/src/plugincontainer.h
+++ b/src/plugincontainer.h
@@ -396,6 +396,16 @@ private:
// Load the Qt plugin from the given file.
QObject* loadQtPlugin(const QString& filepath);
+ // check if a plugin is folder containing a Qt plugin, it is, return the path to the
+ // DLL containing the plugin in the folder, otherwise return an empty optional
+ //
+ // a Qt plugin folder is a folder with a DLL containing a library (not in a subdirectory),
+ // if multiple plugins are present, only the first one is returned
+ //
+ // extra DLLs are ignored by Qt so can be present in the folder
+ //
+ std::optional<QString> isQtPluginFolder(const QString& filepath) const;
+
// See startPlugins for more details. This is simply an intermediate function
// that can be used when loading plugins after initialization. This uses the
// user interface in m_UserInterface.