logic: Hide non-fatal errors in unindexed files

* added database field indexed to error to tell if the error occured within an indexed file
* added checkbox to Preferences for showing them
This commit is contained in:
Eberhard Graether
2016-07-20 12:24:46 +02:00
parent f93b31a942
commit eb8808b624
26 changed files with 122 additions and 47 deletions
@@ -131,7 +131,7 @@ void FeatureController::handleMessage(MessageSearch* message)
case SearchMatch::COMMAND_ERROR:
{
MessageShowErrors msg(ErrorCountInfo(-1, 0));
MessageShowErrors msg(m_storageAccess->getErrorCount());
msg.setIsReplayed(message->isReplayed());
msg.dispatchImmediately();
return;
@@ -43,12 +43,14 @@ void StatusBarController::handleMessage(MessageFinishedParsing* message)
MessageStatus(status, false).dispatch();
}
void StatusBarController::handleMessage(MessageRefresh* message)
{
getView()->setErrorCount(m_storageAccess->getErrorCount());
}
void StatusBarController::handleMessage(MessageShowErrors* message)
{
if (message->errorCount.total >= 0)
{
getView()->setErrorCount(message->errorCount);
}
getView()->setErrorCount(message->errorCount);
}
void StatusBarController::handleMessage(MessageStatus* message)
@@ -8,6 +8,7 @@
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageClearErrorCount.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageStatus.h"
@@ -18,6 +19,7 @@ class StatusBarController
: public Controller
, public MessageListener<MessageClearErrorCount>
, public MessageListener<MessageFinishedParsing>
, public MessageListener<MessageRefresh>
, public MessageListener<MessageShowErrors>
, public MessageListener<MessageStatus>
{
@@ -32,6 +34,7 @@ public:
private:
virtual void handleMessage(MessageClearErrorCount* message);
virtual void handleMessage(MessageFinishedParsing* message);
virtual void handleMessage(MessageRefresh* message);
virtual void handleMessage(MessageShowErrors* message);
virtual void handleMessage(MessageStatus* message);