From 0581219acb74c2354775bccc683e15947f22466a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 11 May 2011 12:50:53 +0200 Subject: [PATCH] pluginhowto: compile fix --- .../menu/addingmenu/donothingplugin.cpp | 15 +++++---------- .../menu/addingmenu/donothingplugin.h | 2 +- .../menu/placingmenu/donothingplugin.cpp | 19 +++++++------------ .../menu/placingmenu/donothingplugin.h | 2 +- .../registeringmenuitem/donothingplugin.cpp | 19 +++++++------------ .../registeringmenuitem/donothingplugin.h | 2 +- .../respondingtomenuitems/donothingplugin.cpp | 15 +++++---------- .../respondingtomenuitems/donothingplugin.h | 2 +- 8 files changed, 28 insertions(+), 48 deletions(-) diff --git a/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.cpp b/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.cpp index e1a029865db..32e1ff267e2 100644 --- a/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.cpp +++ b/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.cpp @@ -57,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin() // Do nothing } -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - void DoNothingPlugin::extensionsInitialized() { // Do nothing } -bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) +bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage) { Q_UNUSED(args); - Q_UNUSED(errMsg); + Q_UNUSED(errorMessage); // Fetch the action manager Core::ActionManager *am = Core::ICore::instance()->actionManager(); @@ -82,11 +77,11 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) // Create a command for "DoNothing". QAction *action = new QAction(tr("DoNothing"),this); Core::Command *cmd = am->registerAction(action, - QLatin1String("DoNothingPlugin.DoNothing"), - Core::Context(Core::Constants::C_GLOBAL)); + "DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL)); // 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 ac->addAction(cmd); diff --git a/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.h b/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.h index 0c8944d674d..03aeb75def0 100644 --- a/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.h +++ b/doc/pluginhowto/examples/menu/addingmenu/donothingplugin.h @@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin public: DoNothingPlugin(); - ~DoNothingPlugin(); + void extensionsInitialized(); bool initialize(const QStringList &arguments, QString *errorString); ShutdownFlag shutdown(); diff --git a/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.cpp b/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.cpp index 526b7cd5c51..33b357b4132 100644 --- a/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.cpp +++ b/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.cpp @@ -37,6 +37,7 @@ ****************************************************************************/ #include "donothingplugin.h" + #include #include #include @@ -44,11 +45,11 @@ #include #include -#include -#include -#include #include +#include #include +#include +#include #include DoNothingPlugin::DoNothingPlugin() @@ -56,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin() // Do nothing } -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - void DoNothingPlugin::extensionsInitialized() { // Do nothing } -bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) +bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage) { Q_UNUSED(args); - Q_UNUSED(errMsg); + Q_UNUSED(errorMessage); // Fetch the action manager Core::ActionManager *am = Core::ICore::instance()->actionManager(); @@ -77,8 +73,7 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) // Create a command for "DoNothing". QAction *action = new QAction(tr("DoNothing"),this); Core::Command *cmd = am->registerAction(action, - QLatin1String("DoNothingPlugin.DoNothing"), - Core::Context(Core::Constants::C_GLOBAL)); + "DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL)); // Add the "DoNothing" action to the tools menu am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd, Core::Constants::G_DEFAULT_THREE); diff --git a/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.h b/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.h index cfb7443c315..1e193573035 100644 --- a/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.h +++ b/doc/pluginhowto/examples/menu/placingmenu/donothingplugin.h @@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin public: DoNothingPlugin(); - ~DoNothingPlugin(); + void extensionsInitialized(); bool initialize(const QStringList &arguments, QString *errorString); ShutdownFlag shutdown(); diff --git a/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.cpp b/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.cpp index b3d22f42fb1..219daa93be9 100644 --- a/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.cpp +++ b/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.cpp @@ -37,6 +37,7 @@ ****************************************************************************/ #include "donothingplugin.h" + #include #include #include @@ -44,11 +45,11 @@ #include #include -#include -#include -#include #include +#include #include +#include +#include #include DoNothingPlugin::DoNothingPlugin() @@ -56,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin() // Do nothing } -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - void DoNothingPlugin::extensionsInitialized() { // Do nothing } -bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) +bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage) { Q_UNUSED(args); - Q_UNUSED(errMsg); + Q_UNUSED(errorMessage); // Fetch the action manager Core::ActionManager *am = Core::ICore::instance()->actionManager(); @@ -77,8 +73,7 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) // Create a command for "DoNothing". QAction *action = new QAction(tr("DoNothing"),this); Core::Command* cmd = am->registerAction(action, - QLatin1String("DoNothingPlugin.DoNothing"), - Core::Context(Core::Constants::C_GLOBAL)); + "DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL)); // Add the "DoNothing" action to the tools menu am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd); diff --git a/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.h b/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.h index cfb7443c315..1e193573035 100644 --- a/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.h +++ b/doc/pluginhowto/examples/menu/registeringmenuitem/donothingplugin.h @@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin public: DoNothingPlugin(); - ~DoNothingPlugin(); + void extensionsInitialized(); bool initialize(const QStringList &arguments, QString *errorString); ShutdownFlag shutdown(); diff --git a/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.cpp b/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.cpp index 77ea0367c42..75429c6be9c 100644 --- a/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.cpp +++ b/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.cpp @@ -57,20 +57,15 @@ DoNothingPlugin::DoNothingPlugin() // Do nothing } -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - void DoNothingPlugin::extensionsInitialized() { // Do nothing } -bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) +bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage) { Q_UNUSED(args); - Q_UNUSED(errMsg); + Q_UNUSED(errorMessage); // Fetch the action manager Core::ActionManager *am = Core::ICore::instance()->actionManager(); @@ -78,11 +73,11 @@ bool DoNothingPlugin::initialize(const QStringList &args, QString *errMsg) // Create a command for "DoNothing". QAction *action = new QAction(tr("DoNothing"),this); Core::Command *cmd = am->registerAction(action, - QLatin1String("DoNothingPlugin.DoNothing"), - Core::Context(Core::Constants::C_GLOBAL)); + "DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL)); // 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(action, SIGNAL(triggered(bool)), this, SLOT(performAction())); diff --git a/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.h b/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.h index 0c8944d674d..03aeb75def0 100644 --- a/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.h +++ b/doc/pluginhowto/examples/menu/respondingtomenuitems/donothingplugin.h @@ -47,7 +47,7 @@ class DoNothingPlugin : public ExtensionSystem::IPlugin public: DoNothingPlugin(); - ~DoNothingPlugin(); + void extensionsInitialized(); bool initialize(const QStringList &arguments, QString *errorString); ShutdownFlag shutdown();