Skip to content
GitLab
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
192a9990
Commit
192a9990
authored
Jun 28, 2010
by
hjk
Browse files
Core::Context: Fix construction of Context(C_GLOBAL_ID)
parent
6e4160f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
192a9990
...
...
@@ -265,6 +265,15 @@ bool ActionManagerPrivate::hasContext(int context) const
return
m_context
.
contains
(
context
);
}
QDebug
operator
<<
(
QDebug
in
,
const
Context
&
context
)
{
UniqueIDManager
*
uidm
=
UniqueIDManager
::
instance
();
in
<<
"CONTEXT: "
;
foreach
(
int
c
,
context
)
in
<<
" "
<<
c
<<
uidm
->
stringForUniqueIdentifier
(
c
);
return
in
;
}
void
ActionManagerPrivate
::
setContext
(
const
Context
&
context
)
{
// here are possibilities for speed optimization if necessary:
...
...
src/plugins/coreplugin/icontext.h
View file @
192a9990
...
...
@@ -46,6 +46,7 @@ class CORE_EXPORT Context
public:
Context
()
{}
explicit
Context
(
int
c1
)
{
d
.
append
(
c1
);
}
// For C_GLOBAL_ID. FIXME: Sanitize.
explicit
Context
(
const
char
*
c1
)
{
add
(
c1
);
}
Context
(
const
char
*
c1
,
const
char
*
c2
)
{
add
(
c1
);
add
(
c2
);
}
Context
(
const
char
*
c1
,
const
char
*
c2
,
const
char
*
c3
)
{
add
(
c1
);
add
(
c2
);
add
(
c3
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment