data: Save command line info for CXX indexer commands to errors and show within errors table (issue #351)
bug id = 351
This commit is contained in:
@@ -79,15 +79,16 @@ void QtErrorView::initView()
|
||||
m_table->setItemDelegate(new SelectableDelegate());
|
||||
|
||||
// Setup Table Headers
|
||||
m_model->setColumnCount(6);
|
||||
m_table->setColumnWidth(COLUMN::TYPE, 70);
|
||||
m_model->setColumnCount(7);
|
||||
m_table->setColumnWidth(COLUMN::TYPE, 80);
|
||||
m_table->setColumnWidth(COLUMN::MESSAGE, 450);
|
||||
m_table->setColumnWidth(COLUMN::FILE, 300);
|
||||
m_table->setColumnWidth(COLUMN::LINE, 50);
|
||||
m_table->setColumnWidth(COLUMN::COMMANDLINE, 120);
|
||||
m_table->setColumnHidden(COLUMN::ID, true);
|
||||
|
||||
QStringList headers;
|
||||
headers << "Type" << "Message" << "File" << "Line" << "Indexed";
|
||||
headers << "Type" << "Message" << "File" << "Line" << "Command Line" << "Indexed";
|
||||
m_model->setHorizontalHeaderLabels(headers);
|
||||
|
||||
connect(m_table->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
||||
@@ -299,16 +300,19 @@ void QtErrorView::addErrorToTable(const ErrorInfo& error)
|
||||
}
|
||||
|
||||
m_model->setItem(rowNumber, COLUMN::TYPE, new QStandardItem(error.fatal ? "FATAL" : "ERROR"));
|
||||
m_model->item(rowNumber, COLUMN::TYPE)->setForeground(QBrush(Qt::red));
|
||||
m_model->item(rowNumber, COLUMN::TYPE)->setTextAlignment(Qt::AlignCenter);
|
||||
if (error.fatal)
|
||||
{
|
||||
m_model->item(rowNumber, COLUMN::TYPE)->setForeground(QBrush(Qt::red));
|
||||
}
|
||||
m_model->item(rowNumber, COLUMN::TYPE)->setIcon(s_errorIcon);
|
||||
|
||||
m_model->setItem(rowNumber, COLUMN::MESSAGE, new QStandardItem(error.message.c_str()));
|
||||
m_model->item(rowNumber, COLUMN::MESSAGE)->setIcon(s_errorIcon);
|
||||
|
||||
m_model->setItem(rowNumber, COLUMN::FILE, new QStandardItem(error.filePath.str().c_str()));
|
||||
m_model->item(rowNumber, COLUMN::FILE)->setToolTip(error.filePath.str().c_str());
|
||||
|
||||
m_model->setItem(rowNumber, COLUMN::LINE, new QStandardItem(QString::number(error.lineNumber)));
|
||||
m_model->setItem(rowNumber, COLUMN::COMMANDLINE, new QStandardItem(error.commandline.c_str()));
|
||||
|
||||
m_model->setItem(rowNumber, COLUMN::INDEXED, new QStandardItem(error.indexed ? "yes" : "no"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user