diff --git a/CMakeLists.txt b/CMakeLists.txt
index 446460ef..a1ea7635 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,6 @@ set(CMAKE_BUILD_TYPE_INIT "Release")
#RPATH
if(UNIX AND NOT APPLE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib/:$$ORIGIN/lib/")
include(cmake/external.cmake)
@@ -367,7 +366,6 @@ create_source_groups(${APP_FILES})
target_link_libraries(${APP_PROJECT_NAME} ${LIB_GUI_PROJECT_NAME} ${LIB_CXX_PROJECT_NAME} ${LIB_JAVA_PROJECT_NAME} ${LIB_PROJECT_NAME} ${LIB_LICENSE_PROJECT_NAME})
-
set_property(
TARGET ${APP_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
diff --git a/bin/app/data/color_schemes/bad_rainbow.xml b/bin/app/data/color_schemes/bad_rainbow.xml
index 0035d076..e53ff353 100644
--- a/bin/app/data/color_schemes/bad_rainbow.xml
+++ b/bin/app/data/color_schemes/bad_rainbow.xml
@@ -393,4 +393,26 @@
+
+ #272728
+
+
+ white
+ black
+
+
+ darkgrey
+ white
+
+
+ #343434
+ white
+
+
+
+ #272728
+ white
+ #878787
+ #878787
+
diff --git a/bin/app/data/color_schemes/bright.xml b/bin/app/data/color_schemes/bright.xml
index 3ceeb985..058c87f7 100644
--- a/bin/app/data/color_schemes/bright.xml
+++ b/bin/app/data/color_schemes/bright.xml
@@ -359,4 +359,26 @@
+
+ white
+
+
+ black
+ white
+
+
+ white
+ grey
+
+
+ #F1F1F1
+ grey
+
+
+
+ white
+ black
+ #878787
+ #878787
+
diff --git a/bin/app/data/color_schemes/dark.xml b/bin/app/data/color_schemes/dark.xml
index a74b07bd..47a74c48 100644
--- a/bin/app/data/color_schemes/dark.xml
+++ b/bin/app/data/color_schemes/dark.xml
@@ -388,4 +388,26 @@
+
+ #272728
+
+
+ white
+ black
+
+
+ darkgrey
+ white
+
+
+ #343434
+ white
+
+
+
+ #272728
+ white
+ #878787
+ #878787
+
diff --git a/bin/app/data/gui/error_view/error_view.css b/bin/app/data/gui/error_view/error_view.css
new file mode 100644
index 00000000..75dbb52f
--- /dev/null
+++ b/bin/app/data/gui/error_view/error_view.css
@@ -0,0 +1,90 @@
+QTableView {
+ color: ;
+ background-color: ;
+ alternate-background-color: ;
+ border-radius: 10px;
+ border: 1px solid ;
+ margin: 10px;
+ padding-right: 10px;
+ font-size: px;
+}
+
+QFrame {
+ background-color: ;
+}
+
+QTableView::item {
+ border-left: 1px solid ;
+}
+
+QTableView::item:selected {
+ color: ;
+ background-color: ;
+ alternate-background-color: ;
+}
+
+QHeaderView {
+ background-color: transparent;
+}
+
+QHeaderView::section:horizontal {
+ background-color: transparent;
+ border: none;
+ border-bottom: 1px solid ;
+ border-left: 1px solid ;
+ color: ;
+ font-size: px;
+ font-weight: bold;
+ padding: 1px 6px;
+ height: px;;
+}
+
+
+QCheckBox {
+ color: ;
+ border-color: ;
+ /*background-color: ;*/
+}
+
+QHeaderView::section:vertical {
+ background-color: transparent;
+ border: none;
+ color: ;
+ font-size: px;
+ padding-right: 5px;
+ padding-left: 5px;
+}
+
+QScrollBar:vertical {
+}
+
+QScrollBar::handle:vertical {
+ min-height: 20px;
+}
+
+QScrollBar::add-line:vertical {
+ height: 20px;
+ subcontrol-position: bottom;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::sub-line:vertical {
+ height: 20px;
+ subcontrol-position: top;
+ subcontrol-origin: margin;
+}
+QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
+ width: 3px;
+ height: 3px;
+ background: white;
+}
+
+QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
+ background: none;
+}
+
+QTableView QTableCornerButton::section {
+ background-color: ;
+ border-bottom: 1px solid ;
+ border-top-left-radius: 10px;
+}
diff --git a/bin/app/data/gui/main.css b/bin/app/data/gui/main.css
index 7dbabac3..30784c2d 100644
--- a/bin/app/data/gui/main.css
+++ b/bin/app/data/gui/main.css
@@ -3,3 +3,4 @@ QToolTip {
color: black;
font-size: px;
}
+
diff --git a/bin/app/data/gui/tabbed_view/tabbed_view.css b/bin/app/data/gui/tabbed_view/tabbed_view.css
new file mode 100644
index 00000000..3dcb9b22
--- /dev/null
+++ b/bin/app/data/gui/tabbed_view/tabbed_view.css
@@ -0,0 +1,31 @@
+QTabWidget::tab-bar {
+ alignment: left;
+}
+
+QTabBar::tab {
+ background-color: ;
+ color: ;
+ padding: 12px 75px 5px 12px;
+ border: 0px;
+ border-bottom: 4px solid ;
+ /*font-size: px;*/
+ /*font-weight: bold;*/
+}
+
+QTabBar::tab:hover {
+ border-bottom: 4px solid ;
+}
+
+QTabBar::tab:selected {
+ border-bottom: 4px solid ;
+ color: ;
+}
+
+QTabWidget::pane {
+ top: 0px;
+ background: ;
+ color: ;
+ border: 0px;
+ margin: 0px;
+ padding: 0px;
+}
diff --git a/bin/app/data/projects/tictactoe/src/field.cpp b/bin/app/data/projects/tictactoe/src/field.cpp
index d87128a8..da8ca996 100644
--- a/bin/app/data/projects/tictactoe/src/field.cpp
+++ b/bin/app/data/projects/tictactoe/src/field.cpp
@@ -8,7 +8,7 @@ Field::Token Field::Opponent( Token token ) {
} else if (token == PlayerB){
return PlayerA;
} else {
- return None;
+ return Non;
}
}
@@ -100,7 +100,7 @@ bool Field::InRange( const Move& move ) const {
}
bool Field::IsEmpty( const Move& move ) const {
- return grid_[move.row][move.col] == None;
+ return grid[move.row][move.col] == None;
}
bool Field::IsFull() const {
diff --git a/bin/app/data/projects/tictactoe/src/human_player.cpp b/bin/app/data/projects/tictactoe/src/human_player.cpp
index 4357d897..898ac14c 100644
--- a/bin/app/data/projects/tictactoe/src/human_player.cpp
+++ b/bin/app/data/projects/tictactoe/src/human_player.cpp
@@ -11,7 +11,7 @@ HumanPlayer::~HumanPlayer() {
Field::Move HumanPlayer::Turn( const Field& field ) const {
Field::Move move;
- io::stringOut(name_);
+ io::stringOu(name_);
io::stringOut("\n");
do {
@@ -33,13 +33,13 @@ Field::Move HumanPlayer::Input() const {
io::stringOut("Insert column: ");
move.col = io::numberIn();
- io::stringOut("\n");
+ io::tringOut("\n");
return move;
}
bool HumanPlayer::Check( const Field& field, const Field::Move& move ) const {
if ( !field.InRange( move ) ) {
- io::stringOut("Wrong input!\n");
+ io::stringOut("Wrong input!\n")
return false;
} else if ( !field.IsEmpty( move ) ) {
io::stringOut("Is occupied!\n");
diff --git a/bin/app/data/projects/tictactoe/src/tictactoe.cpp b/bin/app/data/projects/tictactoe/src/tictactoe.cpp
index d21a1025..95882df7 100644
--- a/bin/app/data/projects/tictactoe/src/tictactoe.cpp
+++ b/bin/app/data/projects/tictactoe/src/tictactoe.cpp
@@ -1,6 +1,6 @@
#include "tictactoe.h"
-#include "artificial_player.h"
+#include "artificia_player.h"
#include "human_player.h"
#include "io.h"
diff --git a/bin/app/user/ApplicationSettings_template.xml b/bin/app/user/ApplicationSettings_template.xml
index 69878893..54ac0009 100644
--- a/bin/app/user/ApplicationSettings_template.xml
+++ b/bin/app/user/ApplicationSettings_template.xml
@@ -29,8 +29,6 @@
-
-
diff --git a/cmake/pre_install_linux.cmake b/cmake/pre_install_linux.cmake
index 02b04ebb..7c75bc9a 100644
--- a/cmake/pre_install_linux.cmake
+++ b/cmake/pre_install_linux.cmake
@@ -1,21 +1,33 @@
+#pre install script
+function(Print text)
+ execute_process(
+ COMMAND echo ${text}
+ )
+endfunction()
+
+function(Run)
+ execute_process(
+ COMMAND ${ARGV}
+ )
+endfunction()
# upx
-set(upxPath ${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release)
+ set(upxPath ${CMAKE_CURRENT_LIST_DIR}/../bin/app/Release)
-execute_process(
- COMMAND ${upxPath}/Coati -z /home/vagrant/dev/license.txt
-)
+ execute_process(
+ COMMAND ${upxPath}/Coati -z /home/vagrant/dev/license.txt
+ )
-execute_process(
- COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/tictactoe/tictactoe.coatiproject
-)
+ execute_process(
+ COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/tictactoe/tictactoe.coatiproject
+ )
-execute_process(
- COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/tutorial/tutorial.coatiproject
-)
+ execute_process(
+ COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/tutorial/tutorial.coatiproject
+ )
#execute_process(
- #COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/javaparser/javaparser.coatiproject
+ #COMMAND ${upxPath}/Coati -f -d ${upxPath}/../data/projects/javaparser/javaparser.coatiproject
#)
#SET (NO_UPX 1)
@@ -29,11 +41,14 @@ if (NO_UPX)
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${upxPath}/Coati ${upxPath}/Coati_upx
)
else()
- message(STATUS "upx the app")
- execute_process(
- COMMAND rm ${upxPath}/Coati_upx
- COMMAND upx --brute ${upxPath}/Coati -o ${upxPath}/Coati_upx
- )
+ Print("Remove old Coati_upx")
+ Run(rm ${upxPath}/Coati_upx)
+ Print("upx Coati")
+ Run(upx --brute ${upxPath}/Coati -o ${upxPath}/Coati_upx)
+ Print("Remove old Coati_trial_upx")
+ Run(rm ${upxPath}/Coati_trial_upx)
+ Print("upx Coati_trial")
+ Run(upx --brute ${upxPath}/Coati_trial -o ${upxPath}/Coati_trial_upx)
endif()
#add_custom_command(
#OUTPUT Coati_upx
diff --git a/script/buildonly.sh b/script/buildonly.sh
index 5a695479..0464311a 100755
--- a/script/buildonly.sh
+++ b/script/buildonly.sh
@@ -38,7 +38,7 @@ then
elif [ "$1" = "package" ] || [ "$1" = "p" ]
then
cmake --build build/Release --target package
- mkdir -p distr && cp build/Release/Coati*.tar.gz distr #&& cp build/Release/Coati*.deb distr
+ mkdir -p distr && mv build/Release/Coati*.tar.gz distr #&& cp build/Release/Coati*.deb distr
echo "Packages copied into the distr folder"
else
echo "no arguments: first argument 'release' or 'debug', second argument 'test' for tests"
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index d1249364..f5a41c2d 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -17,13 +17,16 @@ add_files(
component/controller/CodeController.h
component/controller/Controller.cpp
component/controller/Controller.h
+ component/controller/ErrorController.cpp
+ component/controller/ErrorController.h
component/controller/FeatureController.cpp
component/controller/FeatureController.h
component/controller/GraphController.cpp
component/controller/GraphController.h
-
component/controller/IDECommunicationController.cpp
component/controller/IDECommunicationController.h
+ component/controller/LogController.cpp
+ component/controller/LogController.h
component/controller/NetworkFactory.cpp
component/controller/NetworkFactory.h
component/controller/RefreshController.cpp
@@ -43,11 +46,15 @@ add_files(
component/view/CompositeView.h
component/view/DialogView.cpp
component/view/DialogView.h
+ component/view/ErrorView.cpp
+ component/view/ErrorView.h
component/view/GraphView.cpp
component/view/GraphView.h
component/view/GraphViewStyle.cpp
component/view/GraphViewStyle.h
component/view/GraphViewStyleImpl.h
+ component/view/LogView.cpp
+ component/view/LogView.h
component/view/MainView.cpp
component/view/MainView.h
component/view/RefreshView.cpp
@@ -56,6 +63,8 @@ add_files(
component/view/SearchView.h
component/view/StatusBarView.cpp
component/view/StatusBarView.h
+ component/view/TabbedView.cpp
+ component/view/TabbedView.h
component/view/UndoRedoView.cpp
component/view/UndoRedoView.h
component/view/View.cpp
@@ -165,6 +174,7 @@ add_files(
data/DefinitionType.cpp
data/DefinitionType.h
data/ErrorCountInfo.h
+ data/ErrorFilter.h
data/ErrorInfo.h
data/HierarchyCache.cpp
data/HierarchyCache.h
@@ -260,6 +270,7 @@ add_files(
utility/messaging/type/MessageDeactivateEdge.h
utility/messaging/type/MessageDispatchWhenLicenseValid.h
utility/messaging/type/MessageEnteredLicense.h
+ utility/messaging/type/MessageErrorFilterChanged.h
utility/messaging/type/MessageFind.h
utility/messaging/type/MessageFinishedParsing.h
utility/messaging/type/MessageFlushUpdates.h
@@ -272,6 +283,7 @@ add_files(
utility/messaging/type/MessageInterruptTasks.h
utility/messaging/type/MessageLoadProject.h
utility/messaging/type/MessageMoveIDECursor.h
+ utility/messaging/type/MessageNewErrors.h
utility/messaging/type/MessagePluginPortChange.h
utility/messaging/type/MessageProjectEdit.h
utility/messaging/type/MessageProjectNew.h
diff --git a/src/lib/Project.cpp b/src/lib/Project.cpp
index e978a629..5082c352 100644
--- a/src/lib/Project.cpp
+++ b/src/lib/Project.cpp
@@ -289,10 +289,6 @@ bool Project::buildIndex(bool forceRefresh)
MessageStatus("Nothing to refresh, all files are up-to-date.").dispatch();
return false;
}
- else
- {
- MessageClearErrorCount().dispatch();
- }
if (Application::getInstance()->hasGUI())
{
@@ -304,6 +300,8 @@ bool Project::buildIndex(bool forceRefresh)
}
}
+ MessageClearErrorCount().dispatch();
+
if (forceRefresh)
{
m_storage->clear();
@@ -353,7 +351,7 @@ bool Project::buildIndex(bool forceRefresh)
taskRepeat->setTask(std::make_shared(storageProvider, m_storage));
}
- taskSequential->addTask(std::make_shared(m_storage.get(), fileRegister, m_dialogView));
+ taskSequential->addTask(std::make_shared(m_storage.get(), m_storageAccessProxy, fileRegister, m_dialogView));
Task::dispatch(taskSequential);
diff --git a/src/lib/component/ComponentFactory.cpp b/src/lib/component/ComponentFactory.cpp
index e18e0ecd..8ee028ad 100644
--- a/src/lib/component/ComponentFactory.cpp
+++ b/src/lib/component/ComponentFactory.cpp
@@ -2,14 +2,18 @@
#include "component/Component.h"
#include "component/controller/CodeController.h"
+#include "component/controller/ErrorController.h"
#include "component/controller/FeatureController.h"
#include "component/controller/GraphController.h"
+#include "component/controller/LogController.h"
#include "component/controller/RefreshController.h"
#include "component/controller/SearchController.h"
#include "component/controller/StatusBarController.h"
#include "component/controller/UndoRedoController.h"
#include "component/view/CodeView.h"
+#include "component/view/ErrorView.h"
#include "component/view/GraphView.h"
+#include "component/view/LogView.h"
#include "component/view/RefreshView.h"
#include "component/view/SearchView.h"
#include "component/view/StatusBarView.h"
@@ -43,6 +47,22 @@ std::shared_ptr ComponentFactory::createCodeComponent(ViewLayout* vie
return std::make_shared(view, controller);
}
+std::shared_ptr ComponentFactory::createErrorComponent(ViewLayout* viewLayout)
+{
+ std::shared_ptr view = m_viewFactory->createErrorView(viewLayout);
+ std::shared_ptr controller = std::make_shared(m_storageAccess);
+
+ return std::make_shared(view, controller);
+}
+
+std::shared_ptr ComponentFactory::createLogComponent(ViewLayout* viewLayout)
+{
+ std::shared_ptr view = m_viewFactory->createLogView(viewLayout);
+ std::shared_ptr controller = std::make_shared(m_storageAccess);
+
+ return std::make_shared(view, controller);
+}
+
std::shared_ptr ComponentFactory::createFeatureComponent()
{
std::shared_ptr controller = std::make_shared(m_storageAccess);
diff --git a/src/lib/component/ComponentFactory.h b/src/lib/component/ComponentFactory.h
index 40beb2c0..93c6759e 100644
--- a/src/lib/component/ComponentFactory.h
+++ b/src/lib/component/ComponentFactory.h
@@ -19,8 +19,10 @@ public:
ViewFactory* getViewFactory() const;
std::shared_ptr createCodeComponent(ViewLayout* viewLayout);
+ std::shared_ptr createErrorComponent(ViewLayout* viewLayout);
std::shared_ptr createFeatureComponent();
std::shared_ptr createGraphComponent(ViewLayout* viewLayout);
+ std::shared_ptr createLogComponent(ViewLayout* viewLayout);
std::shared_ptr createRefreshComponent(ViewLayout* viewLayout);
std::shared_ptr createSearchComponent(ViewLayout* viewLayout);
std::shared_ptr createStatusBarComponent(ViewLayout* viewLayout);
diff --git a/src/lib/component/ComponentManager.cpp b/src/lib/component/ComponentManager.cpp
index e85ce899..c21ef1cd 100644
--- a/src/lib/component/ComponentManager.cpp
+++ b/src/lib/component/ComponentManager.cpp
@@ -7,8 +7,10 @@
#include "component/view/CompositeView.h"
#include "component/view/DialogView.h"
#include "component/view/GraphView.h"
+#include "component/view/LogView.h"
#include "component/view/RefreshView.h"
#include "component/view/SearchView.h"
+#include "component/view/TabbedView.h"
#include "component/view/UndoRedoView.h"
#include "component/view/ViewFactory.h"
@@ -53,6 +55,16 @@ void ComponentManager::setup(ViewLayout* viewLayout)
m_components.push_back(featureComponent);
m_dialogView = m_componentFactory->getViewFactory()->createDialogView(viewLayout);
+
+ std::shared_ptr tabbedView =
+ m_componentFactory->getViewFactory()->createTabbedView(viewLayout, "Log");
+ m_tabbedViews.push_back(tabbedView);
+
+ std::shared_ptr errorComponent = m_componentFactory->createErrorComponent(tabbedView.get());
+ m_components.push_back(errorComponent);
+
+ //std::shared_ptr logComponent = m_componentFactory->createLogComponent(tabbedView.get());
+ //m_components.push_back(logComponent);
}
void ComponentManager::clearComponents()
@@ -84,6 +96,11 @@ void ComponentManager::refreshViews()
{
view->refreshView();
}
+
+ for (std::shared_ptr view : m_tabbedViews)
+ {
+ view->refreshView();
+ }
}
DialogView* ComponentManager::getDialogView() const
diff --git a/src/lib/component/ComponentManager.h b/src/lib/component/ComponentManager.h
index aae2a290..46450be7 100644
--- a/src/lib/component/ComponentManager.h
+++ b/src/lib/component/ComponentManager.h
@@ -11,6 +11,7 @@ class CompositeView;
class DialogView;
class NetworkFactory;
class StorageAccess;
+class TabbedView;
class View;
class ViewFactory;
class ViewLayout;
@@ -36,6 +37,7 @@ private:
std::shared_ptr m_componentFactory;
std::vector> m_compositeViews;
+ std::vector> m_tabbedViews;
std::vector> m_components;
std::shared_ptr m_dialogView;
diff --git a/src/lib/component/controller/CodeController.cpp b/src/lib/component/controller/CodeController.cpp
index b3ef761f..6d680b6f 100644
--- a/src/lib/component/controller/CodeController.cpp
+++ b/src/lib/component/controller/CodeController.cpp
@@ -272,16 +272,24 @@ void CodeController::handleMessage(MessageShowErrors* message)
{
TRACE("code errors");
- std::vector errors;
- m_collection = m_storageAccess->getErrorTokenLocations(&errors);
- std::vector snippets = getSnippetsForCollection(m_collection);
-
CodeView* view = getView();
- view->clear();
- view->setErrorInfos(errors);
- view->showCodeSnippets(snippets, std::vector());
+ if (!view->showsErrors() || !message->errorId)
+ {
+ std::vector errors;
+ m_collection = m_storageAccess->getErrorTokenLocations(&errors);
+ std::vector snippets = getSnippetsForCollection(m_collection);
- showContents(message);
+ view->clear();
+ view->setErrorInfos(errors);
+ view->showCodeSnippets(snippets, std::vector());
+
+ showContents(message);
+ }
+
+ if (message->errorId)
+ {
+ view->showActiveSnippet(std::vector(1, message->errorId), m_collection, true);
+ }
}
void CodeController::handleMessage(MessageSearchFullText* message)
diff --git a/src/lib/component/controller/ErrorController.cpp b/src/lib/component/controller/ErrorController.cpp
new file mode 100644
index 00000000..b6eebfc5
--- /dev/null
+++ b/src/lib/component/controller/ErrorController.cpp
@@ -0,0 +1,68 @@
+#include "component/controller/ErrorController.h"
+
+#include "data/access/StorageAccess.h"
+
+ErrorController::ErrorController(StorageAccess* storageAccess)
+ : m_storageAccess(storageAccess)
+{
+}
+
+ErrorController::~ErrorController()
+{
+}
+
+void ErrorController::handleMessage(MessageClearErrorCount* message)
+{
+ clear();
+}
+
+void ErrorController::handleMessage(MessageFinishedParsing* message)
+{
+ clear();
+
+ auto errors = m_storageAccess->getAllErrors();
+
+ for (const StorageError& error : errors)
+ {
+ getView()->addError(error);
+ }
+}
+
+void ErrorController::handleMessage(MessageNewErrors* message)
+{
+ for (const StorageError& error : message->errors)
+ {
+ getView()->addError(error);
+ }
+
+ getView()->showDockWidget();
+}
+
+void ErrorController::handleMessage(MessageShowErrors* message)
+{
+ if (message->errorId)
+ {
+ return;
+ }
+
+ clear();
+
+ auto errors = m_storageAccess->getAllErrors();
+
+ for (const StorageError& error : errors)
+ {
+ getView()->addError(error);
+ }
+
+ getView()->showDockWidget();
+}
+
+ErrorView* ErrorController::getView() const
+{
+ return Controller::getView();
+}
+
+void ErrorController::clear()
+{
+ getView()->clear();
+}
diff --git a/src/lib/component/controller/ErrorController.h b/src/lib/component/controller/ErrorController.h
new file mode 100644
index 00000000..198fdcfc
--- /dev/null
+++ b/src/lib/component/controller/ErrorController.h
@@ -0,0 +1,39 @@
+#ifndef ERROR_CONTROLLER_H
+#define ERROR_CONTROLLER_H
+
+#include "utility/messaging/MessageListener.h"
+#include "utility/messaging/type/MessageClearErrorCount.h"
+#include "utility/messaging/type/MessageFinishedParsing.h"
+#include "utility/messaging/type/MessageNewErrors.h"
+#include "utility/messaging/type/MessageShowErrors.h"
+
+#include "component/controller/Controller.h"
+#include "component/view/ErrorView.h"
+
+class StorageAccess;
+
+class ErrorController
+ : public Controller
+ , public MessageListener
+ , public MessageListener
+ , public MessageListener
+ , public MessageListener
+{
+public:
+ ErrorController(StorageAccess* storageAccess);
+ ~ErrorController();
+
+private:
+ virtual void handleMessage(MessageClearErrorCount* message);
+ virtual void handleMessage(MessageFinishedParsing* message);
+ virtual void handleMessage(MessageNewErrors* message);
+ virtual void handleMessage(MessageShowErrors* message);
+
+ ErrorView* getView() const;
+
+ virtual void clear();
+
+ StorageAccess* m_storageAccess;
+};
+
+#endif // ERROR_CONTROLLER_H
diff --git a/src/lib/component/controller/FeatureController.cpp b/src/lib/component/controller/FeatureController.cpp
index d8c006ff..b9aeb72f 100644
--- a/src/lib/component/controller/FeatureController.cpp
+++ b/src/lib/component/controller/FeatureController.cpp
@@ -137,7 +137,7 @@ void FeatureController::handleMessage(MessageSearch* message)
case SearchMatch::COMMAND_ERROR:
{
- MessageShowErrors msg(m_storageAccess->getErrorCount());
+ MessageShowErrors msg(m_storageAccess->getFilteredErrorCount());
msg.setIsReplayed(message->isReplayed());
msg.dispatchImmediately();
return;
diff --git a/src/lib/component/controller/LogController.cpp b/src/lib/component/controller/LogController.cpp
new file mode 100644
index 00000000..ba621da4
--- /dev/null
+++ b/src/lib/component/controller/LogController.cpp
@@ -0,0 +1,22 @@
+#include "component/controller/LogController.h"
+
+#include "data/access/StorageAccess.h"
+
+LogController::LogController(StorageAccess* storageAccess)
+ : m_storageAccess(storageAccess)
+{
+}
+
+LogController::~LogController()
+{
+}
+
+LogView* LogController::getView() const
+{
+ return Controller::getView();
+}
+
+void LogController::clear()
+{
+ getView()->clear();
+}
diff --git a/src/lib/component/controller/LogController.h b/src/lib/component/controller/LogController.h
new file mode 100644
index 00000000..80e479fe
--- /dev/null
+++ b/src/lib/component/controller/LogController.h
@@ -0,0 +1,24 @@
+#ifndef LOG_CONTROLLER_H
+#define LOG_CONTROLLER_H
+
+#include "component/controller/Controller.h"
+#include "component/view/LogView.h"
+
+class StorageAccess;
+
+class LogController
+ : public Controller
+{
+public:
+ LogController(StorageAccess* storageAccess);
+ ~LogController();
+
+private:
+ LogView* getView() const;
+
+ virtual void clear();
+
+ StorageAccess* m_storageAccess;
+};
+
+#endif // LOG_CONTROLLER_H
diff --git a/src/lib/component/controller/StatusBarController.cpp b/src/lib/component/controller/StatusBarController.cpp
index f86c7731..757fef71 100644
--- a/src/lib/component/controller/StatusBarController.cpp
+++ b/src/lib/component/controller/StatusBarController.cpp
@@ -31,17 +31,22 @@ void StatusBarController::handleMessage(MessageClearErrorCount* message)
void StatusBarController::handleMessage(MessageFinishedParsing* message)
{
- ErrorCountInfo errorCount = m_storageAccess->getErrorCount();
+ ErrorCountInfo errorCount = m_storageAccess->getFilteredErrorCount();
getView()->setErrorCount(errorCount);
}
void StatusBarController::handleMessage(MessageRefresh* message)
{
- getView()->setErrorCount(m_storageAccess->getErrorCount());
+ getView()->setErrorCount(m_storageAccess->getFilteredErrorCount());
}
void StatusBarController::handleMessage(MessageShowErrors* message)
{
+ if (message->errorId)
+ {
+ return;
+ }
+
getView()->setErrorCount(message->errorCount);
}
diff --git a/src/lib/component/view/CodeView.h b/src/lib/component/view/CodeView.h
index 5873d7ca..8ad7f6de 100644
--- a/src/lib/component/view/CodeView.h
+++ b/src/lib/component/view/CodeView.h
@@ -31,6 +31,7 @@ public:
virtual void clear() = 0;
virtual void setErrorInfos(const std::vector& errorInfos) = 0;
+ virtual bool showsErrors() const = 0;
virtual void showCodeSnippets(const std::vector& snippets, const std::vector& activeTokenIds) = 0;
virtual void addCodeSnippets(const std::vector& snippets, bool insert) = 0;
diff --git a/src/lib/component/view/CompositeView.cpp b/src/lib/component/view/CompositeView.cpp
index f4b26c2b..450a042c 100644
--- a/src/lib/component/view/CompositeView.cpp
+++ b/src/lib/component/view/CompositeView.cpp
@@ -1,5 +1,7 @@
#include "component/view/CompositeView.h"
+#include
+
CompositeView::CompositeView(ViewLayout* viewLayout, CompositeDirection direction, const std::string& name)
: View(viewLayout)
, m_direction(direction)
@@ -46,20 +48,8 @@ void CompositeView::removeView(View* view)
void CompositeView::showView(View* view)
{
- getViewLayout()->showView(view);
}
void CompositeView::hideView(View* view)
{
- getViewLayout()->hideView(view);
-}
-
-void CompositeView::loadLayout()
-{
- getViewLayout()->loadLayout();
-}
-
-void CompositeView::saveLayout()
-{
- getViewLayout()->saveLayout();
}
diff --git a/src/lib/component/view/CompositeView.h b/src/lib/component/view/CompositeView.h
index 92ebcf2d..e889af8e 100644
--- a/src/lib/component/view/CompositeView.h
+++ b/src/lib/component/view/CompositeView.h
@@ -35,9 +35,6 @@ public:
virtual void showView(View* view);
virtual void hideView(View* view);
- virtual void loadLayout();
- virtual void saveLayout();
-
private:
std::vector m_views;
CompositeDirection m_direction;
diff --git a/src/lib/component/view/ErrorView.cpp b/src/lib/component/view/ErrorView.cpp
new file mode 100644
index 00000000..c5fbf387
--- /dev/null
+++ b/src/lib/component/view/ErrorView.cpp
@@ -0,0 +1,20 @@
+#include "component/view/ErrorView.h"
+
+ErrorView::ErrorView(ViewLayout* viewLayout)
+ : View(viewLayout)
+{
+}
+
+ErrorView::~ErrorView()
+{
+}
+
+std::string ErrorView::getName() const
+{
+ return "Errors";
+}
+
+void ErrorView::showDockWidget()
+{
+ getViewLayout()->showView(this);
+}
diff --git a/src/lib/component/view/ErrorView.h b/src/lib/component/view/ErrorView.h
new file mode 100644
index 00000000..d4c1096f
--- /dev/null
+++ b/src/lib/component/view/ErrorView.h
@@ -0,0 +1,23 @@
+#ifndef ERROR_VIEW_H
+#define ERROR_VIEW_H
+
+#include "component/view/View.h"
+#include "data/StorageTypes.h"
+
+class ErrorView
+ : public View
+{
+public:
+ ErrorView(ViewLayout* viewLayout);
+ virtual ~ErrorView();
+
+ virtual std::string getName() const;
+
+ virtual void showDockWidget();
+
+ virtual void clear() = 0;
+
+ virtual void addError(const StorageError& error) = 0;
+};
+
+#endif // ERROR_VIEW_H
diff --git a/src/lib/component/view/GraphView.h b/src/lib/component/view/GraphView.h
index 791b2aa8..a2be79d0 100644
--- a/src/lib/component/view/GraphView.h
+++ b/src/lib/component/view/GraphView.h
@@ -1,6 +1,9 @@
#ifndef GRAPH_VIEW_H
#define GRAPH_VIEW_H
+#include
+
+#include "utility/math/Vector2.h"
#include "utility/types.h"
#include "component/view/View.h"
diff --git a/src/lib/component/view/LogView.cpp b/src/lib/component/view/LogView.cpp
new file mode 100644
index 00000000..4e98ee98
--- /dev/null
+++ b/src/lib/component/view/LogView.cpp
@@ -0,0 +1,15 @@
+#include "component/view/LogView.h"
+
+LogView::LogView(ViewLayout* viewLayout)
+ : View(viewLayout)
+{
+}
+
+LogView::~LogView()
+{
+}
+
+std::string LogView::getName() const
+{
+ return "Logs";
+}
diff --git a/src/lib/component/view/LogView.h b/src/lib/component/view/LogView.h
new file mode 100644
index 00000000..0c79fd39
--- /dev/null
+++ b/src/lib/component/view/LogView.h
@@ -0,0 +1,18 @@
+#ifndef LOG_VIEW_H
+#define LOG_VIEW_H
+
+#include "component/view/View.h"
+
+class LogView
+ : public View
+{
+public:
+ LogView(ViewLayout* viewLayout);
+ virtual ~LogView();
+
+ virtual std::string getName() const;
+
+ virtual void clear() = 0;
+};
+
+#endif // LOG_VIEW_H
diff --git a/src/lib/component/view/MainView.h b/src/lib/component/view/MainView.h
index 776b9e14..7f353767 100644
--- a/src/lib/component/view/MainView.h
+++ b/src/lib/component/view/MainView.h
@@ -13,6 +13,9 @@ public:
MainView();
virtual ~MainView();
+ virtual void loadLayout() = 0;
+ virtual void saveLayout() = 0;
+
virtual void hideStartScreen() = 0;
virtual void setTitle(const std::string& title) = 0;
virtual void activateWindow() = 0;
diff --git a/src/lib/component/view/TabbedView.cpp b/src/lib/component/view/TabbedView.cpp
new file mode 100644
index 00000000..eebb90f7
--- /dev/null
+++ b/src/lib/component/view/TabbedView.cpp
@@ -0,0 +1,51 @@
+#include "component/view/TabbedView.h"
+
+#include
+
+TabbedView::TabbedView(ViewLayout* viewLayout, const std::string& name)
+ : View(viewLayout)
+ , m_name(name)
+{
+}
+
+TabbedView::~TabbedView()
+{
+}
+
+const std::vector& TabbedView::getViews() const
+{
+ return m_views;
+}
+
+std::string TabbedView::getName() const
+{
+ return m_name;
+}
+
+void TabbedView::addView(View* view)
+{
+ m_views.push_back(view);
+
+ addViewWidget(view);
+}
+
+void TabbedView::removeView(View* view)
+{
+ std::vector::iterator it = std::find(m_views.begin(), m_views.end(), view);
+ if (it == m_views.end())
+ {
+ return;
+ }
+
+ m_views.erase(it);
+}
+
+void TabbedView::showView(View* view)
+{
+ getViewLayout()->showView(view);
+}
+
+void TabbedView::hideView(View* view)
+{
+ getViewLayout()->hideView(view);
+}
diff --git a/src/lib/component/view/TabbedView.h b/src/lib/component/view/TabbedView.h
new file mode 100644
index 00000000..9dc1017e
--- /dev/null
+++ b/src/lib/component/view/TabbedView.h
@@ -0,0 +1,37 @@
+#ifndef TABBED_VIEW_H
+#define TABBED_VIEW_H
+
+#include
+
+#include "component/view/View.h"
+#include "component/view/ViewLayout.h"
+
+class TabbedView
+ : public View
+ , public ViewLayout
+{
+public:
+
+ TabbedView(ViewLayout* viewLayout, const std::string& name);
+ virtual ~TabbedView();
+
+ const std::vector& getViews() const;
+
+ virtual void addViewWidget(View* view) = 0;
+
+ // View implementation
+ virtual std::string getName() const;
+
+ // ViewLayout implementation
+ virtual void addView(View* view);
+ virtual void removeView(View* view);
+
+ virtual void showView(View* view);
+ virtual void hideView(View* view);
+
+private:
+ std::vector m_views;
+ std::string m_name;
+};
+
+#endif // TABBED_VIEW_H
diff --git a/src/lib/component/view/View.h b/src/lib/component/view/View.h
index 170b5d69..ab84be42 100644
--- a/src/lib/component/view/View.h
+++ b/src/lib/component/view/View.h
@@ -6,7 +6,6 @@
#include "component/Component.h"
#include "component/view/ViewLayout.h"
-#include "utility/math/Vector2.h"
class ViewWidgetWrapper;
diff --git a/src/lib/component/view/ViewFactory.h b/src/lib/component/view/ViewFactory.h
index ff4094b0..b35974a3 100644
--- a/src/lib/component/view/ViewFactory.h
+++ b/src/lib/component/view/ViewFactory.h
@@ -7,11 +7,14 @@
class CodeView;
class DialogView;
+class ErrorView;
class GraphView;
class MainView;
+class LogView;
class RefreshView;
class SearchView;
class StatusBarView;
+class TabbedView;
class UndoRedoView;
class ViewLayout;
@@ -24,9 +27,12 @@ public:
virtual std::shared_ptr createMainView() const = 0;
virtual std::shared_ptr createCompositeView(
ViewLayout* viewLayout, CompositeView::CompositeDirection direction, const std::string& name) const = 0;
+ virtual std::shared_ptr createTabbedView(ViewLayout* viewLayout, const std::string& name) const = 0;
virtual std::shared_ptr createCodeView(ViewLayout* viewLayout) const = 0;
+ virtual std::shared_ptr createErrorView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr createGraphView(ViewLayout* viewLayout) const = 0;
+ virtual std::shared_ptr createLogView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr createRefreshView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr createSearchView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr createStatusBarView(ViewLayout* viewLayout) const = 0;
diff --git a/src/lib/component/view/ViewLayout.h b/src/lib/component/view/ViewLayout.h
index 488e8eb9..59b5e5e5 100644
--- a/src/lib/component/view/ViewLayout.h
+++ b/src/lib/component/view/ViewLayout.h
@@ -14,9 +14,6 @@ public:
virtual void showView(View* view) = 0;
virtual void hideView(View* view) = 0;
-
- virtual void loadLayout() = 0;
- virtual void saveLayout() = 0;
};
#endif // VIEW_LAYOUT_H
diff --git a/src/lib/data/ErrorFilter.h b/src/lib/data/ErrorFilter.h
new file mode 100644
index 00000000..5c0ff9e4
--- /dev/null
+++ b/src/lib/data/ErrorFilter.h
@@ -0,0 +1,50 @@
+#ifndef ERROR_FILTER_H
+#define ERROR_FILTER_H
+
+#include "data/ErrorInfo.h"
+#include "data/StorageTypes.h"
+
+struct ErrorFilter
+{
+ ErrorFilter()
+ : error(true)
+ , fatal(true)
+ , unindexedError(false)
+ , unindexedFatal(true)
+ {
+ }
+
+ bool filter(const ErrorInfo& info) const
+ {
+ if (!error && !info.isFatal && info.isIndexed)
+ return false;
+ if (!fatal && info.isFatal && info.isIndexed)
+ return false;
+ if (!unindexedError && !info.isFatal && !info.isIndexed)
+ return false;
+ if (!unindexedFatal && info.isFatal && !info.isIndexed)
+ return false;
+ return true;
+ }
+
+ bool filter(const StorageError& storageError) const
+ {
+ if (!error && !storageError.fatal && storageError.indexed)
+ return false;
+ if (!fatal && storageError.fatal && storageError.indexed)
+ return false;
+ if (!unindexedError && !storageError.fatal && !storageError.indexed)
+ return false;
+ if (!unindexedFatal && storageError.fatal && !storageError.indexed)
+ return false;
+ return true;
+ }
+
+ bool error;
+ bool fatal;
+
+ bool unindexedError;
+ bool unindexedFatal;
+};
+
+#endif // ERROR_FILTER_H
diff --git a/src/lib/data/ErrorInfo.h b/src/lib/data/ErrorInfo.h
index 1d60d913..63b230ff 100644
--- a/src/lib/data/ErrorInfo.h
+++ b/src/lib/data/ErrorInfo.h
@@ -9,14 +9,16 @@ struct ErrorInfo
ErrorInfo()
: id(0)
, isFatal(false)
+ , isIndexed(false)
{
}
- ErrorInfo(const std::string& message, const FilePath& filePath, Id id, bool isFatal)
+ ErrorInfo(const std::string& message, const FilePath& filePath, Id id, bool isFatal, bool isIndexed)
: message(message)
, filePath(filePath)
, id(id)
, isFatal(isFatal)
+ , isIndexed(isIndexed)
{
}
@@ -24,6 +26,7 @@ struct ErrorInfo
FilePath filePath;
Id id;
bool isFatal;
+ bool isIndexed;
};
#endif // ERROR_INFO_H
diff --git a/src/lib/data/IntermediateStorage.cpp b/src/lib/data/IntermediateStorage.cpp
index e19f7ebe..1f34658d 100644
--- a/src/lib/data/IntermediateStorage.cpp
+++ b/src/lib/data/IntermediateStorage.cpp
@@ -163,6 +163,7 @@ void IntermediateStorage::addCommentLocation(Id fileNodeId, uint startLine, uint
void IntermediateStorage::addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint startLine, uint startCol)
{
m_errors.push_back(StorageError(
+ 0,
message,
fatal,
indexed,
diff --git a/src/lib/data/PersistentStorage.cpp b/src/lib/data/PersistentStorage.cpp
index 521fefa9..b3482ac0 100644
--- a/src/lib/data/PersistentStorage.cpp
+++ b/src/lib/data/PersistentStorage.cpp
@@ -6,6 +6,8 @@
#include "utility/Cache.h"
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
+#include "utility/messaging/type/MessageClearErrorCount.h"
+#include "utility/messaging/type/MessageNewErrors.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/text/TextAccess.h"
@@ -24,7 +26,6 @@
#include "data/location/TokenLocationLine.h"
#include "data/parser/ParseLocation.h"
#include "data/type/DataType.h"
-#include "settings/ApplicationSettings.h"
PersistentStorage::PersistentStorage(const FilePath& dbPath)
: m_sqliteStorage(dbPath)
@@ -217,7 +218,7 @@ void PersistentStorage::forEachError(std::function(errors.begin() + m_preInjectionErrorCount, errors.end())).dispatchImmediately();
}
}
@@ -994,33 +994,6 @@ std::shared_ptr PersistentStorage::getTokenLocationsForLinesI
return getTokenLocationsForFile(filePath)->getFilteredByLines(firstLineNumber, lastLineNumber);
}
-std::shared_ptr PersistentStorage::getErrorTokenLocations(std::vector* errors) const
-{
- TRACE();
-
- std::shared_ptr errorCollection = std::make_shared();
-
- bool showExternalNonFatalErrors = ApplicationSettings::getInstance()->getShowExternalNonFatalErrors();
-
- std::vector storageErrors = m_sqliteStorage.getAllErrors();
- for (size_t i = 0; i < storageErrors.size(); i++)
- {
- const StorageError& error = storageErrors[i];
- if (error.fatal || error.indexed || showExternalNonFatalErrors)
- {
- // Set first bit to 1 to avoid collisions
- Id locationId = ~(~size_t(0) >> 1) + i;
-
- errorCollection->addTokenLocation(
- locationId, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber
- )->setType(LOCATION_ERROR);
- errors->push_back(ErrorInfo(error.message, error.filePath, i, error.fatal));
- }
- }
-
- return errorCollection;
-}
-
std::shared_ptr PersistentStorage::getCommentLocationsInFile(const FilePath& filePath) const
{
TRACE();
@@ -1066,29 +1039,6 @@ std::vector PersistentStorage::getFileInfosForFilePaths(const std::vec
return fileInfos;
}
-ErrorCountInfo PersistentStorage::getErrorCount() const
-{
- bool showExternalNonFatalErrors = ApplicationSettings::getInstance()->getShowExternalNonFatalErrors();
-
- ErrorCountInfo info;
-
- std::vector storageErrors = m_sqliteStorage.getAllErrors();
- for (const StorageError& error : storageErrors)
- {
- if (error.fatal || error.indexed || showExternalNonFatalErrors)
- {
- info.total++;
- }
-
- if (error.fatal)
- {
- info.fatal++;
- }
- }
-
- return info;
-}
-
StorageStats PersistentStorage::getStorageStats() const
{
TRACE();
@@ -1104,6 +1054,50 @@ StorageStats PersistentStorage::getStorageStats() const
return stats;
}
+ErrorCountInfo PersistentStorage::getErrorCount() const
+{
+ LOG_ERROR("This should never be called.");
+ return ErrorCountInfo();
+}
+
+ErrorCountInfo PersistentStorage::getFilteredErrorCount() const
+{
+ LOG_ERROR("This should never be called.");
+ return ErrorCountInfo();
+}
+
+std::vector PersistentStorage::getAllErrors() const
+{
+ return m_sqliteStorage.getAllErrors();
+}
+
+std::vector PersistentStorage::getFilteredErrors() const
+{
+ LOG_ERROR("This should never be called.");
+ return std::vector();
+}
+
+std::shared_ptr PersistentStorage::getErrorTokenLocations(std::vector* errors) const
+{
+ TRACE();
+
+ std::shared_ptr errorCollection = std::make_shared();
+
+ std::vector storageErrors = m_sqliteStorage.getAllErrors();
+ for (const StorageError& error : storageErrors)
+ {
+ // Set first bit to 1 to avoid collisions
+ Id locationId = ~(~size_t(0) >> 1) + error.id;
+
+ errorCollection->addTokenLocation(
+ locationId, error.id, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber
+ )->setType(LOCATION_ERROR);
+ errors->push_back(ErrorInfo(error.message, error.filePath, error.id, error.fatal, error.indexed));
+ }
+
+ return errorCollection;
+}
+
Id PersistentStorage::getFileNodeId(const FilePath& filePath) const
{
if (filePath.empty())
diff --git a/src/lib/data/PersistentStorage.h b/src/lib/data/PersistentStorage.h
index adbc0bfe..7a367f01 100644
--- a/src/lib/data/PersistentStorage.h
+++ b/src/lib/data/PersistentStorage.h
@@ -106,7 +106,6 @@ public:
const std::string& filePath, uint firstLineNumber, uint lastLineNumber
) const;
- virtual std::shared_ptr getErrorTokenLocations(std::vector* errors) const;
virtual std::shared_ptr getCommentLocationsInFile(const FilePath& filePath) const;
virtual std::shared_ptr getFileContent(const FilePath& filePath) const;
@@ -114,9 +113,16 @@ public:
virtual FileInfo getFileInfoForFilePath(const FilePath& filePath) const;
virtual std::vector getFileInfosForFilePaths(const std::vector& filePaths) const;
- virtual ErrorCountInfo getErrorCount() const;
virtual StorageStats getStorageStats() const;
+ virtual ErrorCountInfo getErrorCount() const;
+ virtual ErrorCountInfo getFilteredErrorCount() const;
+
+ virtual std::vector getAllErrors() const;
+ virtual std::vector getFilteredErrors() const;
+
+ virtual std::shared_ptr getErrorTokenLocations(std::vector* errors) const;
+
private:
Id getFileNodeId(const FilePath& filePath) const;
FilePath getFileNodePath(Id fileId) const;
diff --git a/src/lib/data/SqliteStorage.cpp b/src/lib/data/SqliteStorage.cpp
index 0a52e4de..d3eeac1f 100644
--- a/src/lib/data/SqliteStorage.cpp
+++ b/src/lib/data/SqliteStorage.cpp
@@ -217,7 +217,7 @@ Id SqliteStorage::addCommentLocation(Id fileNodeId, uint startLine, uint startCo
Id SqliteStorage::addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint lineNumber, uint columnNumber)
{
- std::string sanitizedMessage = utility::replace((fatal ? "Fatal: " : "Error: ") + message, "'", "''");
+ std::string sanitizedMessage = utility::replace(message, "'", "''");
// check for duplicate
CppSQLite3Statement stmt = m_database.compileStatement((
@@ -1072,6 +1072,7 @@ std::vector SqliteStorage::getAll(const std::string&
).c_str());
std::vector errors;
+ Id id = 1;
while (!q.eof())
{
const std::string message = q.getStringField(0, "");
@@ -1083,7 +1084,8 @@ std::vector SqliteStorage::getAll(const std::string&
if (lineNumber != -1 && columnNumber != -1)
{
- errors.push_back(StorageError(message, fatal, indexed, filePath, lineNumber, columnNumber));
+ errors.push_back(StorageError(id, message, fatal, indexed, filePath, lineNumber, columnNumber));
+ id++;
}
q.nextRow();
diff --git a/src/lib/data/StorageTypes.h b/src/lib/data/StorageTypes.h
index fe865cde..16461668 100644
--- a/src/lib/data/StorageTypes.h
+++ b/src/lib/data/StorageTypes.h
@@ -169,7 +169,8 @@ struct StorageCommentLocation
struct StorageError
{
StorageError()
- : message("")
+ : id(0)
+ , message("")
, fatal(0)
, indexed(0)
, filePath("")
@@ -177,8 +178,9 @@ struct StorageError
, columnNumber(-1)
{}
- StorageError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint lineNumber, uint columnNumber)
- : message(message)
+ StorageError(Id id, const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint lineNumber, uint columnNumber)
+ : id(id)
+ , message(message)
, fatal(fatal)
, indexed(indexed)
, filePath(filePath)
@@ -186,6 +188,7 @@ struct StorageError
, columnNumber(columnNumber)
{}
+ Id id;
std::string message;
bool fatal;
bool indexed;
diff --git a/src/lib/data/TaskFinishParsing.cpp b/src/lib/data/TaskFinishParsing.cpp
index dce1cf68..ba859f3d 100644
--- a/src/lib/data/TaskFinishParsing.cpp
+++ b/src/lib/data/TaskFinishParsing.cpp
@@ -9,10 +9,12 @@
TaskFinishParsing::TaskFinishParsing(
PersistentStorage* storage,
+ StorageAccess* storageAccess,
std::shared_ptr fileRegister,
DialogView* dialogView
)
: m_storage(storage)
+ , m_storageAccess(storageAccess)
, m_fileRegister(fileRegister)
, m_dialogView(dialogView)
{
@@ -59,7 +61,7 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr blackboa
m_fileRegister->getParsedSourceFilesCount(),
m_fileRegister->getSourceFilesCount(),
time,
- m_storage->getErrorCount()
+ m_storageAccess->getFilteredErrorCount()
);
return STATE_SUCCESS;
diff --git a/src/lib/data/TaskFinishParsing.h b/src/lib/data/TaskFinishParsing.h
index 87db5a3e..e2632d6b 100644
--- a/src/lib/data/TaskFinishParsing.h
+++ b/src/lib/data/TaskFinishParsing.h
@@ -9,6 +9,7 @@
class DialogView;
class FileRegister;
class PersistentStorage;
+class StorageAccess;
class TaskFinishParsing
: public Task
@@ -16,6 +17,7 @@ class TaskFinishParsing
public:
TaskFinishParsing(
PersistentStorage* storage,
+ StorageAccess* storageAccess,
std::shared_ptr fileRegister,
DialogView* dialogView
);
@@ -29,6 +31,7 @@ private:
virtual void doReset(std::shared_ptr blackboard);
PersistentStorage* m_storage;
+ StorageAccess* m_storageAccess;
std::shared_ptr m_fileRegister;
DialogView* m_dialogView;
};
diff --git a/src/lib/data/access/StorageAccess.h b/src/lib/data/access/StorageAccess.h
index a2bde00e..d852ddf5 100644
--- a/src/lib/data/access/StorageAccess.h
+++ b/src/lib/data/access/StorageAccess.h
@@ -15,6 +15,7 @@
#include "data/ErrorCountInfo.h"
#include "data/ErrorInfo.h"
#include "data/StorageStats.h"
+#include "data/StorageTypes.h"
class Graph;
class TextAccess;
@@ -59,7 +60,6 @@ public:
virtual std::shared_ptr getTokenLocationsForLinesInFile(
const std::string& filePath, uint firstLineNumber, uint lastLineNumber) const = 0;
- virtual std::shared_ptr getErrorTokenLocations(std::vector* errors) const = 0;
virtual std::shared_ptr getCommentLocationsInFile(const FilePath& filePath) const = 0;
virtual std::shared_ptr getFileContent(const FilePath& filePath) const = 0;
@@ -67,8 +67,15 @@ public:
virtual FileInfo getFileInfoForFilePath(const FilePath& filePath) const = 0;
virtual std::vector getFileInfosForFilePaths(const std::vector& filePaths) const = 0;
- virtual ErrorCountInfo getErrorCount() const = 0;
virtual StorageStats getStorageStats() const = 0;
+
+ virtual ErrorCountInfo getErrorCount() const = 0;
+ virtual ErrorCountInfo getFilteredErrorCount() const = 0;
+
+ virtual std::vector getAllErrors() const = 0;
+ virtual std::vector getFilteredErrors() const = 0;
+
+ virtual std::shared_ptr getErrorTokenLocations(std::vector* errors) const = 0;
};
#endif // STORAGE_ACCESS_H
diff --git a/src/lib/data/access/StorageAccessProxy.cpp b/src/lib/data/access/StorageAccessProxy.cpp
index 4fc9f27d..b97fc0cb 100644
--- a/src/lib/data/access/StorageAccessProxy.cpp
+++ b/src/lib/data/access/StorageAccessProxy.cpp
@@ -6,6 +6,7 @@
#include "utility/logging/logging.h"
#include "utility/file/FileInfo.h"
+#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/TimePoint.h"
StorageAccessProxy::StorageAccessProxy()
@@ -218,16 +219,6 @@ std::shared_ptr StorageAccessProxy::getTokenLocationsForLines
return std::make_shared("");
}
-std::shared_ptr StorageAccessProxy::getErrorTokenLocations(std::vector* errors) const
-{
- if (hasSubject())
- {
- return m_subject->getErrorTokenLocations(errors);
- }
-
- return std::make_shared();
-}
-
std::shared_ptr StorageAccessProxy::getCommentLocationsInFile(const FilePath& filePath) const
{
if (hasSubject())
@@ -268,16 +259,6 @@ std::vector StorageAccessProxy::getFileInfosForFilePaths(const std::ve
return std::vector();
}
-ErrorCountInfo StorageAccessProxy::getErrorCount() const
-{
- if (hasSubject())
- {
- return m_subject->getErrorCount();
- }
-
- return ErrorCountInfo();
-}
-
StorageStats StorageAccessProxy::getStorageStats() const
{
if (hasSubject())
@@ -287,3 +268,105 @@ StorageStats StorageAccessProxy::getStorageStats() const
return StorageStats();
}
+
+
+ErrorCountInfo StorageAccessProxy::getErrorCount() const
+{
+ ErrorCountInfo info;
+
+ std::vector storageErrors = getAllErrors();
+ for (const StorageError& error : storageErrors)
+ {
+ info.total++;
+
+ if (error.fatal)
+ {
+ info.fatal++;
+ }
+ }
+
+ return info;
+}
+
+ErrorCountInfo StorageAccessProxy::getFilteredErrorCount() const
+{
+ ErrorCountInfo info;
+
+ std::vector storageErrors = getAllErrors();
+ for (const StorageError& error : storageErrors)
+ {
+ if (!m_errorFilter.filter(error))
+ {
+ continue;
+ }
+
+ info.total++;
+
+ if (error.fatal)
+ {
+ info.fatal++;
+ }
+ }
+
+ return info;
+}
+
+std::vector StorageAccessProxy::getAllErrors() const
+{
+ if (hasSubject())
+ {
+ return m_subject->getAllErrors();
+ }
+
+ return std::vector();
+}
+
+std::vector StorageAccessProxy::getFilteredErrors() const
+{
+ std::vector errors = getAllErrors();
+ std::vector filteredErrors;
+
+ for (const StorageError& error : errors)
+ {
+ if (m_errorFilter.filter(error))
+ {
+ filteredErrors.push_back(error);
+ }
+ }
+
+ return filteredErrors;
+}
+
+std::shared_ptr StorageAccessProxy::getErrorTokenLocations(std::vector* errors) const
+{
+ if (hasSubject())
+ {
+ std::shared_ptr collection = m_subject->getErrorTokenLocations(errors);
+ std::vector unfilteredErrors = *errors;
+ errors->clear();
+
+ for (const ErrorInfo& error : unfilteredErrors)
+ {
+ if (m_errorFilter.filter(error))
+ {
+ errors->push_back(error);
+ }
+ else
+ {
+ // Set first bit to 1 to avoid collisions
+ Id locationId = ~(~size_t(0) >> 1) + error.id;
+ collection->removeTokenLocation(collection->findTokenLocationById(locationId));
+ }
+ }
+
+ return collection;
+ }
+
+ return std::make_shared();
+}
+
+void StorageAccessProxy::handleMessage(MessageErrorFilterChanged* message)
+{
+ m_errorFilter = message->errorFilter;
+ MessageShowErrors(getFilteredErrorCount()).dispatch();
+}
diff --git a/src/lib/data/access/StorageAccessProxy.h b/src/lib/data/access/StorageAccessProxy.h
index eeb35ef4..d085b958 100644
--- a/src/lib/data/access/StorageAccessProxy.h
+++ b/src/lib/data/access/StorageAccessProxy.h
@@ -3,7 +3,15 @@
#include "data/access/StorageAccess.h"
-class StorageAccessProxy: public StorageAccess
+#include "data/ErrorFilter.h"
+#include "data/StorageTypes.h"
+
+#include "utility/messaging/MessageListener.h"
+#include "utility/messaging/type/MessageErrorFilterChanged.h"
+
+class StorageAccessProxy
+ : public StorageAccess
+ , public MessageListener
{
public:
StorageAccessProxy();
@@ -47,7 +55,6 @@ public:
const std::string& filePath, uint firstLineNumber, uint lastLineNumber
) const;
- virtual std::shared_ptr getErrorTokenLocations(std::vector* errors) const;
virtual std::shared_ptr getCommentLocationsInFile(const FilePath& filePath) const;
virtual std::shared_ptr getFileContent(const FilePath& filePath) const;
@@ -55,11 +62,22 @@ public:
virtual FileInfo getFileInfoForFilePath(const FilePath& filePath) const;
virtual std::vector getFileInfosForFilePaths(const std::vector& filePaths) const;
- virtual ErrorCountInfo getErrorCount() const;
virtual StorageStats getStorageStats() const;
+ virtual ErrorCountInfo getErrorCount() const;
+ virtual ErrorCountInfo getFilteredErrorCount() const;
+
+ virtual std::vector getAllErrors() const;
+ virtual std::vector getFilteredErrors() const;
+
+ virtual std::shared_ptr getErrorTokenLocations(std::vector* errors) const;
+
private:
+ void handleMessage(MessageErrorFilterChanged* message);
+
StorageAccess* m_subject;
+
+ ErrorFilter m_errorFilter;
};
#endif // STORAGE_ACCESS_PROXY_H
diff --git a/src/lib/data/location/TokenLocationCollection.cpp b/src/lib/data/location/TokenLocationCollection.cpp
index dc07a645..7b8334f0 100644
--- a/src/lib/data/location/TokenLocationCollection.cpp
+++ b/src/lib/data/location/TokenLocationCollection.cpp
@@ -89,7 +89,7 @@ TokenLocation* TokenLocationCollection::addTokenLocation(
void TokenLocationCollection::removeTokenLocation(TokenLocation* location)
{
- if (!findTokenLocationById(location->getId()))
+ if (!location || !findTokenLocationById(location->getId()))
{
LOG_ERROR("TokenLocation is not part of this TokenLocationCollection.");
return;
diff --git a/src/lib/data/parser/ParserClientImpl.cpp b/src/lib/data/parser/ParserClientImpl.cpp
index ddcdad22..b434f0a9 100644
--- a/src/lib/data/parser/ParserClientImpl.cpp
+++ b/src/lib/data/parser/ParserClientImpl.cpp
@@ -57,7 +57,7 @@ Id ParserClientImpl::recordSymbol(
Id ParserClientImpl::recordSymbol(
const NameHierarchy& symbolName, SymbolKind symbolType,
- const ParseLocation& location, const ParseLocation& scopeLocation,
+ const ParseLocation& location, const ParseLocation& scopeLocation,
AccessKind access, bool isImplicit
)
{
diff --git a/src/lib/settings/ApplicationSettings.cpp b/src/lib/settings/ApplicationSettings.cpp
index 3631c82d..67f8b862 100644
--- a/src/lib/settings/ApplicationSettings.cpp
+++ b/src/lib/settings/ApplicationSettings.cpp
@@ -175,16 +175,6 @@ void ApplicationSettings::setIndexerThreadCount(const int count)
setValue("indexing/indexer_thread_count", count);
}
-bool ApplicationSettings::getShowExternalNonFatalErrors() const
-{
- return getValue("indexing/show_external_non_fatal_errors", false);
-}
-
-void ApplicationSettings::setShowExternalNonFatalErrors(const bool show)
-{
- setValue("indexing/show_external_non_fatal_errors", show);
-}
-
std::string ApplicationSettings::getJavaPath() const
{
return getValue("indexing/java/java_path", "");
diff --git a/src/lib/settings/ApplicationSettings.h b/src/lib/settings/ApplicationSettings.h
index 172a7fbe..c1b8ac4b 100644
--- a/src/lib/settings/ApplicationSettings.h
+++ b/src/lib/settings/ApplicationSettings.h
@@ -54,9 +54,6 @@ public:
int getIndexerThreadCount() const;
void setIndexerThreadCount(const int count);
- bool getShowExternalNonFatalErrors() const;
- void setShowExternalNonFatalErrors(const bool show);
-
std::string getJavaPath() const;
void setJavaPath(const std::string path);
diff --git a/src/lib/utility/file/FilePath.cpp b/src/lib/utility/file/FilePath.cpp
index 6dcfcb2d..8bd17c0c 100644
--- a/src/lib/utility/file/FilePath.cpp
+++ b/src/lib/utility/file/FilePath.cpp
@@ -192,10 +192,10 @@ bool FilePath::contains(const FilePath& other) const
boost::filesystem::path dir = m_path;
const boost::filesystem::path& dir2 = other.m_path;
- if (dir.filename() == ".")
- {
- dir.remove_filename();
- }
+ if (dir.filename() == ".")
+ {
+ dir.remove_filename();
+ }
auto it = dir.begin();
auto it2 = dir2.begin();
diff --git a/src/lib/utility/messaging/type/MessageErrorFilterChanged.h b/src/lib/utility/messaging/type/MessageErrorFilterChanged.h
new file mode 100644
index 00000000..067e50df
--- /dev/null
+++ b/src/lib/utility/messaging/type/MessageErrorFilterChanged.h
@@ -0,0 +1,24 @@
+#ifndef MESSAGE_ERROR_FILTER_CHANGED_H
+#define MESSAGE_ERROR_FILTER_CHANGED_H
+
+#include "utility/messaging/Message.h"
+#include "data/ErrorFilter.h"
+
+class MessageErrorFilterChanged
+ : public Message
+{
+public:
+ MessageErrorFilterChanged(const ErrorFilter& filter)
+ : errorFilter(filter)
+ {
+ }
+
+ static const std::string getStaticType()
+ {
+ return "MessageErrorFilterChanged";
+ }
+
+ const ErrorFilter errorFilter;
+};
+
+#endif // MESSAGE_ERROR_FILTER_CHANGED_H
diff --git a/src/lib/utility/messaging/type/MessageNewErrors.h b/src/lib/utility/messaging/type/MessageNewErrors.h
new file mode 100644
index 00000000..f96559d8
--- /dev/null
+++ b/src/lib/utility/messaging/type/MessageNewErrors.h
@@ -0,0 +1,31 @@
+#ifndef MESSAGE_NEW_ERRORS_H
+#define MESSAGE_NEW_ERRORS_H
+
+#include "utility/messaging/Message.h"
+
+#include "data/StorageTypes.h"
+
+class MessageNewErrors
+ : public Message
+{
+public:
+ MessageNewErrors(const std::vector& errors)
+ : errors(errors)
+ {
+ setSendAsTask(false);
+ }
+
+ static const std::string getStaticType()
+ {
+ return "MessageNewErrors";
+ }
+
+ virtual void print(std::ostream& os) const
+ {
+ os << errors.size() << " errors";
+ }
+
+ const std::vector errors;
+};
+
+#endif // MESSAGE_NEW_ERRORS_H
diff --git a/src/lib/utility/messaging/type/MessageShowErrors.h b/src/lib/utility/messaging/type/MessageShowErrors.h
index 80d16bb1..20f41988 100644
--- a/src/lib/utility/messaging/type/MessageShowErrors.h
+++ b/src/lib/utility/messaging/type/MessageShowErrors.h
@@ -10,6 +10,12 @@ class MessageShowErrors
public:
MessageShowErrors(ErrorCountInfo errorCount)
: errorCount(errorCount)
+ , errorId(0)
+ {
+ }
+
+ MessageShowErrors(Id errorId)
+ : errorId(errorId)
{
}
@@ -19,6 +25,7 @@ public:
}
ErrorCountInfo errorCount;
+ Id errorId;
};
#endif // MESSAGE_SHOW_ERRORS_H
diff --git a/src/lib_gui/CMakeLists.txt b/src/lib_gui/CMakeLists.txt
index ba35a2d6..47e25f35 100644
--- a/src/lib_gui/CMakeLists.txt
+++ b/src/lib_gui/CMakeLists.txt
@@ -36,6 +36,8 @@ add_files(
qt/element/QtSmartSearchBox.h
qt/element/QtStatusBar.cpp
qt/element/QtStatusBar.h
+ qt/element/QtTable.cpp
+ qt/element/QtTable.h
qt/element/QtUndoRedo.cpp
qt/element/QtUndoRedo.h
@@ -95,10 +97,14 @@ add_files(
qt/view/QtCompositeView.h
qt/view/QtDialogView.cpp
qt/view/QtDialogView.h
+ qt/view/QtErrorView.cpp
+ qt/view/QtErrorView.h
qt/view/QtGraphView.cpp
qt/view/QtGraphView.h
qt/view/QtGraphViewStyleImpl.cpp
qt/view/QtGraphViewStyleImpl.h
+ qt/view/QtLogView.cpp
+ qt/view/QtLogView.h
qt/view/QtMainView.cpp
qt/view/QtMainView.h
qt/view/QtRefreshView.cpp
@@ -107,6 +113,8 @@ add_files(
qt/view/QtSearchView.h
qt/view/QtStatusBarView.cpp
qt/view/QtStatusBarView.h
+ qt/view/QtTabbedView.cpp
+ qt/view/QtTabbedView.h
qt/view/QtUndoRedoView.cpp
qt/view/QtUndoRedoView.h
qt/view/QtViewFactory.cpp
diff --git a/src/lib_gui/platform_includes/includesLinux.h b/src/lib_gui/platform_includes/includesLinux.h
index a058a784..2e3a19fb 100644
--- a/src/lib_gui/platform_includes/includesLinux.h
+++ b/src/lib_gui/platform_includes/includesLinux.h
@@ -32,8 +32,6 @@ void setupApp(int argc, char *argv[])
dataDir.mkpath(userDataPath);
}
- std::cout << "apppath: " << AppPath::getAppPath() << std::endl;
-
utility::copyNewFilesFromDirectory(QString::fromStdString(AppPath::getAppPath() + "/usr/" ), userDataPath);
}
diff --git a/src/lib_gui/qt/element/QtCodeNavigator.cpp b/src/lib_gui/qt/element/QtCodeNavigator.cpp
index b361f695..7d9efd83 100644
--- a/src/lib_gui/qt/element/QtCodeNavigator.cpp
+++ b/src/lib_gui/qt/element/QtCodeNavigator.cpp
@@ -419,6 +419,12 @@ void QtCodeNavigator::scrollToLine(const FilePath& filePath, unsigned int line)
{
emit shouldScrollToSnippet(file->getFileSnippet(), line);
}
+ else
+ {
+ m_scrollToFile = file;
+ m_scrollToLine = line;
+ scrollToSnippetIfRequested();
+ }
}
void QtCodeNavigator::scrollToLocation(QtCodeFile* file, Id locationId, bool scrollTo)
diff --git a/src/lib_gui/qt/element/QtTable.cpp b/src/lib_gui/qt/element/QtTable.cpp
new file mode 100644
index 00000000..85f95ab3
--- /dev/null
+++ b/src/lib_gui/qt/element/QtTable.cpp
@@ -0,0 +1,62 @@
+#include "qt/element/QtTable.h"
+
+#include
+
+QtTable::QtTable(QWidget* parent)
+ : QTableView(parent)
+ , m_rowsToFill(0)
+{
+}
+
+QtTable::~QtTable()
+{
+}
+
+void QtTable::resizeEvent(QResizeEvent* event)
+{
+ QTableView::resizeEvent(event);
+ int tableHeight = event->size().height();
+
+ if (this->model()->rowCount() == 0)
+ {
+ this->model()->insertRow(0);
+ }
+
+ m_rowsToFill = (float)tableHeight / this->rowHeight(0);
+
+ updateRows();
+}
+
+void QtTable::updateRows()
+{
+ while (model()->rowCount() <= m_rowsToFill)
+ {
+ model()->insertRow(model()->rowCount());
+ }
+
+ while (model()->rowCount() > m_rowsToFill + 1)
+ {
+ int row = model()->rowCount() - 1;
+ if (model()->index(row, 0).data(Qt::DisplayRole).toString().isEmpty())
+ {
+ model()->removeRow(row);
+ }
+ else
+ {
+ break;
+ }
+ }
+}
+
+int QtTable::getFilledRowCount()
+{
+ for (int i = 0; i < model()->rowCount(); i++)
+ {
+ if (model()->index(i, 0).data(Qt::DisplayRole).toString().isEmpty())
+ {
+ return i;
+ }
+ }
+
+ return model()->rowCount();
+}
diff --git a/src/lib_gui/qt/element/QtTable.h b/src/lib_gui/qt/element/QtTable.h
new file mode 100644
index 00000000..5e9b0215
--- /dev/null
+++ b/src/lib_gui/qt/element/QtTable.h
@@ -0,0 +1,24 @@
+#ifndef QT_TABLE_H
+#define QT_TABLE_H
+
+#include
+
+class QtTable
+ : public QTableView
+{
+ Q_OBJECT
+public:
+ QtTable(QWidget* parent = nullptr);
+ virtual ~QtTable();
+
+ void updateRows();
+ int getFilledRowCount();
+
+protected:
+ virtual void resizeEvent(QResizeEvent* event);
+
+private:
+ float m_rowsToFill;
+};
+
+#endif // QT_TABLE_H
diff --git a/src/lib_gui/qt/utility/utilityQt.cpp b/src/lib_gui/qt/utility/utilityQt.cpp
index d00d68d2..7364ba97 100644
--- a/src/lib_gui/qt/utility/utilityQt.cpp
+++ b/src/lib_gui/qt/utility/utilityQt.cpp
@@ -92,6 +92,10 @@ namespace utility
{
val = std::to_string(ApplicationSettings::getInstance()->getFontSize() + 2);
}
+ else if (val == "font_size+5")
+ {
+ val = std::to_string(ApplicationSettings::getInstance()->getFontSize() + 5);
+ }
else if (val == "font_size-2")
{
val = std::to_string(ApplicationSettings::getInstance()->getFontSize() - 2);
diff --git a/src/lib_gui/qt/view/QtCodeView.cpp b/src/lib_gui/qt/view/QtCodeView.cpp
index 82939aff..26edc867 100644
--- a/src/lib_gui/qt/view/QtCodeView.cpp
+++ b/src/lib_gui/qt/view/QtCodeView.cpp
@@ -61,6 +61,11 @@ void QtCodeView::setErrorInfos(const std::vector& errorInfos)
m_errorInfos = errorInfos;
}
+bool QtCodeView::showsErrors() const
+{
+ return m_errorInfos.size() > 0;
+}
+
void QtCodeView::showCodeSnippets(const std::vector& snippets, const std::vector& activeTokenIds)
{
m_showCodeSnippetsFunctor(snippets, activeTokenIds);
diff --git a/src/lib_gui/qt/view/QtCodeView.h b/src/lib_gui/qt/view/QtCodeView.h
index 381f1955..c679f455 100644
--- a/src/lib_gui/qt/view/QtCodeView.h
+++ b/src/lib_gui/qt/view/QtCodeView.h
@@ -29,6 +29,7 @@ public:
virtual void clear();
virtual void setErrorInfos(const std::vector& errorInfos);
+ virtual bool showsErrors() const;
virtual void showCodeSnippets(const std::vector& snippets, const std::vector& activeTokenIds);
virtual void addCodeSnippets(const std::vector& snippets, bool insert);
diff --git a/src/lib_gui/qt/view/QtErrorView.cpp b/src/lib_gui/qt/view/QtErrorView.cpp
new file mode 100644
index 00000000..c08fd7c0
--- /dev/null
+++ b/src/lib_gui/qt/view/QtErrorView.cpp
@@ -0,0 +1,248 @@
+#include "qt/view/QtErrorView.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "qt/utility/utilityQt.h"
+#include "qt/element/QtTable.h"
+#include "settings/ApplicationSettings.h"
+#include "settings/ColorScheme.h"
+#include "utility/messaging/type/MessageErrorFilterChanged.h"
+#include "utility/messaging/type/MessageShowErrors.h"
+#include "utility/ResourcePaths.h"
+
+#include "qt/view/QtViewWidgetWrapper.h"
+
+QtErrorView::QtErrorView(ViewLayout* viewLayout)
+ : ErrorView(viewLayout)
+ , m_clearFunctor(std::bind(&QtErrorView::doClear, this))
+ , m_refreshFunctor(std::bind(&QtErrorView::doRefreshView, this))
+ , m_addErrorFunctor(std::bind(&QtErrorView::doAddError, this, std::placeholders::_1))
+{
+}
+
+QtErrorView::~QtErrorView()
+{
+}
+
+void QtErrorView::createWidgetWrapper()
+{
+ setWidgetWrapper(std::make_shared(new QFrame()));
+}
+
+void QtErrorView::initView()
+{
+ QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
+
+ QBoxLayout* layout = new QVBoxLayout();
+ layout->setContentsMargins(0, 0, 0, 5);
+ layout->setSpacing(0);
+ widget->setLayout(layout);
+
+ m_table = new QtTable(this);
+ m_table->setAlternatingRowColors(true);
+
+ m_table->setShowGrid(false);
+ m_table->verticalHeader()->setAlternatingRowColors(true);
+ m_table->verticalHeader()->sectionResizeMode(QHeaderView::Fixed);
+ m_table->verticalHeader()->setDefaultSectionSize(ApplicationSettings::getInstance()->getFontSize() + 6);
+ m_table->horizontalHeader()->setStretchLastSection(true);
+
+ m_table->setSelectionBehavior(QAbstractItemView::SelectRows);
+ m_table->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ m_model = new QStandardItemModel(this);
+ m_table->setModel(m_model);
+
+ // Setup Table Headers
+ m_model->setColumnCount(5);
+ m_table->setColumnWidth(COLUMN::TYPE, 70);
+ m_table->setColumnWidth(COLUMN::MESSAGE, 450);
+ m_table->setColumnWidth(COLUMN::FILE, 300);
+ m_table->setColumnWidth(COLUMN::LINE, 50);
+ m_table->setColumnHidden(COLUMN::ID, true);
+
+ QStringList headers;
+ headers << "Type" << "Message" << "File" << "Line" << "Indexed";
+ m_model->setHorizontalHeaderLabels(headers);
+ m_table->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
+
+ connect(m_table->selectionModel(), &QItemSelectionModel::currentRowChanged,
+ [=](const QModelIndex& index, const QModelIndex& previousIndex)
+ {
+ if (index.isValid())
+ {
+ if (m_model->item(index.row(), COLUMN::FILE) == nullptr)
+ {
+ return;
+ }
+
+ MessageShowErrors(m_model->item(index.row(), COLUMN::ID)->text().toUInt()).dispatch();
+ }
+ });
+
+ layout->addWidget(m_table);
+
+ // Setup Checkboxes
+ QBoxLayout* checkboxes = new QHBoxLayout();
+ checkboxes->addSpacing(15);
+
+ m_showFatals = createFilterCheckbox("fatals", true, checkboxes);
+ m_showErrors = createFilterCheckbox("errors", true, checkboxes);
+ m_showNonIndexedFatals = createFilterCheckbox("fatals in non-indexed files", true, checkboxes);
+ m_showNonIndexedErrors = createFilterCheckbox("errors in non-indexed files", false, checkboxes);
+
+ checkboxes->addStretch();
+
+ layout->addLayout(checkboxes);
+
+ doRefreshView();
+}
+
+void QtErrorView::refreshView()
+{
+ m_refreshFunctor();
+}
+
+void QtErrorView::clear()
+{
+ m_clearFunctor();
+}
+
+void QtErrorView::addError(const StorageError& error)
+{
+ m_addErrorFunctor(error);
+}
+
+void QtErrorView::clickedInEmptySpace()
+{
+}
+
+void QtErrorView::doRefreshView()
+{
+ m_model->removeRows(0, m_model->rowCount());
+
+ for (StorageError error : m_errors)
+ {
+ addErrorToTable(error);
+ }
+
+ m_table->updateRows();
+
+ setStyleSheet();
+}
+
+void QtErrorView::doClear()
+{
+ m_model->removeRows(0, m_model->rowCount());
+ m_errors.clear();
+}
+
+void QtErrorView::doAddError(const StorageError& error)
+{
+ m_errors.push_back(error);
+
+ addErrorToTable(error);
+}
+
+void QtErrorView::setStyleSheet() const
+{
+ QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
+ utility::setWidgetBackgroundColor(widget, ColorScheme::getInstance()->getColor("error/background"));
+
+
+ QPalette palette( m_showErrors->palette() );
+ palette.setColor(QPalette::WindowText, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str()));
+ //palette.setColor(QPalette::Text, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str()));
+ //palette.setColor(QPalette::ButtonText, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str()));
+
+ //m_showErrors->setAutoFillBackground(true);
+ m_showErrors->setPalette(palette);
+ m_showFatals->setPalette(palette);
+ m_showNonIndexedErrors->setPalette(palette);
+ m_showNonIndexedFatals->setPalette(palette);
+
+ widget->setStyleSheet(
+ utility::getStyleSheet(ResourcePaths::getGuiPath() + "error_view/error_view.css").c_str()
+ );
+}
+
+void QtErrorView::addErrorToTable(const StorageError& error)
+{
+ if (!isShownError(error))
+ {
+ return;
+ }
+
+ int rowNumber = m_table->getFilledRowCount();
+ if (rowNumber < m_model->rowCount())
+ {
+ m_model->insertRow(rowNumber);
+ }
+
+ 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);
+ m_model->setItem(rowNumber, COLUMN::MESSAGE, new QStandardItem(error.message.c_str()));
+ std::string errorPngPath = ResourcePaths::getGuiPath() + "/indexing_dialog/error.png";
+ m_model->item(rowNumber, COLUMN::MESSAGE)->setIcon(QIcon(QString(errorPngPath.c_str())));
+ m_model->setItem(rowNumber, COLUMN::FILE, new QStandardItem(error.filePath.c_str()));
+ m_model->item(rowNumber, COLUMN::FILE)->setToolTip(error.filePath.c_str());
+ m_model->setItem(rowNumber, COLUMN::LINE, new QStandardItem(QString::number(error.lineNumber)));
+ m_model->setItem(rowNumber, COLUMN::INDEXED, new QStandardItem(error.indexed ? "yes" : "no"));
+ m_model->setItem(rowNumber, COLUMN::ID, new QStandardItem(QString::number(error.id)));
+ m_table->updateRows();
+}
+
+QCheckBox* QtErrorView::createFilterCheckbox(const QString& name, bool checked, QBoxLayout* layout)
+{
+ QCheckBox* checkbox = new QCheckBox(name);
+ checkbox->setChecked(checked);
+
+ connect(checkbox, &QCheckBox::stateChanged,
+ [=](int)
+ {
+ m_table->selectionModel()->clearSelection();
+
+ ErrorFilter filter;
+ filter.error = m_showErrors->checkState() == Qt::Checked;
+ filter.fatal = m_showFatals->checkState() == Qt::Checked;
+ filter.unindexedError = m_showNonIndexedErrors->checkState() == Qt::Checked;
+ filter.unindexedFatal = m_showNonIndexedFatals->checkState() == Qt::Checked;
+
+ MessageErrorFilterChanged(filter).dispatch();
+ }
+ );
+
+ layout->addWidget(checkbox);
+ layout->addSpacing(25);
+
+ return checkbox;
+}
+
+bool QtErrorView::isShownError(const StorageError& error)
+{
+ if (!error.fatal && error.indexed && m_showErrors->checkState() == Qt::Checked)
+ {
+ return true;
+ }
+ if (error.fatal && error.indexed && m_showFatals->checkState() == Qt::Checked)
+ {
+ return true;
+ }
+ if (error.fatal && !error.indexed && m_showNonIndexedErrors->checkState() == Qt::Checked)
+ {
+ return true;
+ }
+ if (error.fatal && !error.indexed && m_showNonIndexedFatals->checkState() == Qt::Checked)
+ {
+ return true;
+ }
+ return false;
+}
diff --git a/src/lib_gui/qt/view/QtErrorView.h b/src/lib_gui/qt/view/QtErrorView.h
new file mode 100644
index 00000000..800ed381
--- /dev/null
+++ b/src/lib_gui/qt/view/QtErrorView.h
@@ -0,0 +1,74 @@
+#ifndef QT_ERROR_VIEW_H
+#define QT_ERROR_VIEW_H
+
+#include
+
+#include "component/view/ErrorView.h"
+#include "qt/utility/QtThreadedFunctor.h"
+
+class QBoxLayout;
+class QCheckBox;
+class QPalette;
+class QStandardItemModel;
+class QtTable;
+
+class QtErrorView
+ : public QWidget
+ , public ErrorView
+{
+ Q_OBJECT
+
+public:
+ QtErrorView(ViewLayout* viewLayout);
+ virtual ~QtErrorView();
+
+ // View implementation
+ virtual void createWidgetWrapper();
+ virtual void initView();
+ virtual void refreshView();
+
+ // ErrorView implementation
+ virtual void clear();
+ virtual void addError(const StorageError& error);
+
+private slots:
+ void clickedInEmptySpace();
+
+private:
+ enum COLUMN {
+ TYPE = 0,
+ MESSAGE = 1,
+ FILE = 2,
+ LINE = 3,
+ INDEXED = 4,
+ ID = 5
+ };
+
+ void doRefreshView();
+ void doClear();
+ void doAddError(const StorageError& error);
+
+ void setStyleSheet() const;
+
+ void addErrorToTable(const StorageError& error);
+
+ QCheckBox* createFilterCheckbox(const QString& name, bool checked, QBoxLayout* layout);
+ bool isShownError(const StorageError& error);
+
+ QtThreadedFunctor m_clearFunctor;
+ QtThreadedFunctor m_refreshFunctor;
+ QtThreadedFunctor m_addErrorFunctor;
+
+ QCheckBox* m_showErrors;
+ QCheckBox* m_showFatals;
+ QCheckBox* m_showNonIndexedErrors;
+ QCheckBox* m_showNonIndexedFatals;
+
+ QStandardItemModel* m_model;
+ QtTable* m_table;
+
+ std::vector m_errors;
+ QPalette* m_palette;
+};
+
+#endif // QT_ERROR_VIEW_H
diff --git a/src/lib_gui/qt/view/QtLogView.cpp b/src/lib_gui/qt/view/QtLogView.cpp
new file mode 100644
index 00000000..b82405ac
--- /dev/null
+++ b/src/lib_gui/qt/view/QtLogView.cpp
@@ -0,0 +1,57 @@
+#include "qt/view/QtLogView.h"
+
+#include
+#include
+#include
+
+#include "qt/view/QtViewWidgetWrapper.h"
+
+QtLogView::QtLogView(ViewLayout* viewLayout)
+ : LogView(viewLayout)
+ , m_clearFunctor(std::bind(&QtLogView::doClear, this))
+ , m_refreshFunctor(std::bind(&QtLogView::doRefreshView, this))
+{
+}
+
+QtLogView::~QtLogView()
+{
+}
+
+void QtLogView::createWidgetWrapper()
+{
+ setWidgetWrapper(std::make_shared(new QFrame()));
+}
+
+void QtLogView::initView()
+{
+ QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
+
+ QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
+ widget->setLayout(layout);
+
+ QLabel* label = new QLabel("test log view");
+
+ widget->layout()->addWidget(label);
+
+ doRefreshView();
+}
+
+void QtLogView::refreshView()
+{
+ m_refreshFunctor();
+}
+
+void QtLogView::clear()
+{
+ m_clearFunctor();
+}
+
+void QtLogView::doClear()
+{
+}
+
+void QtLogView::doRefreshView()
+{
+}
diff --git a/src/lib_gui/qt/view/QtLogView.h b/src/lib_gui/qt/view/QtLogView.h
new file mode 100644
index 00000000..1aeca69b
--- /dev/null
+++ b/src/lib_gui/qt/view/QtLogView.h
@@ -0,0 +1,29 @@
+#ifndef QT_LOG_VIEW_H
+#define QT_LOG_VIEW_H
+
+#include "component/view/LogView.h"
+#include "qt/utility/QtThreadedFunctor.h"
+
+class QtLogView
+ : public LogView
+{
+public:
+ QtLogView(ViewLayout* viewLayout);
+ virtual ~QtLogView();
+
+ // View implementation
+ virtual void createWidgetWrapper();
+ virtual void initView();
+ virtual void refreshView();
+
+ virtual void clear();
+
+private:
+ void doClear();
+ void doRefreshView();
+
+ QtThreadedFunctor m_clearFunctor;
+ QtThreadedFunctor m_refreshFunctor;
+};
+
+#endif // QT_LOG_VIEW_H
diff --git a/src/lib_gui/qt/view/QtMainView.cpp b/src/lib_gui/qt/view/QtMainView.cpp
index 42ed224e..9e9c42b1 100644
--- a/src/lib_gui/qt/view/QtMainView.cpp
+++ b/src/lib_gui/qt/view/QtMainView.cpp
@@ -45,12 +45,22 @@ void QtMainView::removeView(View* view)
void QtMainView::showView(View* view)
{
- m_window->showView(view);
+ m_onQtThread(
+ [=]()
+ {
+ m_window->showView(view);
+ }
+ );
}
void QtMainView::hideView(View* view)
{
- m_window->hideView(view);
+ m_onQtThread(
+ [=]()
+ {
+ m_window->hideView(view);
+ }
+ );
}
void QtMainView::loadLayout()
diff --git a/src/lib_gui/qt/view/QtMainView.h b/src/lib_gui/qt/view/QtMainView.h
index df2a0edf..3f64280d 100644
--- a/src/lib_gui/qt/view/QtMainView.h
+++ b/src/lib_gui/qt/view/QtMainView.h
@@ -38,13 +38,13 @@ public:
virtual void showView(View* view);
virtual void hideView(View* view);
- virtual void loadLayout();
- virtual void saveLayout();
-
virtual QStatusBar* getStatusBar();
virtual void setStatusBar(QStatusBar* statusBar);
// MainView implementation
+ virtual void loadLayout();
+ virtual void saveLayout();
+
virtual void hideStartScreen();
virtual void setTitle(const std::string& title);
virtual void activateWindow();
@@ -76,6 +76,8 @@ private:
QtThreadedFunctor<> m_activateWindowFunctor;
QtThreadedFunctor<> m_updateRecentProjectMenuFunctor;
QtThreadedFunctor m_forceLicenseScreenFunctor;
+
+ QtThreadedLambdaFunctor m_onQtThread;
};
#endif // QT_MAIN_VIEW_H
diff --git a/src/lib_gui/qt/view/QtTabbedView.cpp b/src/lib_gui/qt/view/QtTabbedView.cpp
new file mode 100644
index 00000000..2d87fd20
--- /dev/null
+++ b/src/lib_gui/qt/view/QtTabbedView.cpp
@@ -0,0 +1,66 @@
+#include "qt/view/QtTabbedView.h"
+
+#include
+#include
+#include
+#include
+
+#include "qt/utility/utilityQt.h"
+#include "qt/view/QtViewWidgetWrapper.h"
+#include "settings/ColorScheme.h"
+#include "utility/ResourcePaths.h"
+
+
+QtTabbedView::QtTabbedView(ViewLayout* viewLayout, const std::string& name)
+ : TabbedView(viewLayout, name)
+ , m_refreshFunctor(std::bind(&QtTabbedView::doRefreshView, this))
+{
+}
+
+QtTabbedView::~QtTabbedView()
+{
+}
+
+void QtTabbedView::createWidgetWrapper()
+{
+ setWidgetWrapper(std::make_shared(new QFrame()));
+}
+
+void QtTabbedView::initView()
+{
+ QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
+
+ QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
+ widget->setLayout(layout);
+
+ m_widget = new QTabWidget(widget);
+ layout->addWidget(m_widget);
+}
+
+void QtTabbedView::refreshView()
+{
+ m_refreshFunctor();
+}
+
+void QtTabbedView::doRefreshView()
+{
+ setStyleSheet();
+}
+
+void QtTabbedView::addViewWidget(View* view)
+{
+ m_widget->addTab(QtViewWidgetWrapper::getWidgetOfView(view), view->getName().c_str());
+
+ doRefreshView();
+}
+
+void QtTabbedView::setStyleSheet()
+{
+ utility::setWidgetBackgroundColor(QtViewWidgetWrapper::getWidgetOfView(this), ColorScheme::getInstance()->getColor("tab/background"));
+
+ m_widget->setStyleSheet(
+ utility::getStyleSheet(ResourcePaths::getGuiPath() + "tabbed_view/tabbed_view.css").c_str()
+ );
+}
diff --git a/src/lib_gui/qt/view/QtTabbedView.h b/src/lib_gui/qt/view/QtTabbedView.h
new file mode 100644
index 00000000..625b9e9c
--- /dev/null
+++ b/src/lib_gui/qt/view/QtTabbedView.h
@@ -0,0 +1,32 @@
+#ifndef QT_TABBED_VIEW
+#define QT_TABBED_VIEW
+
+#include "component/view/TabbedView.h"
+#include "qt/utility/QtThreadedFunctor.h"
+
+class QTabWidget;
+
+class QtTabbedView
+ : public TabbedView
+{
+public:
+ QtTabbedView(ViewLayout* viewLayout, const std::string& name);
+ ~QtTabbedView();
+
+ // View implementation
+ virtual void createWidgetWrapper();
+ virtual void initView();
+ virtual void refreshView();
+
+ // TabbedView implementation
+ virtual void addViewWidget(View* view);
+
+private:
+ void setStyleSheet();
+ void doRefreshView();
+
+ QtThreadedFunctor m_refreshFunctor;
+ QTabWidget* m_widget;
+};
+
+#endif // QT_TABBED_VIEW
diff --git a/src/lib_gui/qt/view/QtViewFactory.cpp b/src/lib_gui/qt/view/QtViewFactory.cpp
index fb143ef4..b9eff60a 100644
--- a/src/lib_gui/qt/view/QtViewFactory.cpp
+++ b/src/lib_gui/qt/view/QtViewFactory.cpp
@@ -4,12 +4,15 @@
#include "qt/view/QtCodeView.h"
#include "qt/view/QtCompositeView.h"
#include "qt/view/QtDialogView.h"
+#include "qt/view/QtErrorView.h"
#include "qt/view/QtGraphView.h"
#include "qt/view/QtGraphViewStyleImpl.h"
+#include "qt/view/QtLogView.h"
#include "qt/view/QtMainView.h"
#include "qt/view/QtRefreshView.h"
#include "qt/view/QtSearchView.h"
#include "qt/view/QtStatusBarView.h"
+#include "qt/view/QtTabbedView.h"
#include "qt/view/QtUndoRedoView.h"
QtViewFactory::QtViewFactory()
@@ -34,11 +37,29 @@ std::shared_ptr QtViewFactory::createCompositeView(
return ptr;
}
+std::shared_ptr QtViewFactory::createTabbedView(ViewLayout* viewLayout, const std::string& name) const
+{
+ std::shared_ptr ptr = std::make_shared(viewLayout, name);
+ ptr->init();
+ ptr->addToLayout();
+ return ptr;
+}
+
std::shared_ptr QtViewFactory::createCodeView(ViewLayout* viewLayout) const
{
return View::createInitAndAddToLayout(viewLayout);
}
+std::shared_ptr QtViewFactory::createErrorView(ViewLayout* viewLayout) const
+{
+ return View::createInitAndAddToLayout(viewLayout);
+}
+
+std::shared_ptr QtViewFactory::createLogView(ViewLayout* viewLayout) const
+{
+ return View::createInitAndAddToLayout(viewLayout);
+}
+
std::shared_ptr QtViewFactory::createGraphView(ViewLayout* viewLayout) const
{
GraphViewStyle::setImpl(std::make_shared());
diff --git a/src/lib_gui/qt/view/QtViewFactory.h b/src/lib_gui/qt/view/QtViewFactory.h
index 0b76fa86..9fa801bc 100644
--- a/src/lib_gui/qt/view/QtViewFactory.h
+++ b/src/lib_gui/qt/view/QtViewFactory.h
@@ -12,9 +12,12 @@ public:
virtual std::shared_ptr createMainView() const;
virtual std::shared_ptr createCompositeView(
ViewLayout* viewLayout, CompositeView::CompositeDirection direction, const std::string& name) const;
+ virtual std::shared_ptr createTabbedView(ViewLayout* viewLayout, const std::string& name) const;
virtual std::shared_ptr createCodeView(ViewLayout* viewLayout) const;
+ virtual std::shared_ptr createErrorView(ViewLayout* viewLayout) const;
virtual std::shared_ptr createGraphView(ViewLayout* viewLayout) const;
+ virtual std::shared_ptr createLogView(ViewLayout* viewLayout) const;
virtual std::shared_ptr createRefreshView(ViewLayout* viewLayout) const;
virtual std::shared_ptr createSearchView(ViewLayout* viewLayout) const;
virtual std::shared_ptr createStatusBarView(ViewLayout* viewLayout) const;
diff --git a/src/lib_gui/qt/window/QtMainWindow.cpp b/src/lib_gui/qt/window/QtMainWindow.cpp
index 07d20683..8df1ec1a 100644
--- a/src/lib_gui/qt/window/QtMainWindow.cpp
+++ b/src/lib_gui/qt/window/QtMainWindow.cpp
@@ -13,6 +13,7 @@
#include "Application.h"
#include "component/view/View.h"
#include "component/view/CompositeView.h"
+#include "component/view/TabbedView.h"
#include "LicenseChecker.h"
#include "qt/utility/QtContextMenu.h"
#include "qt/utility/utilityQt.h"
@@ -721,6 +722,18 @@ QtMainWindow::DockWidget* QtMainWindow::getDockWidgetForView(View* view)
}
}
}
+
+ const TabbedView* tabbedView = dynamic_cast(dock.view);
+ if (tabbedView)
+ {
+ for (const View* v : tabbedView->getViews())
+ {
+ if (v == view)
+ {
+ return &dock;
+ }
+ }
+ }
}
LOG_ERROR("DockWidget was not found for view.");
diff --git a/src/lib_gui/qt/window/QtStartScreen.cpp b/src/lib_gui/qt/window/QtStartScreen.cpp
index 49e8d2c2..7020aaf4 100644
--- a/src/lib_gui/qt/window/QtStartScreen.cpp
+++ b/src/lib_gui/qt/window/QtStartScreen.cpp
@@ -78,6 +78,7 @@ QtStartScreen::QtStartScreen(QWidget *parent)
: QtWindow(parent)
{
this->raise();
+ setWindowModality(Qt::ApplicationModal);
}
QSize QtStartScreen::sizeHint() const
diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp
index f9fbbdd9..c8cb015c 100644
--- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp
+++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp
@@ -131,20 +131,6 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
row++;
- // ignore non-fatal errors in non-indexed files
- m_fatalErrors = new QCheckBox("Display non-fatal errors in unindexed files", this);
-
- layout->addWidget(createFormLabel("Non-Fatal Errors"), row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignRight);
- layout->addWidget(m_fatalErrors, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignLeft);
-
- addHelpButton(
- "When checked non-fatal errors within included unindexed files are also shown."
- , layout, row
- );
-
- layout->setRowMinimumHeight(row, 30);
- row++;
-
layout->setRowMinimumHeight(row++, 20);
@@ -268,7 +254,6 @@ void QtProjectWizzardContentPreferences::load()
m_pluginPort->setText(QString::number(appSettings->getPluginPort()));
m_threads->setCurrentIndex(appSettings->getIndexerThreadCount() - 1);
- m_fatalErrors->setChecked(appSettings->getShowExternalNonFatalErrors());
if (m_javaPath)
{
@@ -302,7 +287,6 @@ void QtProjectWizzardContentPreferences::save()
if (pluginPort) appSettings->setPluginPort(pluginPort);
appSettings->setIndexerThreadCount(m_threads->currentIndex() + 1);
- appSettings->setShowExternalNonFatalErrors(m_fatalErrors->isChecked());
if (m_javaPath)
{
diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h
index 773b8225..bbf9a9e8 100644
--- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h
+++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h
@@ -48,7 +48,6 @@ private:
QLineEdit* m_pluginPort;
QComboBox* m_threads;
- QCheckBox* m_fatalErrors;
std::shared_ptr m_javaPathDetector;
QComboBox* m_javaPathDetectorBox;