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:
@@ -86,6 +86,16 @@ void QtStatusBar::setErrorCount(ErrorCountInfo errorCount)
|
||||
m_errorButton.setText(
|
||||
QString::number(errorCount.total) + " error" + (errorCount.total > 1 ? "s" : "") +
|
||||
(errorCount.fatal > 0 ? " (" + QString::number(errorCount.fatal) + " fatal)" : ""));
|
||||
|
||||
if (errorCount.fatal > 0)
|
||||
{
|
||||
m_errorButton.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; }");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_errorButton.setStyleSheet("QPushButton { color: #000000; margin-right: 0; spacing: none; }");
|
||||
}
|
||||
|
||||
m_errorButton.show();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -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"));
|
||||
|
||||
|
||||
@@ -47,8 +47,9 @@ private:
|
||||
MESSAGE = 1,
|
||||
FILE = 2,
|
||||
LINE = 3,
|
||||
INDEXED = 4,
|
||||
ID = 5
|
||||
COMMANDLINE = 4,
|
||||
INDEXED = 5,
|
||||
ID = 6
|
||||
};
|
||||
|
||||
void doRefreshView();
|
||||
|
||||
Reference in New Issue
Block a user