mirror of https://github.com/CGAL/cgal
Fix: a plugin may implement two interfaces
This commit is contained in:
parent
72513db3b0
commit
ae0a88708b
|
|
@ -186,7 +186,9 @@ void MainWindow::loadPlugins()
|
|||
loader.setFileName(pluginsDir.absoluteFilePath(fileName));
|
||||
QObject *obj = loader.instance();
|
||||
if(obj) {
|
||||
if (!initPlugin(obj) && !initIOPlugin(obj))
|
||||
bool init1 = initPlugin(obj);
|
||||
bool init2 = initIOPlugin(obj);
|
||||
if (!init1 && !init2)
|
||||
qdebug << "not for this program";
|
||||
else
|
||||
qdebug << "success";
|
||||
|
|
|
|||
|
|
@ -453,7 +453,9 @@ void MainWindow::loadPlugins()
|
|||
QObject *obj = loader.instance();
|
||||
if(obj) {
|
||||
obj->setObjectName(name);
|
||||
if (!initPlugin(obj) && !initIOPlugin(obj))
|
||||
bool init1 = initPlugin(obj);
|
||||
bool init2 = initIOPlugin(obj);
|
||||
if (!init1 && !init2)
|
||||
qdebug << "not for this program";
|
||||
else
|
||||
qdebug << "success";
|
||||
|
|
|
|||
Loading…
Reference in New Issue