diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index e5a29907e..39ec29cf7 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -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."); } - 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. It's recommended to use the new xml format (use --xml-version=2)."); - } + // Warn about XML format 1, which will be removed in cppcheck 1.81 + 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) { _showHelp = true; diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 9030c307c..c6da6dbfa 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1064,6 +1064,9 @@ void MainWindow::Save() if (!selectedFile.isEmpty()) { Report::Type type = Report::TXT; 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; if (!selectedFile.endsWith(".xml", Qt::CaseInsensitive)) selectedFile += ".xml";