Changeset View
Changeset View
Standalone View
Standalone View
analyzers/cppcheck/parameters.cpp
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | |||||
119 | 119 | | |||
120 | QStringList Parameters::commandLine(QString& infoMessage) const | 120 | QStringList Parameters::commandLine(QString& infoMessage) const | ||
121 | { | 121 | { | ||
122 | static const auto mocHeaderRegex = QRegularExpression("#define\\s+Q_MOC_OUTPUT_REVISION\\s+(.+)"); | 122 | static const auto mocHeaderRegex = QRegularExpression("#define\\s+Q_MOC_OUTPUT_REVISION\\s+(.+)"); | ||
123 | static const auto mocParametersRegex = QRegularExpression("-DQ_MOC_OUTPUT_REVISION=\\d{2,}"); | 123 | static const auto mocParametersRegex = QRegularExpression("-DQ_MOC_OUTPUT_REVISION=\\d{2,}"); | ||
124 | 124 | | |||
125 | const QString mocMessage = i18n( | 125 | const QString mocMessage = i18n( | ||
126 | "It seems that this project uses Qt library. For correctly work of cppcheck " | 126 | "It seems that this project uses Qt library. For correctly work of cppcheck " | ||
127 | "the value for define Q_MOC_OUTPUT_REVISION must be set. Unfortunatly, the plugin is unable " | 127 | "the value for define Q_MOC_OUTPUT_REVISION must be set. Unfortunately, the plugin is unable " | ||
128 | "to find this value automatically - you should set it manually by adding " | 128 | "to find this value automatically - you should set it manually by adding " | ||
129 | "'-DQ_MOC_OUTPUT_REVISION=XX' to extra parameters. The 'XX' value can be found in any project's " | 129 | "'-DQ_MOC_OUTPUT_REVISION=XX' to extra parameters. The 'XX' value can be found in any project's " | ||
130 | "moc-generated file or in the <QtCore/qobjectdefs.h> header file."); | 130 | "moc-generated file or in the <QtCore/qobjectdefs.h> header file."); | ||
131 | 131 | | |||
132 | QStringList result; | 132 | QStringList result; | ||
133 | 133 | | |||
134 | result << executablePath; | 134 | result << executablePath; | ||
135 | result << QStringLiteral("--xml-version=2"); | 135 | result << QStringLiteral("--xml-version=2"); | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |