Commit a5953b6c authored by Jan Möbius's avatar Jan Möbius

Initialize file file plugins after the call to their initialize function

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6286 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 34644b2c
......@@ -514,21 +514,6 @@ void Core::loadPlugin(QString filename, bool silent){
this, SLOT(slotSetSlotDescription(QString,QString,QStringList,QStringList)) );
}
//Check if its a filePlugin
FileInterface* filePlugin = qobject_cast< FileInterface * >(plugin);
if ( filePlugin ){
supported = supported + "File ";
// Collect supported Data from file plugin
fileTypes ft;
ft.type = filePlugin->supportedType();
ft.loadFilters = filePlugin->getLoadFilters();
ft.saveFilters = filePlugin->getSaveFilters();
ft.plugin = filePlugin;
supportedTypes_.push_back(ft);
}
GlobalAccessInterface* globalAccessPlugin = qobject_cast< GlobalAccessInterface * >(plugin);
if ( globalAccessPlugin && OpenFlipper::Options::gui() ) {
supported = supported + "!!GLOBAL ACCESS!! ";
......@@ -1109,6 +1094,21 @@ void Core::loadPlugin(QString filename, bool silent){
QMetaObject::invokeMethod(plugin, "initializePlugin", Qt::DirectConnection);
}
//Check if its a filePlugin
FileInterface* filePlugin = qobject_cast< FileInterface * >(plugin);
if ( filePlugin ){
supported = supported + "File ";
// Collect supported Data from file plugin
fileTypes ft;
ft.type = filePlugin->supportedType();
ft.loadFilters = filePlugin->getLoadFilters();
ft.saveFilters = filePlugin->getSaveFilters();
ft.plugin = filePlugin;
supportedTypes_.push_back(ft);
}
emit log(LOGOUT,"=============================================================================================");
} else {
emit log(LOGERR,"Unable to load Plugin :\t " + filename );
......
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