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
e6f7cb68
Commit
e6f7cb68
authored
Jan 13, 2009
by
hjk
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
947b6807
281c462d
Changes
73
Hide whitespace changes
Inline
Side-by-side
shared/cplusplus/AST.cpp
View file @
e6f7cb68
...
...
@@ -117,6 +117,9 @@ CatchClauseAST *AST::asCatchClause()
ClassSpecifierAST
*
AST
::
asClassSpecifier
()
{
return
dynamic_cast
<
ClassSpecifierAST
*>
(
this
);
}
CompoundLiteralAST
*
AST
::
asCompoundLiteral
()
{
return
dynamic_cast
<
CompoundLiteralAST
*>
(
this
);
}
CompoundStatementAST
*
AST
::
asCompoundStatement
()
{
return
dynamic_cast
<
CompoundStatementAST
*>
(
this
);
}
...
...
@@ -774,6 +777,42 @@ unsigned BoolLiteralAST::lastToken() const
return
token
+
1
;
}
CompoundLiteralAST
*
CompoundLiteralAST
::
clone
(
MemoryPool
*
pool
)
const
{
CompoundLiteralAST
*
ast
=
new
(
pool
)
CompoundLiteralAST
;
ast
->
lparen_token
=
lparen_token
;
if
(
type_id
)
ast
->
type_id
=
type_id
->
clone
(
pool
);
ast
->
rparen_token
=
rparen_token
;
if
(
initializer
)
ast
->
initializer
=
initializer
->
clone
(
pool
);
return
ast
;
}
void
CompoundLiteralAST
::
accept0
(
ASTVisitor
*
visitor
)
{
if
(
visitor
->
visit
(
this
))
{
accept
(
type_id
,
visitor
);
accept
(
initializer
,
visitor
);
}
}
unsigned
CompoundLiteralAST
::
firstToken
()
const
{
return
lparen_token
;
}
unsigned
CompoundLiteralAST
::
lastToken
()
const
{
if
(
initializer
)
return
initializer
->
lastToken
();
else
if
(
rparen_token
)
return
rparen_token
+
1
;
else
if
(
type_id
)
return
type_id
->
lastToken
();
return
lparen_token
+
1
;
}
BreakStatementAST
*
BreakStatementAST
::
clone
(
MemoryPool
*
pool
)
const
{
BreakStatementAST
*
ast
=
new
(
pool
)
BreakStatementAST
;
...
...
shared/cplusplus/AST.h
View file @
e6f7cb68
...
...
@@ -94,6 +94,7 @@ public:
CastExpressionAST
*
asCastExpression
();
CatchClauseAST
*
asCatchClause
();
ClassSpecifierAST
*
asClassSpecifier
();
CompoundLiteralAST
*
asCompoundLiteral
();
CompoundStatementAST
*
asCompoundStatement
();
ConditionAST
*
asCondition
();
ConditionalExpressionAST
*
asConditionalExpression
();
...
...
@@ -429,6 +430,24 @@ protected:
virtual
void
accept0
(
ASTVisitor
*
visitor
);
};
class
CPLUSPLUS_EXPORT
CompoundLiteralAST
:
public
ExpressionAST
{
public:
unsigned
lparen_token
;
ExpressionAST
*
type_id
;
unsigned
rparen_token
;
ExpressionAST
*
initializer
;
public:
virtual
unsigned
firstToken
()
const
;
virtual
unsigned
lastToken
()
const
;
virtual
CompoundLiteralAST
*
clone
(
MemoryPool
*
pool
)
const
;
protected:
virtual
void
accept0
(
ASTVisitor
*
visitor
);
};
class
CPLUSPLUS_EXPORT
QtMethodAST
:
public
ExpressionAST
{
public:
...
...
shared/cplusplus/ASTVisitor.h
View file @
e6f7cb68
...
...
@@ -104,6 +104,7 @@ public:
virtual
bool
visit
(
CastExpressionAST
*
)
{
return
true
;
}
virtual
bool
visit
(
CatchClauseAST
*
)
{
return
true
;
}
virtual
bool
visit
(
ClassSpecifierAST
*
)
{
return
true
;
}
virtual
bool
visit
(
CompoundLiteralAST
*
)
{
return
true
;
}
virtual
bool
visit
(
CompoundStatementAST
*
)
{
return
true
;
}
virtual
bool
visit
(
ConditionAST
*
)
{
return
true
;
}
virtual
bool
visit
(
ConditionalExpressionAST
*
)
{
return
true
;
}
...
...
shared/cplusplus/ASTfwd.h
View file @
e6f7cb68
...
...
@@ -77,6 +77,7 @@ class CaseStatementAST;
class
CastExpressionAST
;
class
CatchClauseAST
;
class
ClassSpecifierAST
;
class
CompoundLiteralAST
;
class
CompoundStatementAST
;
class
ConditionAST
;
class
ConditionalExpressionAST
;
...
...
shared/cplusplus/CheckExpression.cpp
View file @
e6f7cb68
...
...
@@ -333,6 +333,13 @@ bool CheckExpression::visit(QtMethodAST *ast)
return
false
;
}
bool
CheckExpression
::
visit
(
CompoundLiteralAST
*
ast
)
{
/*FullySpecifiedType exprTy = */
semantic
()
->
check
(
ast
->
type_id
,
_scope
);
/*FullySpecifiedType initTy = */
semantic
()
->
check
(
ast
->
initializer
,
_scope
);
return
false
;
}
bool
CheckExpression
::
visit
(
CallAST
*
ast
)
{
for
(
ExpressionListAST
*
it
=
ast
->
expression_list
;
it
;
it
=
it
->
next
)
{
...
...
shared/cplusplus/CheckExpression.h
View file @
e6f7cb68
...
...
@@ -98,6 +98,7 @@ protected:
virtual
bool
visit
(
TypeIdAST
*
ast
);
virtual
bool
visit
(
UnaryExpressionAST
*
ast
);
virtual
bool
visit
(
QtMethodAST
*
ast
);
virtual
bool
visit
(
CompoundLiteralAST
*
ast
);
//names
virtual
bool
visit
(
QualifiedNameAST
*
ast
);
...
...
shared/cplusplus/Parser.cpp
View file @
e6f7cb68
...
...
@@ -1621,8 +1621,7 @@ bool Parser::parseInitializerClause(ExpressionAST *&node)
ArrayInitializerAST
*
ast
=
new
(
_pool
)
ArrayInitializerAST
;
ast
->
lbrace_token
=
consumeToken
();
parseInitializerList
(
ast
->
expression_list
);
if
(
LA
()
==
T_RBRACE
)
ast
->
rbrace_token
=
consumeToken
();
match
(
T_RBRACE
,
&
ast
->
rbrace_token
);
node
=
ast
;
return
true
;
}
...
...
@@ -2702,8 +2701,30 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node)
return
true
;
}
}
blockErrors
(
blocked
);
rewind
(
start
);
// look for compound literals
if
(
LA
()
==
T_LPAREN
)
{
unsigned
lparen_token
=
consumeToken
();
ExpressionAST
*
type_id
=
0
;
if
(
parseTypeId
(
type_id
)
&&
LA
()
==
T_RPAREN
)
{
unsigned
rparen_token
=
consumeToken
();
if
(
LA
()
==
T_LBRACE
)
{
blockErrors
(
blocked
);
CompoundLiteralAST
*
ast
=
new
(
_pool
)
CompoundLiteralAST
;
ast
->
lparen_token
=
lparen_token
;
ast
->
type_id
=
type_id
;
ast
->
rparen_token
=
rparen_token
;
parseInitializerClause
(
ast
->
initializer
);
node
=
ast
;
return
true
;
}
}
rewind
(
start
);
}
blockErrors
(
blocked
);
return
parsePrimaryExpression
(
node
);
}
}
...
...
@@ -3552,6 +3573,9 @@ bool Parser::parseObjClassInstanceVariables()
bool
Parser
::
parseObjCInterfaceMemberDeclaration
()
{
switch
(
LA
())
{
case
T_AT_END
:
return
false
;
case
T_AT_REQUIRED
:
case
T_AT_OPTIONAL
:
consumeToken
();
...
...
@@ -3570,9 +3594,20 @@ bool Parser::parseObjCInterfaceMemberDeclaration()
case
T_MINUS
:
return
parseObjCMethodPrototype
();
default:
return
false
;
case
T_ENUM
:
case
T_CLASS
:
case
T_STRUCT
:
case
T_UNION
:
{
DeclarationAST
*
declaration
=
0
;
return
parseSimpleDeclaration
(
declaration
,
/*accept struct declarators */
true
);
}
default:
{
DeclarationAST
*
declaration
=
0
;
return
parseSimpleDeclaration
(
declaration
,
/*accept struct declarators */
true
);
}
// default
}
// switch
}
// objc-instance-variable-declaration ::= objc-visibility-specifier
...
...
@@ -3589,7 +3624,7 @@ bool Parser::parseObjCInstanceVariableDeclaration(DeclarationAST *&node)
return
true
;
default:
return
parse
Block
Declaration
(
node
);
return
parse
Simple
Declaration
(
node
,
true
);
}
}
...
...
@@ -3612,7 +3647,7 @@ bool Parser::parseObjCPropertyDeclaration(DeclarationAST *&, SpecifierAST *)
}
DeclarationAST
*
simple_declaration
=
0
;
parseSimpleDeclaration
(
simple_declaration
,
/*accept-struct-declarators = */
fals
e
);
parseSimpleDeclaration
(
simple_declaration
,
/*accept-struct-declarators = */
tru
e
);
return
true
;
}
...
...
@@ -3736,6 +3771,19 @@ bool Parser::parseObjCKeywordDeclaration()
bool
Parser
::
parseObjCTypeQualifiers
()
{
if
(
LA
()
!=
T_IDENTIFIER
)
return
false
;
Identifier
*
id
=
tok
().
identifier
;
if
(
!
strcmp
(
"in"
,
id
->
chars
())
||
!
strcmp
(
"out"
,
id
->
chars
())
||
!
strcmp
(
"inout"
,
id
->
chars
())
||
!
strcmp
(
"bycopy"
,
id
->
chars
())
||
!
strcmp
(
"byref"
,
id
->
chars
())
||
!
strcmp
(
"oneway"
,
id
->
chars
()))
{
consumeToken
();
return
true
;
}
return
false
;
}
...
...
shared/cplusplus/PrettyPrinter.cpp
View file @
e6f7cb68
...
...
@@ -1281,3 +1281,13 @@ bool PrettyPrinter::visit(QtMethodAST *ast)
out
<<
')'
;
return
false
;
}
bool
PrettyPrinter
::
visit
(
CompoundLiteralAST
*
ast
)
{
out
<<
'('
;
accept
(
ast
->
type_id
);
out
<<
')'
;
out
<<
' '
;
accept
(
ast
->
initializer
);
return
false
;
}
shared/cplusplus/PrettyPrinter.h
View file @
e6f7cb68
...
...
@@ -66,6 +66,7 @@ protected:
virtual
bool
visit
(
CastExpressionAST
*
ast
);
virtual
bool
visit
(
CatchClauseAST
*
ast
);
virtual
bool
visit
(
ClassSpecifierAST
*
ast
);
virtual
bool
visit
(
CompoundLiteralAST
*
ast
);
virtual
bool
visit
(
CompoundStatementAST
*
ast
);
virtual
bool
visit
(
ConditionAST
*
ast
);
virtual
bool
visit
(
ConditionalExpressionAST
*
ast
);
...
...
src/plugins/bineditor/bineditorplugin.cpp
View file @
e6f7cb68
...
...
@@ -46,7 +46,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager
interface
.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
...
...
src/plugins/bookmarks/bookmarksplugin.cpp
View file @
e6f7cb68
...
...
@@ -42,7 +42,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager
interface
.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <QtCore/qplugin.h>
#include <QtCore/QDebug>
...
...
@@ -68,7 +68,7 @@ void BookmarksPlugin::extensionsInitialized()
bool
BookmarksPlugin
::
initialize
(
const
QStringList
&
/*arguments*/
,
QString
*
)
{
m_core
=
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
Core
::
ICore
>
();
Core
::
ActionManager
Interface
*
am
=
m_core
->
actionManager
();
Core
::
ActionManager
*
am
=
m_core
->
actionManager
();
QList
<
int
>
context
=
QList
<
int
>
()
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
BOOKMARKS_CONTEXT
);
...
...
src/plugins/coreplugin/actionmanager/actioncontainer.cpp
View file @
e6f7cb68
...
...
@@ -32,6 +32,8 @@
***************************************************************************/
#include "actioncontainer.h"
#include "actionmanager_p.h"
#include "command.h"
#include "coreimpl.h"
...
...
@@ -181,7 +183,7 @@ void ActionContainer::appendGroup(const QString &group, bool global)
int
gid
=
idmanager
->
uniqueIdentifier
(
group
);
m_groups
<<
gid
;
if
(
global
)
ActionManager
::
instance
()
->
registerGlobalGroup
(
gid
,
m_id
);
ActionManager
Private
::
instance
()
->
registerGlobalGroup
(
gid
,
m_id
);
}
/*!
...
...
@@ -220,7 +222,7 @@ void ActionContainer::addAction(ICommand *action, const QString &group)
if
(
!
canAddAction
(
action
))
return
;
ActionManager
*
am
=
ActionManager
::
instance
();
ActionManager
Private
*
am
=
ActionManager
Private
::
instance
();
Action
*
a
=
static_cast
<
Action
*>
(
action
);
if
(
a
->
stateFlags
()
&
Command
::
CS_PreLocation
)
{
QList
<
CommandLocation
>
locs
=
a
->
locations
();
...
...
@@ -251,7 +253,7 @@ void ActionContainer::addMenu(IActionContainer *menu, const QString &group)
if
(
!
canAddMenu
(
menu
))
return
;
ActionManager
*
am
=
ActionManager
::
instance
();
ActionManager
Private
*
am
=
ActionManager
Private
::
instance
();
MenuActionContainer
*
mc
=
static_cast
<
MenuActionContainer
*>
(
menu
);
if
(
mc
->
hasState
(
ActionContainer
::
CS_PreLocation
))
{
CommandLocation
loc
=
mc
->
location
();
...
...
@@ -396,7 +398,7 @@ void ActionContainer::addMenu(IActionContainer *menu, int pos, bool setpos)
*/
QAction
*
ActionContainer
::
beforeAction
(
int
pos
,
int
*
prevKey
)
const
{
ActionManager
*
am
=
ActionManager
::
instance
();
ActionManager
Private
*
am
=
ActionManager
Private
::
instance
();
int
baId
=
-
1
;
...
...
src/plugins/coreplugin/actionmanager/actioncontainer.h
View file @
e6f7cb68
...
...
@@ -34,7 +34,7 @@
#ifndef ACTIONCONTAINER_H
#define ACTIONCONTAINER_H
#include "actionmanager.h"
#include "actionmanager
_p
.h"
#include <coreplugin/actionmanager/iactioncontainer.h>
#include <coreplugin/actionmanager/icommand.h>
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
e6f7cb68
...
...
@@ -31,7 +31,7 @@
**
***************************************************************************/
#include "actionmanager.h"
#include "actionmanager
_p
.h"
#include "mainwindow.h"
#include "actioncontainer.h"
#include "command.h"
...
...
@@ -52,15 +52,15 @@ namespace {
}
/*!
\class Core::ActionManager
Interface
\class Core::ActionManager
\mainclass
\ingroup qwb
\inheaderfile actionmanager
interface
.h
\inheaderfile actionmanager.h
\brief All actions should be registered in the ActionManager, since this enables the user to
e.g. change their shortcuts at a central place.
The ActionManager
Interface
is the central bookkeeper of actions and their shortcuts and layout.
The ActionManager is the central bookkeeper of actions and their shortcuts and layout.
You get the only implementation of this class from the core interface (ICore::actionManager()).
The main reasons for the need of this class is to provide a central place where the user
...
...
@@ -94,59 +94,59 @@ namespace {
*/
/*!
\fn virtual IActionContainer *ActionManager
Interface
::createMenu(const QString &id) = 0
\fn virtual IActionContainer *ActionManager::createMenu(const QString &id) = 0
...
*/
/*!
\fn virtual IActionContainer *ActionManager
Interface
::createMenuBar(const QString &id) = 0
\fn virtual IActionContainer *ActionManager::createMenuBar(const QString &id) = 0
...
*/
/*!
\fn virtual ICommand *ActionManager
Interface
::registerAction(QAction *action, const QString &id, const QList<int> &context) = 0
\fn virtual ICommand *ActionManager::registerAction(QAction *action, const QString &id, const QList<int> &context) = 0
...
*/
/*!
\fn virtual ICommand *ActionManager
Interface
::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0
\fn virtual ICommand *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0
...
*/
/*!
\fn virtual ICommand *ActionManager
Interface
::registerAction(QAction *action, const QString &id) = 0
\fn virtual ICommand *ActionManager::registerAction(QAction *action, const QString &id) = 0
...
*/
/*!
\fn virtual void ActionManager
Interface
::addAction(ICommand *action, const QString &globalGroup) = 0
\fn virtual void ActionManager::addAction(ICommand *action, const QString &globalGroup) = 0
...
*/
/*!
\fn virtual void ActionManager
Interface
::addMenu(IActionContainer *menu, const QString &globalGroup) = 0
\fn virtual void ActionManager::addMenu(IActionContainer *menu, const QString &globalGroup) = 0
...
*/
/*!
\fn virtual ICommand *ActionManager
Interface
::command(const QString &id) const = 0
\fn virtual ICommand *ActionManager::command(const QString &id) const = 0
...
*/
/*!
\fn virtual IActionContainer *ActionManager
Interface
::actionContainer(const QString &id) const = 0
\fn virtual IActionContainer *ActionManager::actionContainer(const QString &id) const = 0
...
*/
/*!
\fn virtual ActionManager
Interface
::~ActionManager
Interface
()
\fn virtual ActionManager::~ActionManager()
...
*/
using
namespace
Core
;
using
namespace
Core
::
Internal
;
ActionManager
*
ActionManager
::
m_instance
=
0
;
ActionManager
Private
*
ActionManager
Private
::
m_instance
=
0
;
/*!
\class ActionManager
...
...
@@ -159,8 +159,8 @@ ActionManager* ActionManager::m_instance = 0;
/*!
...
*/
ActionManager
::
ActionManager
(
MainWindow
*
mainWnd
,
UniqueIDManager
*
uidmgr
)
:
ActionManager
Interface
(
mainWnd
),
ActionManager
Private
::
ActionManager
Private
(
MainWindow
*
mainWnd
,
UniqueIDManager
*
uidmgr
)
:
ActionManager
(
mainWnd
),
m_mainWnd
(
mainWnd
)
{
m_defaultGroups
<<
uidmgr
->
uniqueIdentifier
(
Constants
::
G_DEFAULT_ONE
);
...
...
@@ -173,7 +173,7 @@ ActionManager::ActionManager(MainWindow *mainWnd, UniqueIDManager *uidmgr) :
/*!
...
*/
ActionManager
::~
ActionManager
()
ActionManager
Private
::~
ActionManager
Private
()
{
qDeleteAll
(
m_idCmdMap
.
values
());
qDeleteAll
(
m_idContainerMap
.
values
());
...
...
@@ -182,7 +182,7 @@ ActionManager::~ActionManager()
/*!
...
*/
ActionManager
*
ActionManager
::
instance
()
ActionManager
Private
*
ActionManager
Private
::
instance
()
{
return
m_instance
;
}
...
...
@@ -190,7 +190,7 @@ ActionManager* ActionManager::instance()
/*!
...
*/
QList
<
int
>
ActionManager
::
defaultGroups
()
const
QList
<
int
>
ActionManager
Private
::
defaultGroups
()
const
{
return
m_defaultGroups
;
}
...
...
@@ -198,7 +198,7 @@ QList<int> ActionManager::defaultGroups() const
/*!
...
*/
QList
<
Command
*>
ActionManager
::
commands
()
const
QList
<
Command
*>
ActionManager
Private
::
commands
()
const
{
return
m_idCmdMap
.
values
();
}
...
...
@@ -206,7 +206,7 @@ QList<Command *> ActionManager::commands() const
/*!
...
*/
QList
<
ActionContainer
*>
ActionManager
::
containers
()
const
QList
<
ActionContainer
*>
ActionManager
Private
::
containers
()
const
{
return
m_idContainerMap
.
values
();
}
...
...
@@ -214,7 +214,7 @@ QList<ActionContainer *> ActionManager::containers() const
/*!
...
*/
void
ActionManager
::
registerGlobalGroup
(
int
groupId
,
int
containerId
)
void
ActionManager
Private
::
registerGlobalGroup
(
int
groupId
,
int
containerId
)
{
if
(
m_globalgroups
.
contains
(
groupId
))
{
qWarning
()
<<
"registerGlobalGroup: Global group "
...
...
@@ -228,7 +228,7 @@ void ActionManager::registerGlobalGroup(int groupId, int containerId)
/*!
...
*/
bool
ActionManager
::
hasContext
(
int
context
)
const
bool
ActionManager
Private
::
hasContext
(
int
context
)
const
{
return
m_context
.
contains
(
context
);
}
...
...
@@ -236,7 +236,7 @@ bool ActionManager::hasContext(int context) const
/*!
...
*/
void
ActionManager
::
setContext
(
const
QList
<
int
>
&
context
)
void
ActionManager
Private
::
setContext
(
const
QList
<
int
>
&
context
)
{
// here are possibilities for speed optimization if necessary:
// let commands (de-)register themselves for contexts
...
...
@@ -254,7 +254,7 @@ void ActionManager::setContext(const QList<int> &context)
/*!
\internal
*/
bool
ActionManager
::
hasContext
(
QList
<
int
>
context
)
const
bool
ActionManager
Private
::
hasContext
(
QList
<
int
>
context
)
const
{
for
(
int
i
=
0
;
i
<
m_context
.
count
();
++
i
)
{
if
(
context
.
contains
(
m_context
.
at
(
i
)))
...
...
@@ -266,7 +266,7 @@ bool ActionManager::hasContext(QList<int> context) const
/*!
...
*/
IActionContainer
*
ActionManager
::
createMenu
(
const
QString
&
id
)
IActionContainer
*
ActionManager
Private
::
createMenu
(
const
QString
&
id
)
{
const
int
uid
=
m_mainWnd
->
uniqueIDManager
()
->
uniqueIdentifier
(
id
);
const
IdContainerMap
::
const_iterator
it
=
m_idContainerMap
.
constFind
(
uid
);
...
...
@@ -287,7 +287,7 @@ IActionContainer *ActionManager::createMenu(const QString &id)
/*!
...
*/
IActionContainer
*
ActionManager
::
createMenuBar
(
const
QString
&
id
)
IActionContainer
*
ActionManager
Private
::
createMenuBar
(
const
QString
&
id
)
{
const
int
uid
=
m_mainWnd
->
uniqueIDManager
()
->
uniqueIdentifier
(
id
);
const
IdContainerMap
::
const_iterator
it
=
m_idContainerMap
.
constFind
(
uid
);
...
...
@@ -308,7 +308,7 @@ IActionContainer *ActionManager::createMenuBar(const QString &id)
/*!
...
*/
ICommand
*
ActionManager
::
registerAction
(
QAction
*
action
,
const
QString
&
id
,
const
QList
<
int
>
&
context
)
ICommand
*
ActionManager
Private
::
registerAction
(
QAction
*
action
,
const
QString
&
id
,
const
QList
<
int
>
&
context
)
{
OverrideableAction
*
a
=
0
;
ICommand
*
c
=
registerOverridableAction
(
action
,
id
,
false
);
...
...
@@ -321,7 +321,7 @@ ICommand *ActionManager::registerAction(QAction *action, const QString &id, cons
/*!
...
*/
ICommand
*
ActionManager
::
registerAction
(
QAction
*
action
,
const
QString
&
id
)
ICommand
*
ActionManager
Private
::
registerAction
(
QAction
*
action
,
const
QString
&
id
)
{
return
registerOverridableAction
(
action
,
id
,
true
);
}
...
...
@@ -329,7 +329,7 @@ ICommand *ActionManager::registerAction(QAction *action, const QString &id)
/*!
\internal
*/
ICommand
*
ActionManager
::
registerOverridableAction
(
QAction
*
action
,
const
QString
&
id
,
bool
checkUnique
)
ICommand
*
ActionManager
Private
::
registerOverridableAction
(
QAction
*
action
,
const
QString
&
id
,
bool
checkUnique
)
{
OverrideableAction
*
a
=
0
;
const
int
uid
=
m_mainWnd
->
uniqueIDManager
()
->
uniqueIdentifier
(
id
);
...
...
@@ -378,7 +378,7 @@ ICommand *ActionManager::registerOverridableAction(QAction *action, const QStrin
/*!
...
*/
ICommand
*
ActionManager
::
registerShortcut
(
QShortcut
*
shortcut
,
const
QString
&
id
,
const
QList
<
int
>
&
context
)
ICommand
*
ActionManager
Private
::
registerShortcut
(
QShortcut
*
shortcut
,
const
QString
&
id
,
const
QList
<
int
>
&
context
)
{
Shortcut
*
sc
=
0
;
int
uid
=
m_mainWnd
->
uniqueIDManager
()
->
uniqueIdentifier
(
id
);
...
...
@@ -416,9 +416,9 @@ ICommand *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id
}
/*!
\fn void ActionManager::addAction(Core::ICommand *action, const QString &globalGroup)
\fn void ActionManager
Private
::addAction(Core::ICommand *action, const QString &globalGroup)
*/
void
ActionManager
::
addAction
(
ICommand
*
action
,
const
QString
&
globalGroup
)
void
ActionManager
Private
::
addAction
(
ICommand
*
action
,
const
QString
&
globalGroup
)
{
const
int
gid
=
m_mainWnd
->
uniqueIDManager
()
->
uniqueIdentifier
(
globalGroup
);
if
(
!
m_globalgroups
.
contains
(
gid
))
{
...
...
@@ -435,10 +435,10 @@ void ActionManager::addAction(ICommand *action, const QString &globalGroup)
}
/*!
\fn void ActionManager::addMenu(Core::IActionContainer *menu, const QString &globalGroup)
\fn void ActionManager
Private
::addMenu(Core::IActionContainer *menu, const QString &globalGroup)
*/
void
ActionManager
::
addMenu
(
IActionContainer
*
menu
,
const
QString
&
globalGroup
)
void
ActionManager
Private
::
addMenu
(
IActionContainer
*
menu
,
const
QString
&
globalGroup
)
{
const
int
gid
=
m_mainWnd
->
uniqueIDManager
()
->
uniqueIdentifier
(
globalGroup
);
if
(
!
m_globalgroups
.
contains
(
gid
))
{
...
...
@@ -457,13 +457,13 @@ void ActionManager::addMenu(IActionContainer *menu, const QString &globalGroup)
/*!
...
*/
ICommand
*
ActionManager
::
command