forked from qt-creator/qt-creator
Fixes: - IActionContainer --> ActionContainer
Details: - Conform to naming convention
This commit is contained in:
@@ -77,10 +77,10 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
|
||||
uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
|
||||
globalcontext << Core::Constants::C_GLOBAL_ID;
|
||||
|
||||
Core::IActionContainer *mtools =
|
||||
Core::ActionContainer *mtools =
|
||||
am->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::IActionContainer *mbm =
|
||||
Core::ActionContainer *mbm =
|
||||
am->createMenu(QLatin1String(BOOKMARKS_MENU));
|
||||
mbm->menu()->setTitle(tr("&Bookmarks"));
|
||||
mtools->addMenu(mbm);
|
||||
|
||||
@@ -51,69 +51,68 @@ using namespace Core;
|
||||
using namespace Core::Internal;
|
||||
|
||||
/*!
|
||||
\class IActionContainer
|
||||
\class ActionContainer
|
||||
\mainclass
|
||||
\inheaderfile iactioncontainer.h
|
||||
|
||||
\brief The IActionContainer class represents a menu or menu bar in Qt Creator.
|
||||
\brief The ActionContainer class represents a menu or menu bar in Qt Creator.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum IActionContainer::ContainerType
|
||||
\enum ActionContainer::ContainerType
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum IActionContainer::EmptyAction
|
||||
\enum ActionContainer::EmptyAction
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual IActionContainer::setEmptyAction(EmptyAction ea)
|
||||
\fn virtual ActionContainer::setEmptyAction(EmptyAction ea)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int IActionContainer::id() const
|
||||
\fn virtual int ActionContainer::id() const
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual ContainerType IActionContainer::type() const
|
||||
\fn virtual ContainerType ActionContainer::type() const
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QMenu *IActionContainer::menu() const
|
||||
\fn virtual QMenu *ActionContainer::menu() const
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QToolBar *IActionContainer::toolBar() const
|
||||
\fn virtual QToolBar *ActionContainer::toolBar() const
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QMenuBar *IActionContainer::menuBar() const
|
||||
\fn virtual QMenuBar *ActionContainer::menuBar() const
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QAction *IActionContainer::insertLocation(const QString &group) const
|
||||
\fn virtual QAction *ActionContainer::insertLocation(const QString &group) const
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual void IActionContainer::appendGroup(const QString &group, bool global)
|
||||
\fn virtual void ActionContainer::appendGroup(const QString &group, bool global)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual void IActionContainer::addAction(Core::ICommand *action, const QString &group)
|
||||
\fn virtual void ActionContainer::addAction(Core::ICommand *action, const QString &group)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual void IActionContainer::addMenu(Core::IActionContainer *menu, const QString &group)
|
||||
\fn virtual void ActionContainer::addMenu(Core::ActionContainer *menu, const QString &group)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool IActionContainer::update()
|
||||
\fn virtual bool ActionContainer::update()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual IActionContainer::~IActionContainer()
|
||||
\fn virtual ActionContainer::~ActionContainer()
|
||||
*/
|
||||
|
||||
// ---------- ActionContainerPrivate ------------
|
||||
@@ -175,7 +174,7 @@ void ActionContainerPrivate::addAction(ICommand *action, const QString &group)
|
||||
if (a->stateFlags() & Command::CS_PreLocation) {
|
||||
QList<CommandLocation> locs = a->locations();
|
||||
for (int i=0; i<locs.size(); ++i) {
|
||||
if (IActionContainer *aci = am->actionContainer(locs.at(i).m_container)) {
|
||||
if (ActionContainer *aci = am->actionContainer(locs.at(i).m_container)) {
|
||||
ActionContainerPrivate *ac = static_cast<ActionContainerPrivate *>(aci);
|
||||
ac->addAction(action, locs.at(i).m_position, false);
|
||||
}
|
||||
@@ -193,7 +192,7 @@ void ActionContainerPrivate::addAction(ICommand *action, const QString &group)
|
||||
}
|
||||
}
|
||||
|
||||
void ActionContainerPrivate::addMenu(IActionContainer *menu, const QString &group)
|
||||
void ActionContainerPrivate::addMenu(ActionContainer *menu, const QString &group)
|
||||
{
|
||||
ActionContainerPrivate *container = static_cast<ActionContainerPrivate *>(menu);
|
||||
if (!container->canBeAddedToMenu())
|
||||
@@ -203,7 +202,7 @@ void ActionContainerPrivate::addMenu(IActionContainer *menu, const QString &grou
|
||||
MenuActionContainer *mc = static_cast<MenuActionContainer *>(menu);
|
||||
if (mc->hasState(ActionContainerPrivate::CS_PreLocation)) {
|
||||
CommandLocation loc = mc->location();
|
||||
if (IActionContainer *aci = am->actionContainer(loc.m_container)) {
|
||||
if (ActionContainer *aci = am->actionContainer(loc.m_container)) {
|
||||
ActionContainerPrivate *ac = static_cast<ActionContainerPrivate *>(aci);
|
||||
ac->addMenu(menu, loc.m_position, false);
|
||||
}
|
||||
@@ -269,7 +268,7 @@ void ActionContainerPrivate::addAction(ICommand *action, int pos, bool setpos)
|
||||
insertAction(ba, a->action());
|
||||
}
|
||||
|
||||
void ActionContainerPrivate::addMenu(IActionContainer *menu, int pos, bool setpos)
|
||||
void ActionContainerPrivate::addMenu(ActionContainer *menu, int pos, bool setpos)
|
||||
{
|
||||
MenuActionContainer *mc = static_cast<MenuActionContainer *>(menu);
|
||||
|
||||
@@ -312,7 +311,7 @@ QAction *ActionContainerPrivate::beforeAction(int pos, int *prevKey) const
|
||||
|
||||
if (ICommand *cmd = am->command(baId))
|
||||
return cmd->action();
|
||||
if (IActionContainer *container = am->actionContainer(baId))
|
||||
if (ActionContainer *container = am->actionContainer(baId))
|
||||
if (QMenu *menu = container->menu())
|
||||
return menu->menuAction();
|
||||
|
||||
@@ -388,7 +387,7 @@ bool MenuActionContainer::update()
|
||||
|
||||
bool hasitems = false;
|
||||
|
||||
foreach (IActionContainer *container, subContainers()) {
|
||||
foreach (ActionContainer *container, subContainers()) {
|
||||
if (container == this) {
|
||||
qWarning() << Q_FUNC_INFO << "container" << (this->menu() ? this->menu()->title() : "") << "contains itself as subcontainer";
|
||||
continue;
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IACTIONCONTAINER_H
|
||||
#define IACTIONCONTAINER_H
|
||||
#ifndef ACTIONCONTAINER_H
|
||||
#define ACTIONCONTAINER_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtGui/QMenu>
|
||||
@@ -44,7 +44,7 @@ namespace Core {
|
||||
|
||||
class ICommand;
|
||||
|
||||
class IActionContainer : public QObject
|
||||
class ActionContainer : public QObject
|
||||
{
|
||||
public:
|
||||
enum EmptyAction {
|
||||
@@ -64,12 +64,12 @@ public:
|
||||
virtual QAction *insertLocation(const QString &group) const = 0;
|
||||
virtual void appendGroup(const QString &group) = 0;
|
||||
virtual void addAction(Core::ICommand *action, const QString &group = QString()) = 0;
|
||||
virtual void addMenu(Core::IActionContainer *menu, const QString &group = QString()) = 0;
|
||||
virtual void addMenu(Core::ActionContainer *menu, const QString &group = QString()) = 0;
|
||||
|
||||
virtual bool update() = 0;
|
||||
virtual ~IActionContainer() {}
|
||||
virtual ~ActionContainer() {}
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // IACTIONCONTAINER_H
|
||||
#endif // ACTIONCONTAINER_H
|
||||
@@ -36,13 +36,13 @@
|
||||
|
||||
#include "actionmanager_p.h"
|
||||
|
||||
#include <coreplugin/actionmanager/iactioncontainer.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/actionmanager/icommand.h>
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
class ActionContainerPrivate : public Core::IActionContainer
|
||||
class ActionContainerPrivate : public Core::ActionContainer
|
||||
{
|
||||
public:
|
||||
enum ContainerState {
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
QAction *insertLocation(const QString &group) const;
|
||||
void appendGroup(const QString &group);
|
||||
void addAction(ICommand *action, const QString &group = QString());
|
||||
void addMenu(IActionContainer *menu, const QString &group = QString());
|
||||
void addMenu(ActionContainer *menu, const QString &group = QString());
|
||||
|
||||
int id() const;
|
||||
|
||||
@@ -75,14 +75,14 @@ public:
|
||||
virtual void insertMenu(QAction *before, QMenu *menu) = 0;
|
||||
|
||||
QList<ICommand *> commands() const { return m_commands; }
|
||||
QList<IActionContainer *> subContainers() const { return m_subContainers; }
|
||||
QList<ActionContainer *> subContainers() const { return m_subContainers; }
|
||||
protected:
|
||||
bool canAddAction(ICommand *action) const;
|
||||
bool canAddMenu(IActionContainer *menu) const;
|
||||
bool canAddMenu(ActionContainer *menu) const;
|
||||
virtual bool canBeAddedToMenu() const = 0;
|
||||
|
||||
void addAction(ICommand *action, int pos, bool setpos);
|
||||
void addMenu(IActionContainer *menu, int pos, bool setpos);
|
||||
void addMenu(ActionContainer *menu, int pos, bool setpos);
|
||||
|
||||
private:
|
||||
QAction *beforeAction(int pos, int *prevKey) const;
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
int m_data;
|
||||
int m_id;
|
||||
QMap<int, int> m_posmap;
|
||||
QList<IActionContainer *> m_subContainers;
|
||||
QList<ActionContainer *> m_subContainers;
|
||||
QList<ICommand *> m_commands;
|
||||
};
|
||||
|
||||
|
||||
@@ -124,28 +124,28 @@ namespace {
|
||||
|
||||
\sa Core::ICore
|
||||
\sa Core::ICommand
|
||||
\sa Core::IActionContainer
|
||||
\sa Core::ActionContainer
|
||||
\sa Core::IContext
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn IActionContainer *ActionManager::createMenu(const QString &id)
|
||||
\fn ActionContainer *ActionManager::createMenu(const QString &id)
|
||||
\brief Creates a new menu with the given string \a id.
|
||||
|
||||
Returns a new IActionContainer that you can use to get the QMenu instance
|
||||
Returns a new ActionContainer that you can use to get the QMenu instance
|
||||
or to add menu items to the menu. The ActionManager owns
|
||||
the returned IActionContainer.
|
||||
the returned ActionContainer.
|
||||
Add your menu to some other menu or a menu bar via the
|
||||
ActionManager::actionContainer and IActionContainer::addMenu methods.
|
||||
ActionManager::actionContainer and ActionContainer::addMenu methods.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn IActionContainer *ActionManager::createMenuBar(const QString &id)
|
||||
\fn ActionContainer *ActionManager::createMenuBar(const QString &id)
|
||||
\brief Creates a new menu bar with the given string \a id.
|
||||
|
||||
Returns a new IActionContainer that you can use to get the QMenuBar instance
|
||||
Returns a new ActionContainer that you can use to get the QMenuBar instance
|
||||
or to add menus to the menu bar. The ActionManager owns
|
||||
the returned IActionContainer.
|
||||
the returned ActionContainer.
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -179,7 +179,7 @@ namespace {
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn IActionContainer *ActionManager::actionContainer(const QString &id) const
|
||||
\fn ActionContainer *ActionManager::actionContainer(const QString &id) const
|
||||
\brief Returns the IActionContainter object that is know to the system
|
||||
under the given string \a id.
|
||||
|
||||
@@ -272,7 +272,7 @@ bool ActionManagerPrivate::hasContext(QList<int> context) const
|
||||
return false;
|
||||
}
|
||||
|
||||
IActionContainer *ActionManagerPrivate::createMenu(const QString &id)
|
||||
ActionContainer *ActionManagerPrivate::createMenu(const QString &id)
|
||||
{
|
||||
const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
||||
const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid);
|
||||
@@ -290,7 +290,7 @@ IActionContainer *ActionManagerPrivate::createMenu(const QString &id)
|
||||
return mc;
|
||||
}
|
||||
|
||||
IActionContainer *ActionManagerPrivate::createMenuBar(const QString &id)
|
||||
ActionContainer *ActionManagerPrivate::createMenuBar(const QString &id)
|
||||
{
|
||||
const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
||||
const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid);
|
||||
@@ -413,7 +413,7 @@ ICommand *ActionManagerPrivate::command(const QString &id) const
|
||||
return it.value();
|
||||
}
|
||||
|
||||
IActionContainer *ActionManagerPrivate::actionContainer(const QString &id) const
|
||||
ActionContainer *ActionManagerPrivate::actionContainer(const QString &id) const
|
||||
{
|
||||
const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
||||
const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid);
|
||||
@@ -436,7 +436,7 @@ ICommand *ActionManagerPrivate::command(int uid) const
|
||||
return it.value();
|
||||
}
|
||||
|
||||
IActionContainer *ActionManagerPrivate::actionContainer(int uid) const
|
||||
ActionContainer *ActionManagerPrivate::actionContainer(int uid) const
|
||||
{
|
||||
const IdContainerMap::const_iterator it = m_idContainerMap.constFind(uid);
|
||||
if (it == m_idContainerMap.constEnd()) {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "coreplugin/core_global.h"
|
||||
|
||||
#include <coreplugin/actionmanager/iactioncontainer.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/actionmanager/icommand.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
@@ -57,14 +57,14 @@ public:
|
||||
ActionManager(QObject *parent = 0) : QObject(parent) {}
|
||||
virtual ~ActionManager() {}
|
||||
|
||||
virtual IActionContainer *createMenu(const QString &id) = 0;
|
||||
virtual IActionContainer *createMenuBar(const QString &id) = 0;
|
||||
virtual ActionContainer *createMenu(const QString &id) = 0;
|
||||
virtual ActionContainer *createMenuBar(const QString &id) = 0;
|
||||
|
||||
virtual ICommand *registerAction(QAction *action, const QString &id, const QList<int> &context) = 0;
|
||||
virtual ICommand *registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0;
|
||||
|
||||
virtual ICommand *command(const QString &id) const = 0;
|
||||
virtual IActionContainer *actionContainer(const QString &id) const = 0;
|
||||
virtual ActionContainer *actionContainer(const QString &id) const = 0;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -80,13 +80,13 @@ public:
|
||||
bool hasContext(int context) const;
|
||||
|
||||
ICommand *command(int uid) const;
|
||||
IActionContainer *actionContainer(int uid) const;
|
||||
ActionContainer *actionContainer(int uid) const;
|
||||
|
||||
void initialize();
|
||||
|
||||
//ActionManager Interface
|
||||
IActionContainer *createMenu(const QString &id);
|
||||
IActionContainer *createMenuBar(const QString &id);
|
||||
ActionContainer *createMenu(const QString &id);
|
||||
ActionContainer *createMenuBar(const QString &id);
|
||||
|
||||
ICommand *registerAction(QAction *action, const QString &id,
|
||||
const QList<int> &context);
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
const QList<int> &context);
|
||||
|
||||
Core::ICommand *command(const QString &id) const;
|
||||
Core::IActionContainer *actionContainer(const QString &id) const;
|
||||
Core::ActionContainer *actionContainer(const QString &id) const;
|
||||
|
||||
private:
|
||||
bool hasContext(QList<int> context) const;
|
||||
|
||||
@@ -98,7 +98,7 @@ HEADERS += mainwindow.h \
|
||||
editormanager/openeditorswindow.h \
|
||||
editormanager/ieditor.h \
|
||||
editormanager/ieditorfactory.h \
|
||||
actionmanager/iactioncontainer.h \
|
||||
actionmanager/actioncontainer.h \
|
||||
actionmanager/actionmanager.h \
|
||||
actionmanager/icommand.h \
|
||||
actionmanager/actionmanager_p.h \
|
||||
|
||||
@@ -208,7 +208,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
|
||||
QList<int>() << m_d->m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER);
|
||||
|
||||
ActionManager *am = m_d->m_core->actionManager();
|
||||
IActionContainer *mfile = am->actionContainer(Constants::M_FILE);
|
||||
ActionContainer *mfile = am->actionContainer(Constants::M_FILE);
|
||||
|
||||
//Revert to saved
|
||||
ICommand *cmd = am->registerAction(m_d->m_revertToSavedAction,
|
||||
@@ -227,7 +227,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
|
||||
connect(m_d->m_saveAsAction, SIGNAL(triggered()), this, SLOT(saveFileAs()));
|
||||
|
||||
//Window Menu
|
||||
IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
|
||||
//Window menu separators
|
||||
QAction *tmpaction = new QAction(this);
|
||||
@@ -315,8 +315,8 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
|
||||
connect(m_d->m_goForwardAction, SIGNAL(triggered()), this, SLOT(goForwardInNavigationHistory()));
|
||||
|
||||
|
||||
IActionContainer *medit = am->actionContainer(Constants::M_EDIT);
|
||||
IActionContainer *advancedMenu = am->createMenu(Constants::M_EDIT_ADVANCED);
|
||||
ActionContainer *medit = am->actionContainer(Constants::M_EDIT);
|
||||
ActionContainer *advancedMenu = am->createMenu(Constants::M_EDIT_ADVANCED);
|
||||
medit->addMenu(advancedMenu, Constants::G_EDIT_FORMAT);
|
||||
advancedMenu->menu()->setTitle(tr("&Advanced"));
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ void EditorSplitter::registerActions()
|
||||
QList<int>() << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER);
|
||||
|
||||
ActionManager *am = m_core->actionManager();
|
||||
IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
ICommand *cmd;
|
||||
|
||||
//Horizontal Action
|
||||
@@ -98,7 +98,7 @@ void EditorSplitter::registerActions()
|
||||
this, SLOT(unsplit()));
|
||||
|
||||
//Default Layout menu
|
||||
IActionContainer *mLayout = am->createMenu("QtCreator.Menu.Window.Layout");
|
||||
ActionContainer *mLayout = am->createMenu("QtCreator.Menu.Window.Layout");
|
||||
mwindow->addMenu(mLayout, Constants::G_WINDOW_SPLIT);
|
||||
mLayout->menu()->setTitle(tr("Default Splitter Layout"));
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "iactioncontainer.h"
|
||||
#include "actioncontainer.h"
|
||||
#include "actionmanager_p.h"
|
||||
#include "basemode.h"
|
||||
#include "coreimpl.h"
|
||||
@@ -365,7 +365,7 @@ void MainWindow::registerDefaultContainers()
|
||||
{
|
||||
ActionManagerPrivate *am = m_actionManager;
|
||||
|
||||
IActionContainer *menubar = am->createMenuBar(Constants::MENU_BAR);
|
||||
ActionContainer *menubar = am->createMenuBar(Constants::MENU_BAR);
|
||||
|
||||
#ifndef Q_WS_MAC // System menu bar on Mac
|
||||
setMenuBar(menubar->menuBar());
|
||||
@@ -378,7 +378,7 @@ void MainWindow::registerDefaultContainers()
|
||||
menubar->appendGroup(Constants::G_HELP);
|
||||
|
||||
//File Menu
|
||||
IActionContainer *filemenu = am->createMenu(Constants::M_FILE);
|
||||
ActionContainer *filemenu = am->createMenu(Constants::M_FILE);
|
||||
menubar->addMenu(filemenu, Constants::G_FILE);
|
||||
filemenu->menu()->setTitle(tr("&File"));
|
||||
filemenu->appendGroup(Constants::G_FILE_NEW);
|
||||
@@ -392,7 +392,7 @@ void MainWindow::registerDefaultContainers()
|
||||
|
||||
|
||||
//Edit Menu
|
||||
IActionContainer *medit = am->createMenu(Constants::M_EDIT);
|
||||
ActionContainer *medit = am->createMenu(Constants::M_EDIT);
|
||||
menubar->addMenu(medit, Constants::G_EDIT);
|
||||
medit->menu()->setTitle(tr("&Edit"));
|
||||
medit->appendGroup(Constants::G_EDIT_UNDOREDO);
|
||||
@@ -403,12 +403,12 @@ void MainWindow::registerDefaultContainers()
|
||||
medit->appendGroup(Constants::G_EDIT_OTHER);
|
||||
|
||||
//Tools Menu
|
||||
IActionContainer *ac = am->createMenu(Constants::M_TOOLS);
|
||||
ActionContainer *ac = am->createMenu(Constants::M_TOOLS);
|
||||
menubar->addMenu(ac, Constants::G_TOOLS);
|
||||
ac->menu()->setTitle(tr("&Tools"));
|
||||
|
||||
//Window Menu
|
||||
IActionContainer *mwindow = am->createMenu(Constants::M_WINDOW);
|
||||
ActionContainer *mwindow = am->createMenu(Constants::M_WINDOW);
|
||||
menubar->addMenu(mwindow, Constants::G_WINDOW);
|
||||
mwindow->menu()->setTitle(tr("&Window"));
|
||||
mwindow->appendGroup(Constants::G_WINDOW_SIZE);
|
||||
@@ -441,12 +441,12 @@ static ICommand *createSeparator(ActionManagerPrivate *am, QObject *parent,
|
||||
void MainWindow::registerDefaultActions()
|
||||
{
|
||||
ActionManagerPrivate *am = m_actionManager;
|
||||
IActionContainer *mfile = am->actionContainer(Constants::M_FILE);
|
||||
IActionContainer *medit = am->actionContainer(Constants::M_EDIT);
|
||||
IActionContainer *mtools = am->actionContainer(Constants::M_TOOLS);
|
||||
IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
ActionContainer *mfile = am->actionContainer(Constants::M_FILE);
|
||||
ActionContainer *medit = am->actionContainer(Constants::M_EDIT);
|
||||
ActionContainer *mtools = am->actionContainer(Constants::M_TOOLS);
|
||||
ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
Q_UNUSED(mwindow)
|
||||
IActionContainer *mhelp = am->actionContainer(Constants::M_HELP);
|
||||
ActionContainer *mhelp = am->actionContainer(Constants::M_HELP);
|
||||
|
||||
// File menu separators
|
||||
ICommand *cmd = createSeparator(am, this, QLatin1String("QtCreator.File.Sep.Save"), m_globalContext);
|
||||
@@ -506,7 +506,7 @@ void MainWindow::registerDefaultActions()
|
||||
connect(m_openWithAction, SIGNAL(triggered()), this, SLOT(openFileWith()));
|
||||
|
||||
//File->Recent Files Menu
|
||||
IActionContainer *ac = am->createMenu(Constants::M_FILE_RECENTFILES);
|
||||
ActionContainer *ac = am->createMenu(Constants::M_FILE_RECENTFILES);
|
||||
mfile->addMenu(ac, Constants::G_FILE_OPEN);
|
||||
ac->menu()->setTitle(tr("Recent Files"));
|
||||
|
||||
@@ -1056,7 +1056,7 @@ void MainWindow::updateContext()
|
||||
|
||||
void MainWindow::aboutToShowRecentFiles()
|
||||
{
|
||||
IActionContainer *aci =
|
||||
ActionContainer *aci =
|
||||
m_actionManager->actionContainer(Constants::M_FILE_RECENTFILES);
|
||||
aci->menu()->clear();
|
||||
m_recentFilesActions.clear();
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "modemanager.h"
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/iactioncontainer.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/editorgroup.h>
|
||||
|
||||
@@ -211,10 +211,10 @@ void OutputPane::init(ICore *core, ExtensionSystem::PluginManager *pm)
|
||||
m_core = core;
|
||||
|
||||
ActionManager *am = m_core->actionManager();
|
||||
IActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
ActionContainer *mwindow = am->actionContainer(Constants::M_WINDOW);
|
||||
|
||||
// Window->Output Panes
|
||||
IActionContainer *mpanes = am->createMenu(Constants::M_WINDOW_PANES);
|
||||
ActionContainer *mpanes = am->createMenu(Constants::M_WINDOW_PANES);
|
||||
mwindow->addMenu(mpanes, Constants::G_WINDOW_PANES);
|
||||
mpanes->menu()->setTitle(tr("Output &Panes"));
|
||||
|
||||
|
||||
@@ -97,10 +97,10 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
|
||||
//register actions
|
||||
Core::ActionManager *actionManager = gCoreInstance->actionManager();
|
||||
|
||||
Core::IActionContainer *toolsContainer =
|
||||
Core::ActionContainer *toolsContainer =
|
||||
actionManager->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::IActionContainer *cpContainer =
|
||||
Core::ActionContainer *cpContainer =
|
||||
actionManager->createMenu(QLatin1String("CodePaster"));
|
||||
cpContainer->menu()->setTitle(tr("&CodePaster"));
|
||||
toolsContainer->addMenu(cpContainer);
|
||||
|
||||
@@ -657,7 +657,7 @@ void CPPEditor::contextMenuEvent(QContextMenuEvent *e)
|
||||
if (lastAction->menu() && QLatin1String(lastAction->menu()->metaObject()->className()) == QLatin1String("QUnicodeControlCharacterMenu"))
|
||||
menu->removeAction(lastAction);
|
||||
|
||||
Core::IActionContainer *mcontext =
|
||||
Core::ActionContainer *mcontext =
|
||||
m_core->actionManager()->actionContainer(CppEditor::Constants::M_CONTEXT);
|
||||
QMenu *contextMenu = mcontext->menu();
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *)
|
||||
addAutoReleasedObject(new CompletionSettingsPage(m_completion));
|
||||
|
||||
// Menus
|
||||
Core::IActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS);
|
||||
Core::IActionContainer *mcpptools = am->createMenu(CppTools::Constants::M_TOOLS_CPP);
|
||||
Core::ActionContainer *mtools = am->actionContainer(Core::Constants::M_TOOLS);
|
||||
Core::ActionContainer *mcpptools = am->createMenu(CppTools::Constants::M_TOOLS_CPP);
|
||||
QMenu *menu = mcpptools->menu();
|
||||
menu->setTitle(tr("&C++"));
|
||||
menu->setEnabled(true);
|
||||
|
||||
@@ -306,10 +306,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
|
||||
connect(m_breakpointMarginAction, SIGNAL(triggered()),
|
||||
this, SLOT(breakpointMarginActionTriggered()));
|
||||
|
||||
//Core::IActionContainer *mcppcontext =
|
||||
//Core::ActionContainer *mcppcontext =
|
||||
// am->actionContainer(CppEditor::Constants::M_CONTEXT);
|
||||
|
||||
Core::IActionContainer *mdebug =
|
||||
Core::ActionContainer *mdebug =
|
||||
am->actionContainer(ProjectExplorer::Constants::M_DEBUG);
|
||||
|
||||
Core::ICommand *cmd = 0;
|
||||
@@ -450,7 +450,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
|
||||
// Views menu
|
||||
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep5"), globalcontext);
|
||||
mdebug->addAction(cmd);
|
||||
IActionContainer *viewsMenu = am->createMenu(Constants::M_DEBUG_VIEWS);
|
||||
ActionContainer *viewsMenu = am->createMenu(Constants::M_DEBUG_VIEWS);
|
||||
QMenu *m = viewsMenu->menu();
|
||||
m->setEnabled(true);
|
||||
m->setTitle(tr("&Views"));
|
||||
|
||||
@@ -100,7 +100,7 @@ static inline QIcon designerIcon(const QString &iconName)
|
||||
static inline QAction *createEditModeAction(QActionGroup *ag,
|
||||
const QList<int> &context,
|
||||
Core::ActionManager *am,
|
||||
Core::IActionContainer *medit,
|
||||
Core::ActionContainer *medit,
|
||||
const QString &actionName,
|
||||
const QString &name,
|
||||
int toolNumber,
|
||||
@@ -126,7 +126,7 @@ static inline QAction *createEditModeAction(QActionGroup *ag,
|
||||
static inline QAction * createSeparator(QObject *parent,
|
||||
Core::ActionManager *am,
|
||||
const QList<int> &context,
|
||||
Core::IActionContainer *container,
|
||||
Core::ActionContainer *container,
|
||||
const QString &name = QString(),
|
||||
const QString &group = QString())
|
||||
{
|
||||
@@ -142,7 +142,7 @@ static inline void addToolAction(QAction *a,
|
||||
Core::ActionManager *am,
|
||||
const QList<int> &context,
|
||||
const QString &name,
|
||||
Core::IActionContainer *c1,
|
||||
Core::ActionContainer *c1,
|
||||
const QString &keySequence = QString())
|
||||
{
|
||||
Core::ICommand *command = am->registerAction(a, name, context);
|
||||
@@ -309,12 +309,12 @@ void FormEditorW::setupActions()
|
||||
Core::ICommand *command;
|
||||
|
||||
//menus
|
||||
Core::IActionContainer *medit =
|
||||
Core::ActionContainer *medit =
|
||||
am->actionContainer(Core::Constants::M_EDIT);
|
||||
Core::IActionContainer *mtools =
|
||||
Core::ActionContainer *mtools =
|
||||
am->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::IActionContainer *mformtools =
|
||||
Core::ActionContainer *mformtools =
|
||||
am->createMenu(M_FORMEDITOR);
|
||||
mformtools->menu()->setTitle(tr("For&m editor"));
|
||||
mtools->addMenu(mformtools);
|
||||
@@ -457,11 +457,11 @@ QToolBar *FormEditorW::createEditorToolBar() const
|
||||
return rc;
|
||||
}
|
||||
|
||||
Core::IActionContainer *FormEditorW::createPreviewStyleMenu(Core::ActionManager *am,
|
||||
Core::ActionContainer *FormEditorW::createPreviewStyleMenu(Core::ActionManager *am,
|
||||
QActionGroup *actionGroup)
|
||||
{
|
||||
const QString menuId = QLatin1String(M_FORMEDITOR_PREVIEW);
|
||||
Core::IActionContainer *menuPreviewStyle = am->createMenu(menuId);
|
||||
Core::ActionContainer *menuPreviewStyle = am->createMenu(menuId);
|
||||
menuPreviewStyle->menu()->setTitle(tr("Preview in"));
|
||||
|
||||
// The preview menu is a list of invisible actions for the embedded design
|
||||
|
||||
@@ -66,7 +66,7 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
class ActionManager;
|
||||
class IActionContainer;
|
||||
class ActionContainer;
|
||||
class ICore;
|
||||
class IEditor;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ private:
|
||||
typedef QList<FormWindowEditor *> EditorList;
|
||||
|
||||
void setupActions();
|
||||
Core::IActionContainer *createPreviewStyleMenu(Core::ActionManager *am,
|
||||
Core::ActionContainer *createPreviewStyleMenu(Core::ActionManager *am,
|
||||
QActionGroup *actionGroup);
|
||||
|
||||
void critical(const QString &errorMessage);
|
||||
|
||||
@@ -170,7 +170,7 @@ bool FakeVimPluginPrivate::initialize(const QStringList &arguments, QString *err
|
||||
Constants::INSTALL_HANDLER, globalcontext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Constants::INSTALL_KEY));
|
||||
|
||||
IActionContainer *advancedMenu =
|
||||
ActionContainer *advancedMenu =
|
||||
actionManager->actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||
advancedMenu->addAction(cmd);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "searchresultwindow.h"
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/iactioncontainer.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/actionmanager/icommand.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
@@ -127,8 +127,8 @@ void FindPlugin::openFindFilter()
|
||||
void FindPlugin::setupMenu()
|
||||
{
|
||||
Core::ActionManager *am = m_core->actionManager();
|
||||
Core::IActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT);
|
||||
Core::IActionContainer *mfind = am->createMenu(Constants::M_FIND);
|
||||
Core::ActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT);
|
||||
Core::ActionContainer *mfind = am->createMenu(Constants::M_FIND);
|
||||
medit->addMenu(mfind, Core::Constants::G_EDIT_FIND);
|
||||
mfind->menu()->setTitle(tr("&Find/Replace"));
|
||||
mfind->appendGroup(Constants::G_FIND_FILTERS);
|
||||
@@ -155,7 +155,7 @@ void FindPlugin::setupFilterMenuItems()
|
||||
Core::ICommand *cmd;
|
||||
QList<int> globalcontext = QList<int>() << Core::Constants::C_GLOBAL_ID;
|
||||
|
||||
Core::IActionContainer *mfind = am->actionContainer(Constants::M_FIND);
|
||||
Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND);
|
||||
m_filterActions.clear();
|
||||
foreach (IFindFilter *filter, findInterfaces) {
|
||||
QAction *action = new QAction(filter->name(), this);
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/iactioncontainer.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/actionmanager/icommand.h>
|
||||
|
||||
#include <QtCore/QSettings>
|
||||
@@ -139,7 +139,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
|
||||
globalcontext << Core::Constants::C_GLOBAL_ID;
|
||||
|
||||
Core::ActionManager *am = ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>()->actionManager();
|
||||
Core::IActionContainer *mfind = am->actionContainer(Constants::M_FIND);
|
||||
Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND);
|
||||
Core::ICommand *cmd;
|
||||
|
||||
m_findInDocumentAction = new QAction(tr("Current Document"), this);
|
||||
|
||||
@@ -265,10 +265,10 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *error_message)
|
||||
//register actions
|
||||
Core::ActionManager *actionManager = m_core->actionManager();
|
||||
|
||||
Core::IActionContainer *toolsContainer =
|
||||
Core::ActionContainer *toolsContainer =
|
||||
actionManager->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::IActionContainer *gitContainer =
|
||||
Core::ActionContainer *gitContainer =
|
||||
actionManager->createMenu(QLatin1String("Git"));
|
||||
gitContainer->menu()->setTitle(tr("&Git"));
|
||||
toolsContainer->addMenu(gitContainer);
|
||||
|
||||
@@ -227,10 +227,10 @@ bool PerforcePlugin::initialize(const QStringList & /*arguments*/, QString *erro
|
||||
//register actions
|
||||
Core::ActionManager *am = m_coreInstance->actionManager();
|
||||
|
||||
Core::IActionContainer *mtools =
|
||||
Core::ActionContainer *mtools =
|
||||
am->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::IActionContainer *mperforce =
|
||||
Core::ActionContainer *mperforce =
|
||||
am->createMenu(QLatin1String(PERFORCE_MENU));
|
||||
mperforce->menu()->setTitle(tr("&Perforce"));
|
||||
mtools->addMenu(mperforce);
|
||||
|
||||
@@ -233,15 +233,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
addAutoReleasedObject(new ProjectFileWizardExtension(m_core));
|
||||
|
||||
// context menus
|
||||
Core::IActionContainer *msessionContextMenu =
|
||||
Core::ActionContainer *msessionContextMenu =
|
||||
am->createMenu(Constants::M_SESSIONCONTEXT);
|
||||
Core::IActionContainer *mproject =
|
||||
Core::ActionContainer *mproject =
|
||||
am->createMenu(Constants::M_PROJECTCONTEXT);
|
||||
Core::IActionContainer *msubProject =
|
||||
Core::ActionContainer *msubProject =
|
||||
am->createMenu(Constants::M_SUBPROJECTCONTEXT);
|
||||
Core::IActionContainer *mfolder =
|
||||
Core::ActionContainer *mfolder =
|
||||
am->createMenu(Constants::M_FOLDERCONTEXT);
|
||||
Core::IActionContainer *mfilec =
|
||||
Core::ActionContainer *mfilec =
|
||||
am->createMenu(Constants::M_FILECONTEXT);
|
||||
|
||||
m_sessionContextMenu = msessionContextMenu->menu();
|
||||
@@ -250,22 +250,22 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
m_folderMenu = mfolder->menu();
|
||||
m_fileMenu = mfilec->menu();
|
||||
|
||||
Core::IActionContainer *mfile =
|
||||
Core::ActionContainer *mfile =
|
||||
am->actionContainer(Core::Constants::M_FILE);
|
||||
Core::IActionContainer *menubar =
|
||||
Core::ActionContainer *menubar =
|
||||
am->actionContainer(Core::Constants::MENU_BAR);
|
||||
|
||||
// mode manager (for fancy actions)
|
||||
Core::ModeManager *modeManager = m_core->modeManager();
|
||||
|
||||
// build menu
|
||||
Core::IActionContainer *mbuild =
|
||||
Core::ActionContainer *mbuild =
|
||||
am->createMenu(Constants::M_BUILDPROJECT);
|
||||
mbuild->menu()->setTitle("&Build");
|
||||
menubar->addMenu(mbuild, Core::Constants::G_VIEW);
|
||||
|
||||
// debug menu
|
||||
Core::IActionContainer *mdebug =
|
||||
Core::ActionContainer *mdebug =
|
||||
am->createMenu(Constants::M_DEBUG);
|
||||
mdebug->menu()->setTitle("&Debug");
|
||||
menubar->addMenu(mdebug, Core::Constants::G_VIEW);
|
||||
@@ -309,7 +309,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
mfilec->appendGroup(Constants::G_FILE_CONFIG);
|
||||
|
||||
// "open with" submenu
|
||||
Core::IActionContainer * const openWith =
|
||||
Core::ActionContainer * const openWith =
|
||||
am->createMenu(ProjectExplorer::Constants::M_OPENFILEWITHCONTEXT);
|
||||
m_openWithMenu = openWith->menu();
|
||||
m_openWithMenu->setTitle(tr("Open With"));
|
||||
@@ -417,7 +417,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
mfilec->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN);
|
||||
|
||||
// recent projects menu
|
||||
Core::IActionContainer *mrecent =
|
||||
Core::ActionContainer *mrecent =
|
||||
am->createMenu(Constants::M_RECENTPROJECTS);
|
||||
mrecent->menu()->setTitle("Recent Projects");
|
||||
mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN);
|
||||
@@ -439,7 +439,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
|
||||
|
||||
// session menu
|
||||
Core::IActionContainer *msession = am->createMenu(Constants::M_SESSION);
|
||||
Core::ActionContainer *msession = am->createMenu(Constants::M_SESSION);
|
||||
msession->menu()->setTitle("&Session");
|
||||
mfile->addMenu(msession, Core::Constants::G_FILE_PROJECT);
|
||||
m_sessionMenu = msession->menu();
|
||||
@@ -447,7 +447,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
this, SLOT(updateSessionMenu()));
|
||||
|
||||
// build menu
|
||||
Core::IActionContainer *mbc =
|
||||
Core::ActionContainer *mbc =
|
||||
am->createMenu(Constants::BUILDCONFIGURATIONMENU);
|
||||
m_buildConfigurationMenu = mbc->menu();
|
||||
m_buildConfigurationMenu->setTitle(tr("Set Build Configuration"));
|
||||
@@ -523,7 +523,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
||||
mbuild->addAction(cmd, Constants::G_BUILD_RUN);
|
||||
mproject->addAction(cmd, Constants::G_PROJECT_RUN);
|
||||
|
||||
Core::IActionContainer *mrc = am->createMenu(Constants::RUNCONFIGURATIONMENU);
|
||||
Core::ActionContainer *mrc = am->createMenu(Constants::RUNCONFIGURATIONMENU);
|
||||
m_runConfigurationMenu = mrc->menu();
|
||||
m_runConfigurationMenu->setTitle(tr("Set Run Configuration"));
|
||||
mbuild->addMenu(mrc, Constants::G_BUILD_RUN);
|
||||
@@ -1472,7 +1472,7 @@ void ProjectExplorerPlugin::updateRecentProjectMenu()
|
||||
if (debug)
|
||||
qDebug() << "ProjectExplorerPlugin::updateRecentProjectMenu";
|
||||
|
||||
Core::IActionContainer *aci =
|
||||
Core::ActionContainer *aci =
|
||||
m_core->actionManager()->actionContainer(Constants::M_RECENTPROJECTS);
|
||||
QMenu *menu = aci->menu();
|
||||
menu->clear();
|
||||
|
||||
@@ -139,9 +139,9 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList & /*arguments*/, QStr
|
||||
//addObject(m_embeddedPropertiesPage);
|
||||
|
||||
//menus
|
||||
Core::IActionContainer *mbuild =
|
||||
Core::ActionContainer *mbuild =
|
||||
am->actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
|
||||
Core::IActionContainer *mproject =
|
||||
Core::ActionContainer *mproject =
|
||||
am->actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT);
|
||||
|
||||
//register actions
|
||||
|
||||
@@ -157,7 +157,7 @@ void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
|
||||
{
|
||||
QMenu *menu = createStandardContextMenu();
|
||||
|
||||
if (Core::IActionContainer *mcontext = m_core->actionManager()->actionContainer(QtScriptEditor::Constants::M_CONTEXT)) {
|
||||
if (Core::ActionContainer *mcontext = m_core->actionManager()->actionContainer(QtScriptEditor::Constants::M_CONTEXT)) {
|
||||
QMenu *contextMenu = mcontext->menu();
|
||||
foreach (QAction *action, contextMenu->actions())
|
||||
menu->addAction(action);
|
||||
|
||||
@@ -132,7 +132,7 @@ void QtScriptEditorPlugin::initializeEditor(QtScriptEditor::Internal::ScriptEdit
|
||||
void QtScriptEditorPlugin::registerActions(Core::ICore *core)
|
||||
{
|
||||
Core::ActionManager *am = core->actionManager();
|
||||
Core::IActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT);
|
||||
Core::ActionContainer *mcontext = am->createMenu(QtScriptEditor::Constants::M_CONTEXT);
|
||||
|
||||
QAction *action = new QAction(this);
|
||||
action->setSeparator(true);
|
||||
|
||||
@@ -100,7 +100,7 @@ bool QuickOpenPlugin::initialize(const QStringList &, QString *)
|
||||
cmd->setDefaultKeySequence(QKeySequence("Ctrl+K"));
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(openQuickOpen()));
|
||||
|
||||
Core::IActionContainer *mtools = core->actionManager()->actionContainer(Core::Constants::M_TOOLS);
|
||||
Core::ActionContainer *mtools = core->actionManager()->actionContainer(Core::Constants::M_TOOLS);
|
||||
mtools->addAction(cmd);
|
||||
|
||||
addObject(new QuickOpenManager(m_quickOpenToolWindow));
|
||||
|
||||
@@ -290,9 +290,9 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments*/, QString *er
|
||||
|
||||
//register actions
|
||||
Core::ActionManager *ami = m_coreInstance->actionManager();
|
||||
Core::IActionContainer *toolsContainer = ami->actionContainer(M_TOOLS);
|
||||
Core::ActionContainer *toolsContainer = ami->actionContainer(M_TOOLS);
|
||||
|
||||
Core::IActionContainer *subversionMenu =
|
||||
Core::ActionContainer *subversionMenu =
|
||||
ami->createMenu(QLatin1String(SUBVERSION_MENU));
|
||||
subversionMenu->menu()->setTitle(tr("&Subversion"));
|
||||
toolsContainer->addMenu(subversionMenu);
|
||||
|
||||
@@ -113,8 +113,8 @@ void TextEditorActionHandler::createActions()
|
||||
|
||||
Core::ActionManager *am = m_core->actionManager();
|
||||
|
||||
Core::IActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT);
|
||||
Core::IActionContainer *advancedMenu = am->actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||
Core::ActionContainer *medit = am->actionContainer(Core::Constants::M_EDIT);
|
||||
Core::ActionContainer *advancedMenu = am->actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||
|
||||
m_selectEncodingAction = new QAction(tr("Select Encoding..."), this);
|
||||
Core::ICommand *command = am->registerAction(m_selectEncodingAction, Constants::SELECT_ENCODING, m_contextId);
|
||||
|
||||
Reference in New Issue
Block a user