Commit 192a9990 authored by hjk's avatar hjk
Browse files

Core::Context: Fix construction of Context(C_GLOBAL_ID)

parent 6e4160f4
......@@ -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:
......
......@@ -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); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment