Skip to content

Commit

Permalink
Add popup and message when no issues found (#183)
Browse files Browse the repository at this point in the history
Signed-off-by: romanodanilo <[email protected]>
Signed-off-by: romanodanilo <[email protected]>
  • Loading branch information
romanodanilo authored Sep 23, 2024
1 parent 869b53c commit bfc389a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/report_modules/report_module_gui/src/ui/c_checker_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <QtCore/QTextStream>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QSplitter>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QTreeWidget>
Expand Down Expand Up @@ -262,6 +263,25 @@ void cCheckerWidget::LoadIssues(std::list<cIssue *> issues) const
ShowIssue(firstIssue, nullptr);
}

if (issues.size() == 0)
{
QTreeWidgetItem *newItem = new QTreeWidgetItem(_issueBox);

newItem->setToolTip(0, "Identifier");
newItem->setText(0, QString("-"));
newItem->setText(1, QString("-"));
newItem->setText(2, QString("-"));
newItem->setText(3, QString("No Issues Found"));
_issueBox->setItemSelected(newItem, true);
_issueDetailsTextWidget->setText(QString("No issues found in selected xqar file"));
_issueBox->addTopLevelItem(newItem);
QMessageBox msgBox;
msgBox.setWindowTitle("Result file info");
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText("No issues found in selected xqar file");
msgBox.exec();
}

_issueBox->expandAll();
}

Expand Down

0 comments on commit bfc389a

Please sign in to comment.