forked from qt-creator/qt-creator
pluginhowto: compile fix
This commit is contained in:
@@ -57,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
DoNothingPlugin::~DoNothingPlugin()
|
|
||||||
{
|
|
||||||
// Do notning
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoNothingPlugin::extensionsInitialized()
|
void DoNothingPlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(args);
|
Q_UNUSED(args);
|
||||||
Q_UNUSED(errMsg);
|
Q_UNUSED(errorMessage);
|
||||||
|
|
||||||
// Fetch the action manager
|
// Fetch the action manager
|
||||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||||
@@ -82,11 +77,11 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
|||||||
// Create a command for "DoNothing".
|
// Create a command for "DoNothing".
|
||||||
QAction *action = new QAction(tr("DoNothing"),this);
|
QAction *action = new QAction(tr("DoNothing"),this);
|
||||||
Core::Command *cmd = am->registerAction(action,
|
Core::Command *cmd = am->registerAction(action,
|
||||||
QLatin1String("DoNothingPlugin.DoNothing"),
|
"DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL));
|
||||||
Core::Context(Core::Constants::C_GLOBAL));
|
|
||||||
|
|
||||||
// Add DoNothing menu to the menubar
|
// Add DoNothing menu to the menubar
|
||||||
am->actionContainer(Core::Constants::M_TOOLS)->addMenu(ac, Core::Constants::G_DEFAULT_THREE);
|
am->actionContainer(Core::Constants::M_TOOLS)
|
||||||
|
->addMenu(ac, Core::Constants::G_DEFAULT_THREE);
|
||||||
|
|
||||||
// Add the "DoNothing" action to the DoNothing menu
|
// Add the "DoNothing" action to the DoNothing menu
|
||||||
ac->addAction(cmd);
|
ac->addAction(cmd);
|
||||||
|
@@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DoNothingPlugin();
|
DoNothingPlugin();
|
||||||
~DoNothingPlugin();
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
bool initialize(const QStringList &arguments, QString *errorString);
|
bool initialize(const QStringList &arguments, QString *errorString);
|
||||||
ShutdownFlag shutdown();
|
ShutdownFlag shutdown();
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "donothingplugin.h"
|
#include "donothingplugin.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/actionmanager/command.h>
|
#include <coreplugin/actionmanager/command.h>
|
||||||
@@ -44,11 +45,11 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
|
|
||||||
#include <QKeySequence>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
#include <QKeySequence>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QStringList>
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
DoNothingPlugin::DoNothingPlugin()
|
DoNothingPlugin::DoNothingPlugin()
|
||||||
@@ -56,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
DoNothingPlugin::~DoNothingPlugin()
|
|
||||||
{
|
|
||||||
// Do notning
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoNothingPlugin::extensionsInitialized()
|
void DoNothingPlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(args);
|
Q_UNUSED(args);
|
||||||
Q_UNUSED(errMsg);
|
Q_UNUSED(errorMessage);
|
||||||
|
|
||||||
// Fetch the action manager
|
// Fetch the action manager
|
||||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||||
@@ -77,8 +73,7 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
|||||||
// Create a command for "DoNothing".
|
// Create a command for "DoNothing".
|
||||||
QAction *action = new QAction(tr("DoNothing"),this);
|
QAction *action = new QAction(tr("DoNothing"),this);
|
||||||
Core::Command *cmd = am->registerAction(action,
|
Core::Command *cmd = am->registerAction(action,
|
||||||
QLatin1String("DoNothingPlugin.DoNothing"),
|
"DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL));
|
||||||
Core::Context(Core::Constants::C_GLOBAL));
|
|
||||||
|
|
||||||
// Add the "DoNothing" action to the tools menu
|
// Add the "DoNothing" action to the tools menu
|
||||||
am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||||
|
@@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DoNothingPlugin();
|
DoNothingPlugin();
|
||||||
~DoNothingPlugin();
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
bool initialize(const QStringList &arguments, QString *errorString);
|
bool initialize(const QStringList &arguments, QString *errorString);
|
||||||
ShutdownFlag shutdown();
|
ShutdownFlag shutdown();
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "donothingplugin.h"
|
#include "donothingplugin.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/actionmanager/command.h>
|
#include <coreplugin/actionmanager/command.h>
|
||||||
@@ -44,11 +45,11 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
|
|
||||||
#include <QKeySequence>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
#include <QKeySequence>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QStringList>
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
DoNothingPlugin::DoNothingPlugin()
|
DoNothingPlugin::DoNothingPlugin()
|
||||||
@@ -56,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
DoNothingPlugin::~DoNothingPlugin()
|
|
||||||
{
|
|
||||||
// Do notning
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoNothingPlugin::extensionsInitialized()
|
void DoNothingPlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(args);
|
Q_UNUSED(args);
|
||||||
Q_UNUSED(errMsg);
|
Q_UNUSED(errorMessage);
|
||||||
|
|
||||||
// Fetch the action manager
|
// Fetch the action manager
|
||||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||||
@@ -77,8 +73,7 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
|||||||
// Create a command for "DoNothing".
|
// Create a command for "DoNothing".
|
||||||
QAction *action = new QAction(tr("DoNothing"),this);
|
QAction *action = new QAction(tr("DoNothing"),this);
|
||||||
Core::Command* cmd = am->registerAction(action,
|
Core::Command* cmd = am->registerAction(action,
|
||||||
QLatin1String("DoNothingPlugin.DoNothing"),
|
"DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL));
|
||||||
Core::Context(Core::Constants::C_GLOBAL));
|
|
||||||
|
|
||||||
// Add the "DoNothing" action to the tools menu
|
// Add the "DoNothing" action to the tools menu
|
||||||
am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd);
|
am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd);
|
||||||
|
@@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DoNothingPlugin();
|
DoNothingPlugin();
|
||||||
~DoNothingPlugin();
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
bool initialize(const QStringList &arguments, QString *errorString);
|
bool initialize(const QStringList &arguments, QString *errorString);
|
||||||
ShutdownFlag shutdown();
|
ShutdownFlag shutdown();
|
||||||
|
@@ -57,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
DoNothingPlugin::~DoNothingPlugin()
|
|
||||||
{
|
|
||||||
// Do notning
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoNothingPlugin::extensionsInitialized()
|
void DoNothingPlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(args);
|
Q_UNUSED(args);
|
||||||
Q_UNUSED(errMsg);
|
Q_UNUSED(errorMessage);
|
||||||
|
|
||||||
// Fetch the action manager
|
// Fetch the action manager
|
||||||
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
Core::ActionManager *am = Core::ICore::instance()->actionManager();
|
||||||
@@ -78,11 +73,11 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg)
|
|||||||
// Create a command for "DoNothing".
|
// Create a command for "DoNothing".
|
||||||
QAction *action = new QAction(tr("DoNothing"),this);
|
QAction *action = new QAction(tr("DoNothing"),this);
|
||||||
Core::Command *cmd = am->registerAction(action,
|
Core::Command *cmd = am->registerAction(action,
|
||||||
QLatin1String("DoNothingPlugin.DoNothing"),
|
"DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL));
|
||||||
Core::Context(Core::Constants::C_GLOBAL));
|
|
||||||
|
|
||||||
// Add the "DoNothing" action to the tools menu
|
// Add the "DoNothing" action to the tools menu
|
||||||
am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
am->actionContainer(Core::Constants::M_TOOLS)
|
||||||
|
->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||||
|
|
||||||
// Connect the action
|
// Connect the action
|
||||||
connect(action, SIGNAL(triggered(bool)), this, SLOT(performAction()));
|
connect(action, SIGNAL(triggered(bool)), this, SLOT(performAction()));
|
||||||
|
@@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DoNothingPlugin();
|
DoNothingPlugin();
|
||||||
~DoNothingPlugin();
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
bool initialize(const QStringList &arguments, QString *errorString);
|
bool initialize(const QStringList &arguments, QString *errorString);
|
||||||
ShutdownFlag shutdown();
|
ShutdownFlag shutdown();
|
||||||
|
Reference in New Issue
Block a user