|
|
@ -36,13 +36,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
using namespace Core;
|
|
|
|
using namespace Core;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CorePlugin::CorePlugin()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CorePlugin::~CorePlugin()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Q_FOREACH(QObject *obj, _autoReleaseObjects)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_plugMan->removeObject(obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
qDeleteAll(_autoReleaseObjects);
|
|
|
|
|
|
|
|
_autoReleaseObjects.clear();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CorePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
|
|
|
|
bool CorePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_UNUSED(errorString);
|
|
|
|
Q_UNUSED(errorString);
|
|
|
|
_plugMan = pluginManager;
|
|
|
|
_plugMan = pluginManager;
|
|
|
|
oldOVQT = false;
|
|
|
|
_oldOVQT = false;
|
|
|
|
|
|
|
|
|
|
|
|
_plugMan->addObject(new CSearchPathsSettingsPage(this));
|
|
|
|
addAutoReleasedObject(new CSearchPathsSettingsPage(this));
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -66,7 +80,7 @@ void CorePlugin::extensionsInitialized()
|
|
|
|
|
|
|
|
|
|
|
|
connect(newAction, SIGNAL(triggered()), this, SLOT(execSettings()));
|
|
|
|
connect(newAction, SIGNAL(triggered()), this, SLOT(execSettings()));
|
|
|
|
connect(newAction2, SIGNAL(triggered()), _pluginView, SLOT(show()));
|
|
|
|
connect(newAction2, SIGNAL(triggered()), _pluginView, SLOT(show()));
|
|
|
|
oldOVQT = true;
|
|
|
|
_oldOVQT = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -93,7 +107,7 @@ void CorePlugin::extensionsInitialized()
|
|
|
|
|
|
|
|
|
|
|
|
void CorePlugin::shutdown()
|
|
|
|
void CorePlugin::shutdown()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!oldOVQT)
|
|
|
|
if (!_oldOVQT)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
delete _mainWindow;
|
|
|
|
delete _mainWindow;
|
|
|
|
delete _pluginView;
|
|
|
|
delete _pluginView;
|
|
|
@ -102,7 +116,7 @@ void CorePlugin::shutdown()
|
|
|
|
|
|
|
|
|
|
|
|
void CorePlugin::execSettings()
|
|
|
|
void CorePlugin::execSettings()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CSettingsDialog settingsDialog(_plugMan);
|
|
|
|
CSettingsDialog settingsDialog(this);
|
|
|
|
settingsDialog.show();
|
|
|
|
settingsDialog.show();
|
|
|
|
settingsDialog.execDialog();
|
|
|
|
settingsDialog.execDialog();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -142,6 +156,12 @@ QList<QString> CorePlugin::dependencies() const
|
|
|
|
return QList<QString>();
|
|
|
|
return QList<QString>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CorePlugin::addAutoReleasedObject(QObject *obj)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_plugMan->addObject(obj);
|
|
|
|
|
|
|
|
_autoReleaseObjects.prepend(obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QObject* CorePlugin::objectByName(const QString &name) const
|
|
|
|
QObject* CorePlugin::objectByName(const QString &name) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
|
|
|
|
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
|
|
|
|