forked from qt-creator/qt-creator
Core: Clean up context
Move the context code into its own implementation file (from id.cpp) Change-Id: I5e487e0ab0a9b3a33ef32f2d5b7a5d703bded099 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -32,11 +32,12 @@
|
||||
|
||||
#include "id.h"
|
||||
#include "coreconstants.h"
|
||||
#include "icontext.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QHash>
|
||||
#include <QVector>
|
||||
|
||||
namespace Core {
|
||||
|
||||
@@ -131,19 +132,4 @@ QString Id::toString() const
|
||||
return QString::fromLatin1(stringFromId[m_id]);
|
||||
}
|
||||
|
||||
Context::Context(const char *id, int offset)
|
||||
{
|
||||
d.append(Id(QLatin1String(id) + QString::number(offset)).uniqueIdentifier());
|
||||
}
|
||||
|
||||
void Context::add(const char *id)
|
||||
{
|
||||
d.append(Id(id).uniqueIdentifier());
|
||||
}
|
||||
|
||||
bool Context::contains(const char *id) const
|
||||
{
|
||||
return d.contains(Id(id).uniqueIdentifier());
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
||||
Reference in New Issue
Block a user