Commit cd19a129 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

initialize distributed plugins when adding distributed nodes in the composer

parent db336d5f
......@@ -17,6 +17,10 @@
#include "dtkComposerSettings.h"
#include "dtkComposerDefaultExtensions.h"
#if defined(DTK_BUILD_DISTRIBUTED)
#include <dtkDistributed/dtkDistributed.h>
#endif
namespace dtkComposer {
namespace node {
namespace _private {
......@@ -38,8 +42,13 @@ namespace dtkComposer {
controlExt.extend(&(_private::factory));
dtkComposerConstantsExtension constantsExt;
constantsExt.extend(&(_private::factory));
#if defined(DTK_BUILD_DISTRIBUTED)
bool verbose = dtkComposer::extension::pluginManager().verboseLoading();
dtkDistributed::communicator::setVerboseLoading(verbose);
dtkDistributed::communicator::initialize();
dtkComposerDistributedExtension distributedExt;
distributedExt.extend(&(_private::factory));
#endif
dtkComposerFileExtension fileExt;
fileExt.extend(&(_private::factory));
dtkComposerNumberExtension numberExt;
......
......@@ -106,6 +106,12 @@ namespace dtkDistributed {
{
return _private::manager;
}
void setVerboseLoading(bool verbose)
{
_private::manager.setVerboseLoading(verbose);
}
void initialize(const QString& path)
{
QString real_path = path;
......
......@@ -85,6 +85,7 @@ namespace dtkDistributed {
DTKDISTRIBUTED_EXPORT dtkDistributedCommunicatorPluginFactory& pluginFactory(void);
DTKDISTRIBUTED_EXPORT dtkDistributedCommunicatorPluginManager& pluginManager(void);
DTKDISTRIBUTED_EXPORT void initialize(const QString& path = QString());
DTKDISTRIBUTED_EXPORT void setVerboseLoading(bool verbose);
DTKDISTRIBUTED_EXPORT dtkDistributedCommunicator *instance(void);
}
}
......
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