From 49315aea940d3e4f3efa57cb2ba4c963d426c384 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 2 Feb 2017 18:38:13 +0000 Subject: [PATCH] Refactor GameDetectionError into GUI code --- CMakeLists.txt | 2 +- docs/api/reference.rst | 3 --- include/loot/api.h | 1 - src/api/game/game.cpp | 1 - src/gui/state/game.cpp | 4 ++-- .../loot/exception => src/gui/state}/game_detection_error.h | 4 ++-- src/gui/state/loot_state.cpp | 1 + src/tests/api/internals/game/game_test.h | 1 - src/tests/gui/state/game_test.h | 2 +- 9 files changed, 7 insertions(+), 12 deletions(-) rename {include/loot/exception => src/gui/state}/game_detection_error.h (92%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4576ae53..71ed08a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,7 +196,6 @@ set (LOOT_API_HEADERS "${CMAKE_SOURCE_DIR}/include/loot/api.h" "${CMAKE_SOURCE_DIR}/include/loot/exception/condition_syntax_error.h" "${CMAKE_SOURCE_DIR}/include/loot/exception/cyclic_interaction_error.h" "${CMAKE_SOURCE_DIR}/include/loot/exception/file_access_error.h" - "${CMAKE_SOURCE_DIR}/include/loot/exception/game_detection_error.h" "${CMAKE_SOURCE_DIR}/include/loot/exception/git_state_error.h" "${CMAKE_SOURCE_DIR}/include/loot/enum/game_type.h" "${CMAKE_SOURCE_DIR}/include/loot/enum/language_code.h" @@ -293,6 +292,7 @@ set (LOOT_GUI_HEADERS "${CMAKE_SOURCE_DIR}/src/gui/editor_message.h" "${CMAKE_SOURCE_DIR}/src/gui/query/update_masterlist_query.h" "${CMAKE_SOURCE_DIR}/src/gui/query_handler.h" "${CMAKE_SOURCE_DIR}/src/gui/state/game.h" + "${CMAKE_SOURCE_DIR}/src/gui/state/game_detection_error.h" "${CMAKE_SOURCE_DIR}/src/gui/state/game_settings.h" "${CMAKE_SOURCE_DIR}/src/gui/state/loot_paths.h" "${CMAKE_SOURCE_DIR}/src/gui/state/loot_settings.h" diff --git a/docs/api/reference.rst b/docs/api/reference.rst index f0b39013..ebf50ca0 100644 --- a/docs/api/reference.rst +++ b/docs/api/reference.rst @@ -55,9 +55,6 @@ Exceptions .. doxygenclass:: loot::GitStateError :members: -.. doxygenclass:: loot::GameDetectionError - :members: - .. doxygenclass:: loot::ConditionSyntaxError :members: diff --git a/include/loot/api.h b/include/loot/api.h index 35b8bd4b..a9a348ad 100644 --- a/include/loot/api.h +++ b/include/loot/api.h @@ -34,7 +34,6 @@ #include "loot/exception/condition_syntax_error.h" #include "loot/exception/cyclic_interaction_error.h" #include "loot/exception/file_access_error.h" -#include "loot/exception/game_detection_error.h" #include "loot/exception/git_state_error.h" #include "loot/enum/game_type.h" #include "loot/enum/log_verbosity.h" diff --git a/src/api/game/game.cpp b/src/api/game/game.cpp index 5ca11f21..3cfe1f35 100644 --- a/src/api/game/game.cpp +++ b/src/api/game/game.cpp @@ -36,7 +36,6 @@ #include "api/api_database.h" #include "api/plugin/plugin_sorter.h" #include "loot/exception/file_access_error.h" -#include "loot/exception/game_detection_error.h" #ifdef _WIN32 # ifndef UNICODE diff --git a/src/gui/state/game.cpp b/src/gui/state/game.cpp index b8924227..0e794027 100644 --- a/src/gui/state/game.cpp +++ b/src/gui/state/game.cpp @@ -33,8 +33,8 @@ #include #include +#include "gui/state/game_detection_error.h" #include "loot/exception/file_access_error.h" -#include "loot/exception/game_detection_error.h" #include "loot/windows_encoding_converters.h" #ifdef _WIN32 @@ -498,4 +498,4 @@ std::string Game::RegKeyStringValue(const std::string& keyStr, const std::string } #endif } -} \ No newline at end of file +} diff --git a/include/loot/exception/game_detection_error.h b/src/gui/state/game_detection_error.h similarity index 92% rename from include/loot/exception/game_detection_error.h rename to src/gui/state/game_detection_error.h index 01a98b48..09d1040f 100644 --- a/include/loot/exception/game_detection_error.h +++ b/src/gui/state/game_detection_error.h @@ -22,8 +22,8 @@ . */ -#ifndef LOOT_EXCEPTION_GAME_DETECTION_ERROR -#define LOOT_EXCEPTION_GAME_DETECTION_ERROR +#ifndef LOOT_GUI_GAME_DETECTION_ERROR +#define LOOT_GUI_GAME_DETECTION_ERROR #include diff --git a/src/gui/state/loot_state.cpp b/src/gui/state/loot_state.cpp index d635295c..0a01c246 100644 --- a/src/gui/state/loot_state.cpp +++ b/src/gui/state/loot_state.cpp @@ -35,6 +35,7 @@ #include #include +#include "gui/state/game_detection_error.h" #include "gui/state/loot_paths.h" #include "loot/api.h" #include "loot/windows_encoding_converters.h" diff --git a/src/tests/api/internals/game/game_test.h b/src/tests/api/internals/game/game_test.h index eca91e21..9166bde6 100644 --- a/src/tests/api/internals/game/game_test.h +++ b/src/tests/api/internals/game/game_test.h @@ -27,7 +27,6 @@ along with LOOT. If not, see #include "api/game/game.h" -#include "loot/exception/game_detection_error.h" #include "tests/common_game_test_fixture.h" namespace loot { diff --git a/src/tests/gui/state/game_test.h b/src/tests/gui/state/game_test.h index b59f0e45..1c50652e 100644 --- a/src/tests/gui/state/game_test.h +++ b/src/tests/gui/state/game_test.h @@ -27,7 +27,7 @@ along with LOOT. If not, see #include "gui/state/game.h" -#include "loot/exception/game_detection_error.h" +#include "gui/state/game_detection_error.h" #include "tests/common_game_test_fixture.h" namespace loot {