data: saving errors to Storage

* saving errors in separate sqlite table
* use MessageShowErrors to show the errors in the UI
* show error count permanently in the right side of the status bar with click to show
* fixed clicking of error locations
* fixed expanding of files with errors
This commit is contained in:
Eberhard Graether
2015-11-04 12:00:28 +01:00
parent 78259c7123
commit 9f684ad9f5
30 changed files with 301 additions and 92 deletions
@@ -0,0 +1,20 @@
#ifndef MESSAGE_SHOW_ERRORS_H
#define MESSAGE_SHOW_ERRORS_H
#include "utility/messaging/Message.h"
class MessageShowErrors
: public Message<MessageShowErrors>
{
public:
MessageShowErrors()
{
}
static const std::string getStaticType()
{
return "MessageShowErrors";
}
};
#endif // MESSAGE_SHOW_ERRORS_H
@@ -9,10 +9,9 @@ class MessageShowFile
: public Message<MessageShowFile>
{
public:
MessageShowFile(const FilePath& filePath, uint startLineNumber, uint endLineNumber)
MessageShowFile(const FilePath& filePath, bool showErrors)
: filePath(filePath)
, startLineNumber(startLineNumber)
, endLineNumber(endLineNumber)
, showErrors(showErrors)
{
}
@@ -22,8 +21,7 @@ public:
}
const FilePath filePath;
const uint startLineNumber;
const uint endLineNumber;
const bool showErrors;
};
#endif // MESSAGE_SHOW_FILE_H
+12
View File
@@ -7,6 +7,7 @@
#include "boost/date_time/posix_time/posix_time.hpp"
#include "utility/file/FilePath.h"
#include "utility/math/Vector2.h"
#include "utility/TimePoint.h"
@@ -81,4 +82,15 @@ std::vector<std::string> utility::toStrings(const std::vector<T>& d)
return v;
}
template<>
inline std::vector<std::string> utility::toStrings<FilePath>(const std::vector<FilePath>& d)
{
std::vector<std::string> v;
for (const FilePath& t : d)
{
v.push_back(t.str());
}
return v;
}
#endif // UTILITY_H