logic: Inspect errors during indexing (issue #235)

* Enabled errors table during indexing
* Store intermediate errors in StorageCache
* Open tab for errors if no tab yet
* "Show errors" for file disabled during indexing
* Hide indexing dialogs with ESC instead of stopping indexing
This commit is contained in:
Eberhard Graether
2018-12-06 15:46:42 +01:00
parent 09c6155583
commit b47a0b5b72
21 changed files with 231 additions and 59 deletions
@@ -4,6 +4,8 @@
#include <QLabel>
#include <QVariant>
#include "Application.h"
#include "Project.h"
#include "ResourcePaths.h"
#include "MessageErrorsForFile.h"
@@ -120,6 +122,12 @@ void QtCodeFileTitleBar::setIsComplete(bool isComplete)
{
m_titleButton->setIsComplete(isComplete);
m_showErrorsButton->setVisible(!isComplete);
Project* project = Application::getInstance()->getCurrentProject().get();
if (project && project->isIndexing())
{
m_showErrorsButton->setVisible(false);
}
}
void QtCodeFileTitleBar::setIsIndexed(bool isIndexed)
-4
View File
@@ -160,8 +160,6 @@ void QtStatusBar::showIndexingProgress(size_t progressPercent)
m_indexingStatus->show();
m_vlineIndexing->show();
m_errorButton.setEnabled(false);
m_indexingProgress->setValue(progressPercent);
}
@@ -169,8 +167,6 @@ void QtStatusBar::hideIndexingProgress()
{
m_indexingStatus->hide();
m_vlineIndexing->hide();
m_errorButton.setEnabled(true);
}
void QtStatusBar::resizeEvent(QResizeEvent* event)
+5
View File
@@ -539,6 +539,11 @@ QtIndexingDialog* QtDialogView::createWindow()
connect(window, &QtIndexingDialog::visibleChanged, this, &QtDialogView::dialogVisibilityChanged);
if (m_mainWindow)
{
connect(m_mainWindow, &QtMainWindow::hideIndexingDialog, window, &QtWindow::handleClosePress);
}
m_windowStack.pushWindow(window);
if (!m_dialogsVisible)
+12 -1
View File
@@ -401,6 +401,17 @@ void QtIndexingDialog::handleNext()
}
void QtIndexingDialog::handleClose()
{
if (m_type == DIALOG_INDEXING || m_type == DIALOG_PROGRESS || m_type == DIALOG_UNKNOWN_PROGRESS)
{
emit visibleChanged(false);
return;
}
QtWindow::handleClose();
}
void QtIndexingDialog::handleCancelPress()
{
if (m_type == DIALOG_INDEXING)
{
@@ -543,7 +554,7 @@ void QtIndexingDialog::addButtons(QBoxLayout* layout)
m_closeButton = new QPushButton("Cancel");
m_closeButton->setObjectName("windowButton");
connect(m_closeButton, &QPushButton::clicked, this, &QtIndexingDialog::handleClosePress);
connect(m_closeButton, &QPushButton::clicked, this, &QtIndexingDialog::handleCancelPress);
QHBoxLayout* buttons = new QHBoxLayout();
buttons->addWidget(m_closeButton);
+3
View File
@@ -61,6 +61,9 @@ protected:
virtual void handleNext() override;
virtual void handleClose() override;
private slots:
void handleCancelPress();
private:
void setType(DialogType type);
+1
View File
@@ -493,6 +493,7 @@ void QtMainWindow::keyPressEvent(QKeyEvent* event)
case Qt::Key_Escape:
emit hideScreenSearch();
emit hideIndexingDialog();
break;
case Qt::Key_Slash:
+1
View File
@@ -90,6 +90,7 @@ public:
signals:
void showScreenSearch();
void hideScreenSearch();
void hideIndexingDialog();
protected:
virtual void showEvent(QShowEvent* event) override;