Exemple #1
0
    foreach (const QString &fileName, sortedFileNames) {
        QString pluginName = Plugin::name(fileName);
        PluginInfo *pluginInfo = pluginsInfo.value(pluginName);

        if (pluginInfo) {
            // Keep track of the plugin itself, should it be selectable and
            // requested by the user (if we are in GUI mode) or have CLI support
            // (if we are in CLI mode)

            if (   ( pGuiMode && pluginInfo->isSelectable() && Plugin::load(pluginName))
                || (!pGuiMode && pluginInfo->hasCliSupport())) {
                // Keep track of the plugin's dependencies

                neededPlugins << pluginsInfo.value(pluginName)->fullDependencies();

                // Also keep track of the plugin itself

                wantedPlugins << pluginName;
            }
        }
    }