GUI: Remove Message-column from the error tree view.

The full detailed message is shown in the own panel below error tree.
This commit is contained in:
Kimmo Varis 2010-11-22 23:32:04 +02:00
parent 060131df2f
commit 20334815c6
1 changed files with 8 additions and 14 deletions

View File

@ -53,7 +53,7 @@ ResultsTree::ResultsTree(QWidget * parent) :
setModel(&mModel); setModel(&mModel);
QStringList labels; QStringList labels;
labels << tr("File") << tr("Severity") << tr("Line") << tr("Summary") << tr("Message"); labels << tr("File") << tr("Severity") << tr("Line") << tr("Summary");
mModel.setHorizontalHeaderLabels(labels); mModel.setHorizontalHeaderLabels(labels);
setExpandsOnDoubleClick(false); setExpandsOnDoubleClick(false);
setSortingEnabled(true); setSortingEnabled(true);
@ -191,7 +191,6 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
//TODO message has parameter names so we'll need changes to the core //TODO message has parameter names so we'll need changes to the core
//cppcheck so we can get proper translations //cppcheck so we can get proper translations
list << CreateNormalItem(tr(item.summary.toLatin1())); list << CreateNormalItem(tr(item.summary.toLatin1()));
list << CreateNormalItem(tr(item.message.toLatin1()));
// Check for duplicate rows and don't add them if found // Check for duplicate rows and don't add them if found
for (int i = 0; i < parent->rowCount(); i++) for (int i = 0; i < parent->rowCount(); i++)
@ -210,20 +209,15 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
// the fourth column is the summary so check it last // the fourth column is the summary so check it last
if (parent->child(i, 3)->text() == list[3]->text()) if (parent->child(i, 3)->text() == list[3]->text())
{ {
// the fifth column is the message so check it last
if (parent->child(i, 4)->text() == list[4]->text())
{
#if defined(_WIN32) #if defined(_WIN32)
const QString first = parent->child(i, 0)->text().toLower(); const QString first = parent->child(i, 0)->text().toLower();
const QString second = list[0]->text().toLower(); const QString second = list[0]->text().toLower();
if (first == second) if (first == second)
return 0;
#else
// this row matches so don't add it
return 0; return 0;
#else
// this row matches so don't add it
return 0;
#endif // _WIN32 #endif // _WIN32
}
} }
} }
} }
@ -940,7 +934,7 @@ bool ResultsTree::HasResults() const
void ResultsTree::Translate() void ResultsTree::Translate()
{ {
QStringList labels; QStringList labels;
labels << tr("File") << tr("Severity") << tr("Line") << tr("Summary") << tr("Message"); labels << tr("File") << tr("Severity") << tr("Line") << tr("Summary");
mModel.setHorizontalHeaderLabels(labels); mModel.setHorizontalHeaderLabels(labels);
//TODO go through all the errors in the tree and translate severity and message //TODO go through all the errors in the tree and translate severity and message
} }