ui: Explain differences of errors and how to fix them (issue #501)
* added help button next to filters in error table * added menu action Help -> Fixing Errors * added help button on indexing dialog * show help message after first time indexing with errors, if not seen already
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <QStandardItem>
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
#include "qt/element/QtHelpButton.h"
|
||||
#include "qt/element/QtTable.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
@@ -113,6 +114,28 @@ void QtErrorView::initView()
|
||||
m_showErrors = createFilterCheckbox("Errors", m_errorFilter.error, checkboxes);
|
||||
m_showNonIndexedFatals = createFilterCheckbox("Fatals in non-indexed files", m_errorFilter.unindexedFatal, checkboxes);
|
||||
m_showNonIndexedErrors = createFilterCheckbox("Errors in non-indexed files", m_errorFilter.unindexedError, checkboxes);
|
||||
|
||||
m_helpButton = new QtHelpButton("Fixing Errors",
|
||||
"Please read this if your project is showing errors after indexing.<br />"
|
||||
"There are different types of errors:"
|
||||
"<ul>"
|
||||
"<li><b>Fatals</b> cause the indexer to stop. All or big parts of indexed information for the involved "
|
||||
"source file is missing. <b>Make sure to fix all fatals.</li>"
|
||||
"<li><b>Errors</b> are issues that the indexer considers as wrong code. Usually the indexer is able to "
|
||||
"recover from these errors. The indexed information of the involved source file may not be complete, but "
|
||||
"it is still useful.</li>"
|
||||
"</ul>"
|
||||
"You need to edit your Sourcetrail project and reindex it to fix errors. The displayed error messages are "
|
||||
"generated by Sourcetrail's language specific indexers:"
|
||||
"<ul>"
|
||||
"<li><b>C/C++</b> error messages are generated by the <b>clang compiler frontend</b>.</li>"
|
||||
"<li><b>Java</b> error messages are generated by the <b>Eclipse JDT library</b>.</li>"
|
||||
"</ul>"
|
||||
"You should be able to find information about errors you are not familiar with online. <b>Double click</b> "
|
||||
"an error message in the table to select it for <b>copying</b>.<br />"
|
||||
);
|
||||
m_helpButton->setObjectName("help_button");
|
||||
checkboxes->addWidget(m_helpButton);
|
||||
}
|
||||
|
||||
checkboxes->addStretch();
|
||||
@@ -239,6 +262,14 @@ void QtErrorView::resetErrorLimit()
|
||||
errorFilterChanged(0, false);
|
||||
}
|
||||
|
||||
void QtErrorView::showErrorHelpMessage()
|
||||
{
|
||||
m_onQtThread([=]()
|
||||
{
|
||||
m_helpButton->click();
|
||||
});
|
||||
}
|
||||
|
||||
void QtErrorView::errorFilterChanged(int i)
|
||||
{
|
||||
errorFilterChanged(i, true);
|
||||
@@ -269,6 +300,8 @@ void QtErrorView::setStyleSheet() const
|
||||
m_showNonIndexedErrors->setPalette(palette);
|
||||
m_showNonIndexedFatals->setPalette(palette);
|
||||
|
||||
m_helpButton->setColor(QColor(ColorScheme::getInstance()->getColor("table/text/normal").c_str()));
|
||||
|
||||
m_table->updateRows();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user