Added deprecation warning for XML format 1, which will be removed in cppcheck 1.81
This commit is contained in:
parent
2da91e1cb6
commit
ec4a85ecef
|
@ -747,9 +747,11 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
|
||||||
PrintMessage("cppcheck: unusedFunction check can't be used with '-j' option. Disabling unusedFunction check.");
|
PrintMessage("cppcheck: unusedFunction check can't be used with '-j' option. Disabling unusedFunction check.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_settings->inconclusive && _settings->xml && _settings->xml_version == 1U) {
|
// Warn about XML format 1, which will be removed in cppcheck 1.81
|
||||||
PrintMessage("cppcheck: inconclusive messages will not be shown, because the old xml format is not compatible. It's recommended to use the new xml format (use --xml-version=2).");
|
if (_settings->xml_version == 1U)
|
||||||
}
|
PrintMessage("cppcheck: XML format version 1 is deprecated and will be removed in cppcheck 1.81. Use '--xml-version=2'.");
|
||||||
|
if (_settings->inconclusive && _settings->xml && _settings->xml_version == 1U)
|
||||||
|
PrintMessage("cppcheck: inconclusive messages will not be shown, because the old xml format is not compatible.");
|
||||||
|
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
_showHelp = true;
|
_showHelp = true;
|
||||||
|
|
|
@ -1064,6 +1064,9 @@ void MainWindow::Save()
|
||||||
if (!selectedFile.isEmpty()) {
|
if (!selectedFile.isEmpty()) {
|
||||||
Report::Type type = Report::TXT;
|
Report::Type type = Report::TXT;
|
||||||
if (selectedFilter == tr("XML files version 1 (*.xml)")) {
|
if (selectedFilter == tr("XML files version 1 (*.xml)")) {
|
||||||
|
QMessageBox msgBox(QMessageBox::Icon::Warning, tr("Deprecated XML format"), tr("XML format 1 is deprecated and will be removed in cppcheck 1.81."), QMessageBox::StandardButton::Ok);
|
||||||
|
msgBox.exec();
|
||||||
|
|
||||||
type = Report::XML;
|
type = Report::XML;
|
||||||
if (!selectedFile.endsWith(".xml", Qt::CaseInsensitive))
|
if (!selectedFile.endsWith(".xml", Qt::CaseInsensitive))
|
||||||
selectedFile += ".xml";
|
selectedFile += ".xml";
|
||||||
|
|
Loading…
Reference in New Issue