Merge remote-tracking branch 'origin/2.7'

Conflicts:
	src/plugins/cpptools/cppchecksymbols.h
	src/plugins/qmldesigner/components/formeditor/resizecontroller.cpp

Change-Id: I887ba071fa637ad44e39bcae581738fa078a6612
This commit is contained in:
Eike Ziller
2013-04-11 18:27:52 +02:00
64 changed files with 961 additions and 304 deletions

View File

@@ -43,14 +43,6 @@ class StaticAnalysisMessages
Q_DECLARE_TR_FUNCTIONS(QmlJS::StaticAnalysisMessages)
public:
class PrototypeMessageData {
public:
Type type;
Severity severity;
QString message;
int placeholders;
};
void newMsg(Type type, Severity severity, const QString &message, int placeholders = 0)
{
PrototypeMessageData prototype;
@@ -248,7 +240,7 @@ Message::Message(Type type,
: location(location), type(type)
{
QTC_ASSERT(messages()->messages.contains(type), return);
const StaticAnalysisMessages::PrototypeMessageData &prototype = messages()->messages.value(type);
const PrototypeMessageData &prototype = prototypeForMessageType(type);
severity = prototype.severity;
message = prototype.message;
if (prototype.placeholders == 0) {
@@ -299,3 +291,11 @@ QRegExp Message::suppressionPattern()
{
return QRegExp(QLatin1String("@disable-check M(\\d+)"));
}
const PrototypeMessageData Message::prototypeForMessageType(Type type)
{
QTC_CHECK(messages()->messages.contains(type));
const PrototypeMessageData &prototype = messages()->messages.value(type);
return prototype;
}

View File

@@ -131,6 +131,14 @@ enum Type
ErrInvalidArrayValueLength = 323
};
class QMLJS_EXPORT PrototypeMessageData {
public:
Type type;
Severity severity;
QString message;
int placeholders;
};
class QMLJS_EXPORT Message
{
public:
@@ -152,6 +160,8 @@ public:
QString message;
Type type;
Severity severity;
static const PrototypeMessageData prototypeForMessageType(Type type);
};
} // namespace StaticAnalysis