forked from qt-creator/qt-creator
Cleanup baremetal
The cleanup goes by the comments found in https://codereview.qt-project.org/#change,65366,patchset=6 It removes code and comments identified as unneeded. It also further minimizes the impact on code outside the plugin dir. Change-Id: I22bfe9654d0fb6e0bb8f0018ecbe326cda804223 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
6e9985a7a2
commit
6506b2e196
@@ -32,8 +32,6 @@
|
||||
#include "baremetaldeviceconfigurationfactory.h"
|
||||
#include "baremetalruncontrolfactory.h"
|
||||
#include "baremetalrunconfigurationfactory.h"
|
||||
#include "baremetaldeployconfigurationfactory.h"
|
||||
#include "baremetaldeploystepfactory.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
@@ -53,74 +51,25 @@ namespace Internal {
|
||||
|
||||
BareMetalPlugin::BareMetalPlugin()
|
||||
{
|
||||
// Create your members
|
||||
setObjectName(QLatin1String("BareMetalPlugin"));
|
||||
}
|
||||
|
||||
BareMetalPlugin::~BareMetalPlugin()
|
||||
{
|
||||
// Unregister objects from the plugin manager's object pool
|
||||
// Delete members
|
||||
}
|
||||
|
||||
bool BareMetalPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
// Register objects in the plugin manager's object pool
|
||||
// Load settings
|
||||
// Add actions to menus
|
||||
// Connect to other plugins' signals
|
||||
// In the initialize method, a plugin can be sure that the plugins it
|
||||
// depends on have initialized their members.
|
||||
|
||||
Q_UNUSED(arguments)
|
||||
Q_UNUSED(errorString)
|
||||
|
||||
addAutoReleasedObject(new BareMetalDeviceConfigurationFactory);
|
||||
addAutoReleasedObject(new BareMetalRunControlFactory);
|
||||
addAutoReleasedObject(new BareMetalRunConfigurationFactory);
|
||||
addAutoReleasedObject(new BareMetalDeployConfigurationFactory);
|
||||
//addAutoReleasedObject(new BareMetalDeployStepFactory);
|
||||
|
||||
/*
|
||||
QAction *action = new QAction(tr("BareMetal action"), this);
|
||||
Core::Command *cmd = Core::ActionManager::registerAction(action, Constants::ACTION_ID,
|
||||
Core::Context(Core::Constants::C_GLOBAL));
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Meta+A")));
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(triggerAction()));
|
||||
|
||||
Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID);
|
||||
menu->menu()->setTitle(tr("BareMetal"));
|
||||
menu->addAction(cmd);
|
||||
Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BareMetalPlugin::extensionsInitialized()
|
||||
{
|
||||
// Retrieve objects from the plugin manager's object pool
|
||||
// In the extensionsInitialized method, a plugin can be sure that all
|
||||
// plugins that depend on it are completely initialized.
|
||||
}
|
||||
|
||||
/*
|
||||
ExtensionSystem::IPlugin::ShutdownFlag BareMetalPlugin::aboutToShutdown()
|
||||
{
|
||||
// Save settings
|
||||
// Disconnect from signals that are not needed during shutdown
|
||||
// Hide UI (if you add UI that is not in the main window directly)
|
||||
return SynchronousShutdown;
|
||||
}
|
||||
|
||||
void BareMetalPlugin::triggerAction()
|
||||
{
|
||||
QMessageBox::information(Core::ICore::mainWindow(),
|
||||
tr("Action triggered"),
|
||||
tr("This is an action from BareMetal."));
|
||||
}
|
||||
*/
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace BareMetal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user