Fix ticket #2041 (GUI: duplicate messages because file name case different)
This commit is contained in:
parent
6d35396720
commit
0fd51a814f
|
@ -168,7 +168,10 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
|
|||
// Check for duplicate rows and don't add them if found
|
||||
for (int i = 0; i < parent->rowCount(); i++)
|
||||
{
|
||||
// the first column is the file name and is always the same so skip it
|
||||
// The first column is the file name and is always the same so
|
||||
// we skip it in other platforms than Windows, where filename case
|
||||
// is ignored. So in Windows we can get filenames "header.h" and
|
||||
// "Header.h" and must compare them as identical filenames.
|
||||
|
||||
// the third column is the line number so check it first
|
||||
if (parent->child(i, 2)->text() == list[2]->text())
|
||||
|
@ -176,11 +179,18 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
|
|||
// the second column is the severity so check it next
|
||||
if (parent->child(i, 1)->text() == list[1]->text())
|
||||
{
|
||||
// the forth column is the message so check it last
|
||||
// the fourth column is the message so check it last
|
||||
if (parent->child(i, 3)->text() == list[3]->text())
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
const QString first = parent->child(i, 0)->text().toLower();
|
||||
const QString second = list[0]->text().toLower();
|
||||
if (first == second)
|
||||
return 0;
|
||||
#else
|
||||
// this row matches so don't add it
|
||||
return 0;
|
||||
#endif // _WIN32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue