Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
1e4c48a1
Commit
1e4c48a1
authored
Jan 14, 2009
by
con
Browse files
Fixes: - IActionContainer --> ActionContainer
Details: - Conform to naming convention
parent
28acadf8
Changes
30
Hide whitespace changes
Inline
Side-by-side
src/plugins/bookmarks/bookmarksplugin.cpp
View file @
1e4c48a1
...
...
@@ -77,10 +77,10 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
uniqueIdentifier
(
TextEditor
::
Constants
::
C_TEXTEDITOR
);
globalcontext
<<
Core
::
Constants
::
C_GLOBAL_ID
;
Core
::
I
ActionContainer
*
mtools
=
Core
::
ActionContainer
*
mtools
=
am
->
actionContainer
(
Core
::
Constants
::
M_TOOLS
);
Core
::
I
ActionContainer
*
mbm
=
Core
::
ActionContainer
*
mbm
=
am
->
createMenu
(
QLatin1String
(
BOOKMARKS_MENU
));
mbm
->
menu
()
->
setTitle
(
tr
(
"&Bookmarks"
));
mtools
->
addMenu
(
mbm
);
...
...
src/plugins/coreplugin/actionmanager/actioncontainer.cpp
View file @
1e4c48a1
...
...
@@ -51,69 +51,68 @@ using namespace Core;
using
namespace
Core
::
Internal
;
/*!
\class
I
ActionContainer
\class ActionContainer
\mainclass
\inheaderfile iactioncontainer.h
\brief The
I
ActionContainer class represents a menu or menu bar in Qt Creator.
\brief The ActionContainer class represents a menu or menu bar in Qt Creator.
*/
/*!
\enum
I
ActionContainer::ContainerType
\enum ActionContainer::ContainerType
*/
/*!
\enum
I
ActionContainer::EmptyAction
\enum ActionContainer::EmptyAction
*/
/*!
\fn virtual
I
ActionContainer::setEmptyAction(EmptyAction ea)
\fn virtual ActionContainer::setEmptyAction(EmptyAction ea)
*/
/*!
\fn virtual int
I
ActionContainer::id() const
\fn virtual int ActionContainer::id() const
*/
/*!
\fn virtual ContainerType
I
ActionContainer::type() const
\fn virtual ContainerType ActionContainer::type() const
*/
/*!
\fn virtual QMenu *
I
ActionContainer::menu() const
\fn virtual QMenu *ActionContainer::menu() const
*/
/*!
\fn virtual QToolBar *
I
ActionContainer::toolBar() const
\fn virtual QToolBar *ActionContainer::toolBar() const
*/
/*!
\fn virtual QMenuBar *
I
ActionContainer::menuBar() const
\fn virtual QMenuBar *ActionContainer::menuBar() const
*/
/*!
\fn virtual QAction *
I
ActionContainer::insertLocation(const QString &group) const
\fn virtual QAction *ActionContainer::insertLocation(const QString &group) const
*/
/*!
\fn virtual void
I
ActionContainer::appendGroup(const QString &group, bool global)
\fn virtual void ActionContainer::appendGroup(const QString &group, bool global)
*/
/*!
\fn virtual void
I
ActionContainer::addAction(Core::ICommand *action, const QString &group)
\fn virtual void ActionContainer::addAction(Core::ICommand *action, const QString &group)
*/
/*!
\fn virtual void
I
ActionContainer::addMenu(Core::
I
ActionContainer *menu, const QString &group)
\fn virtual void ActionContainer::addMenu(Core::ActionContainer *menu, const QString &group)
*/
/*!
\fn virtual bool
I
ActionContainer::update()
\fn virtual bool ActionContainer::update()
*/
/*!
\fn virtual
I
ActionContainer::~
I
ActionContainer()
\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
(
I
ActionContainer
*
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
(
I
ActionContainer
*
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
(
I
ActionContainer
*
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
(
I
ActionContainer
*
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
(
I
ActionContainer
*
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
(
I
ActionContainer
*
container
,
subContainers
())
{
foreach
(
ActionContainer
*
container
,
subContainers
())
{
if
(
container
==
this
)
{
qWarning
()
<<
Q_FUNC_INFO
<<
"container"
<<
(
this
->
menu
()
?
this
->
menu
()
->
title
()
:
""
)
<<
"contains itself as subcontainer"
;
continue
;
...
...
src/plugins/coreplugin/actionmanager/
i
actioncontainer.h
→
src/plugins/coreplugin/actionmanager/actioncontainer.h
View file @
1e4c48a1
...
...
@@ -31,8 +31,8 @@
**
***************************************************************************/
#ifndef
I
ACTIONCONTAINER_H
#define
I
ACTIONCONTAINER_H
#ifndef ACTIONCONTAINER_H
#define ACTIONCONTAINER_H
#include <QtCore/QObject>
#include <QtGui/QMenu>
...
...
@@ -44,7 +44,7 @@ namespace Core {
class
ICommand
;
class
I
ActionContainer
:
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
::
I
ActionContainer
*
menu
,
const
QString
&
group
=
QString
())
=
0
;
virtual
void
addMenu
(
Core
::
ActionContainer
*
menu
,
const
QString
&
group
=
QString
())
=
0
;
virtual
bool
update
()
=
0
;
virtual
~
I
ActionContainer
()
{}
virtual
~
ActionContainer
()
{}
};
}
// namespace Core
#endif //
I
ACTIONCONTAINER_H
#endif // ACTIONCONTAINER_H
src/plugins/coreplugin/actionmanager/actioncontainer_p.h
View file @
1e4c48a1
...
...
@@ -36,13 +36,13 @@
#include "actionmanager_p.h"
#include <coreplugin/actionmanager/
i
actioncontainer.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/icommand.h>
namespace
Core
{
namespace
Internal
{
class
ActionContainerPrivate
:
public
Core
::
I
ActionContainer
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
(
I
ActionContainer
*
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
<
I
ActionContainer
*>
subContainers
()
const
{
return
m_subContainers
;
}
QList
<
ActionContainer
*>
subContainers
()
const
{
return
m_subContainers
;
}
protected:
bool
canAddAction
(
ICommand
*
action
)
const
;
bool
canAddMenu
(
I
ActionContainer
*
menu
)
const
;
bool
canAddMenu
(
ActionContainer
*
menu
)
const
;
virtual
bool
canBeAddedToMenu
()
const
=
0
;
void
addAction
(
ICommand
*
action
,
int
pos
,
bool
setpos
);
void
addMenu
(
I
ActionContainer
*
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
<
I
ActionContainer
*>
m_subContainers
;
QList
<
ActionContainer
*>
m_subContainers
;
QList
<
ICommand
*>
m_commands
;
};
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
1e4c48a1
...
...
@@ -124,28 +124,28 @@ namespace {
\sa Core::ICore
\sa Core::ICommand
\sa Core::
I
ActionContainer
\sa Core::ActionContainer
\sa Core::IContext
*/
/*!
\fn
I
ActionContainer *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
I
ActionContainer 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
I
ActionContainer.
the returned ActionContainer.
Add your menu to some other menu or a menu bar via the
ActionManager::actionContainer and
I
ActionContainer::addMenu methods.
ActionManager::actionContainer and ActionContainer::addMenu methods.
*/
/*!
\fn
I
ActionContainer *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
I
ActionContainer 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
I
ActionContainer.
the returned ActionContainer.
*/
/*!
...
...
@@ -179,7 +179,7 @@ namespace {
*/
/*!
\fn
I
ActionContainer *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
;
}
I
ActionContainer
*
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
;
}
I
ActionContainer
*
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
();
}
I
ActionContainer
*
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
();
}
I
ActionContainer
*
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
())
{
...
...
src/plugins/coreplugin/actionmanager/actionmanager.h
View file @
1e4c48a1
...
...
@@ -36,7 +36,7 @@
#include "coreplugin/core_global.h"
#include <coreplugin/actionmanager/
i
actioncontainer.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
I
ActionContainer
*
createMenu
(
const
QString
&
id
)
=
0
;
virtual
I
ActionContainer
*
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
I
ActionContainer
*
actionContainer
(
const
QString
&
id
)
const
=
0
;
virtual
ActionContainer
*
actionContainer
(
const
QString
&
id
)
const
=
0
;
};
}
// namespace Core
...
...
src/plugins/coreplugin/actionmanager/actionmanager_p.h
View file @
1e4c48a1
...
...
@@ -80,13 +80,13 @@ public:
bool
hasContext
(
int
context
)
const
;
ICommand
*
command
(
int
uid
)
const
;
I
ActionContainer
*
actionContainer
(
int
uid
)
const
;
ActionContainer
*
actionContainer
(
int
uid
)
const
;
void
initialize
();
//ActionManager Interface
I
ActionContainer
*
createMenu
(
const
QString
&
id
);
I
ActionContainer
*
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
::
I
ActionContainer
*
actionContainer
(
const
QString
&
id
)
const
;
Core
::
ActionContainer
*
actionContainer
(
const
QString
&
id
)
const
;
private:
bool
hasContext
(
QList
<
int
>
context
)
const
;
...
...
src/plugins/coreplugin/coreplugin.pro
View file @
1e4c48a1
...
...
@@ -98,7 +98,7 @@ HEADERS += mainwindow.h \
editormanager
/
openeditorswindow
.
h
\
editormanager
/
ieditor
.
h
\
editormanager
/
ieditorfactory
.
h
\
actionmanager
/
i
actioncontainer
.
h
\
actionmanager
/
actioncontainer
.
h
\
actionmanager
/
actionmanager
.
h
\
actionmanager
/
icommand
.
h
\
actionmanager
/
actionmanager_p
.
h
\
...
...
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
1e4c48a1
...
...
@@ -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
();
I
ActionContainer
*
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
I
ActionContainer
*
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
()));
I
ActionContainer
*
medit
=
am
->
actionContainer
(
Constants
::
M_EDIT
);
I
ActionContainer
*
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"
));
...
...
src/plugins/coreplugin/editormanager/editorsplitter.cpp
View file @
1e4c48a1
...
...
@@ -73,7 +73,7 @@ void EditorSplitter::registerActions()
QList
<
int
>
()
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
);
ActionManager
*
am
=
m_core
->
actionManager
();
I
ActionContainer
*
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
I
ActionContainer
*
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"
));
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
1e4c48a1
...
...
@@ -32,7 +32,7 @@
***************************************************************************/
#include "mainwindow.h"
#include "
i
actioncontainer.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
;
I
ActionContainer
*
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
I
ActionContainer
*
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
I
ActionContainer
*
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
I
ActionContainer
*
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
I
ActionContainer
*
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
;
I
ActionContainer
*
mfile
=
am
->
actionContainer
(
Constants
::
M_FILE
);
I
ActionContainer
*
medit
=
am
->
actionContainer
(
Constants
::
M_EDIT
);
I
ActionContainer
*
mtools
=
am
->
actionContainer
(
Constants
::
M_TOOLS
);
I
ActionContainer
*
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
)
I
ActionContainer
*
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
I
ActionContainer
*
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
()
{
I
ActionContainer
*
aci
=
ActionContainer
*
aci
=
m_actionManager
->
actionContainer
(
Constants
::
M_FILE_RECENTFILES
);
aci
->
menu
()
->
clear
();
m_recentFilesActions
.
clear
();
...
...
src/plugins/coreplugin/outputpane.cpp
View file @
1e4c48a1
...
...
@@ -38,7 +38,7 @@
#include "modemanager.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/
i
actioncontainer.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
();
I
ActionContainer
*
mwindow
=
am
->
actionContainer
(
Constants
::
M_WINDOW
);
ActionContainer
*
mwindow
=
am
->
actionContainer
(
Constants
::
M_WINDOW
);
// Window->Output Panes
I
ActionContainer
*
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"
));
...
...
src/plugins/cpaster/cpasterplugin.cpp
View file @
1e4c48a1
...
...
@@ -97,10 +97,10 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
//register actions
Core
::
ActionManager
*
actionManager
=
gCoreInstance
->
actionManager
();
Core
::
I
ActionContainer
*
toolsContainer
=
Core
::
ActionContainer
*
toolsContainer
=
actionManager
->
actionContainer
(
Core
::
Constants
::
M_TOOLS
);
Core
::
I
ActionContainer
*
cpContainer
=
Core
::
ActionContainer
*
cpContainer
=
actionManager
->
createMenu
(
QLatin1String
(
"CodePaster"
));
cpContainer
->
menu
()
->
setTitle
(
tr
(
"&CodePaster"
));
toolsContainer
->
addMenu
(
cpContainer
);
...
...
src/plugins/cppeditor/cppeditor.cpp
View file @
1e4c48a1
...
...
@@ -657,7 +657,7 @@ void CPPEditor::contextMenuEvent(QContextMenuEvent *e)
if
(
lastAction
->
menu
()
&&
QLatin1String
(
lastAction
->
menu
()
->
metaObject
()
->
className
())
==
QLatin1String
(
"QUnicodeControlCharacterMenu"
))
menu
->
removeAction
(
lastAction
);
Core
::
I
ActionContainer
*
mcontext
=
Core
::
ActionContainer
*
mcontext
=
m_core
->
actionManager
()
->
actionContainer
(
CppEditor
::
Constants
::
M_CONTEXT
);
QMenu
*
contextMenu
=
mcontext
->
menu
();
...
...
src/plugins/cpptools/cpptoolsplugin.cpp
View file @
1e4c48a1
...
...
@@ -96,8 +96,8 @@ bool CppToolsPlugin::initialize(const QStringList & /*arguments*/, QString *)
addAutoReleasedObject
(
new
CompletionSettingsPage
(
m_completion
));
// Menus
Core
::
I
ActionContainer
*
mtools
=
am
->
actionContainer
(
Core
::
Constants
::
M_TOOLS
);
Core
::
I
ActionContainer
*
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
);
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
1e4c48a1
...
...
@@ -306,10 +306,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
connect
(
m_breakpointMarginAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
breakpointMarginActionTriggered
()));
//Core::
I
ActionContainer *mcppcontext =
//Core::ActionContainer *mcppcontext =
// am->actionContainer(CppEditor::Constants::M_CONTEXT);
Core
::
I
ActionContainer
*
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
);
I
ActionContainer
*
viewsMenu
=
am
->
createMenu
(
Constants
::
M_DEBUG_VIEWS
);
ActionContainer
*
viewsMenu
=
am
->
createMenu
(
Constants
::
M_DEBUG_VIEWS
);
QMenu
*
m
=
viewsMenu
->
menu
();