summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--api/dead/README.md3
-rw-r--r--api/dead/src/AbstractCommonModel.cpp (renamed from api/logic/AbstractCommonModel.cpp)0
-rw-r--r--api/dead/src/AbstractCommonModel.h (renamed from api/logic/AbstractCommonModel.h)0
-rw-r--r--api/dead/src/BaseConfigObject.cpp (renamed from api/logic/BaseConfigObject.cpp)0
-rw-r--r--api/dead/src/BaseConfigObject.h (renamed from api/logic/BaseConfigObject.h)0
-rw-r--r--api/dead/src/TypeMagic.h (renamed from api/logic/TypeMagic.h)0
-rw-r--r--api/dead/src/handlers/IconResourceHandler.cpp (renamed from application/handlers/IconResourceHandler.cpp)0
-rw-r--r--api/dead/src/handlers/IconResourceHandler.h (renamed from application/handlers/IconResourceHandler.h)0
-rw-r--r--api/dead/src/handlers/WebResourceHandler.cpp (renamed from application/handlers/WebResourceHandler.cpp)0
-rw-r--r--api/dead/src/handlers/WebResourceHandler.h (renamed from application/handlers/WebResourceHandler.h)0
-rw-r--r--api/dead/src/resources/Resource.cpp (renamed from api/logic/resources/Resource.cpp)0
-rw-r--r--api/dead/src/resources/Resource.h (renamed from api/logic/resources/Resource.h)0
-rw-r--r--api/dead/src/resources/ResourceHandler.cpp (renamed from api/logic/resources/ResourceHandler.cpp)0
-rw-r--r--api/dead/src/resources/ResourceHandler.h (renamed from api/logic/resources/ResourceHandler.h)0
-rw-r--r--api/dead/src/resources/ResourceObserver.cpp (renamed from api/logic/resources/ResourceObserver.cpp)0
-rw-r--r--api/dead/src/resources/ResourceObserver.h (renamed from api/logic/resources/ResourceObserver.h)0
-rw-r--r--api/dead/src/resources/ResourceProxyModel.cpp (renamed from api/logic/resources/ResourceProxyModel.cpp)0
-rw-r--r--api/dead/src/resources/ResourceProxyModel.h (renamed from api/logic/resources/ResourceProxyModel.h)0
-rw-r--r--api/dead/test/tst_Resource.cpp (renamed from tests/tst_Resource.cpp)0
-rw-r--r--api/logic/CMakeLists.txt15
-rw-r--r--application/CMakeLists.txt6
-rw-r--r--application/MainWindow.cpp1
-rw-r--r--application/MultiMC.cpp17
-rw-r--r--cmake/Coverage.cmake13
-rw-r--r--cmake/Coverity.cmake35
-rw-r--r--tests/CMakeLists.txt60
-rw-r--r--wonkoclient/WonkoClient.cpp1
28 files changed, 5 insertions, 155 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a82c3695..3db0df73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,10 +20,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
######## Set module path ########
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
-# Only used for test coverage
-set(MMC_SRC "${PROJECT_SOURCE_DIR}")
-set(MMC_BIN "${PROJECT_BINARY_DIR}")
-
# Output all executables and shared libs in the main build folder, not in subfolders.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
if(UNIX)
@@ -37,7 +33,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED true)
set(CMAKE_C_STANDARD_REQUIRED true)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 11)
-include(Coverage)
include(GenerateExportHeader)
set(CMAKE_CXX_FLAGS " -Wall -D_GLIBCXX_USE_CXX11_ABI=0 ${CMAKE_CXX_FLAGS}")
if(UNIX AND APPLE)
@@ -45,8 +40,6 @@ if(UNIX AND APPLE)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
-# cmake code needed for the coverity scan upload
-include(Coverity)
################################ 3rd Party Libs ################################
@@ -108,8 +101,6 @@ add_subdirectory(libraries/pack200) # java pack200 compression
add_subdirectory(libraries/rainbow) # Qt extension for colors
add_subdirectory(libraries/iconfix) # fork of Qt's QIcon loader
-include(Coverity)
-
############################### Built Artifacts ###############################
add_subdirectory(tests)
diff --git a/api/dead/README.md b/api/dead/README.md
new file mode 100644
index 00000000..520b18d3
--- /dev/null
+++ b/api/dead/README.md
@@ -0,0 +1,3 @@
+This stuff is dead code I collected from the repository that still looks like it might be useful for something.
+
+Moved on 10. April 2016 - if it hasn't been moved or used in a while, delete this.
diff --git a/api/logic/AbstractCommonModel.cpp b/api/dead/src/AbstractCommonModel.cpp
index 71d75829..71d75829 100644
--- a/api/logic/AbstractCommonModel.cpp
+++ b/api/dead/src/AbstractCommonModel.cpp
diff --git a/api/logic/AbstractCommonModel.h b/api/dead/src/AbstractCommonModel.h
index 31b86a23..31b86a23 100644
--- a/api/logic/AbstractCommonModel.h
+++ b/api/dead/src/AbstractCommonModel.h
diff --git a/api/logic/BaseConfigObject.cpp b/api/dead/src/BaseConfigObject.cpp
index 3040ac2e..3040ac2e 100644
--- a/api/logic/BaseConfigObject.cpp
+++ b/api/dead/src/BaseConfigObject.cpp
diff --git a/api/logic/BaseConfigObject.h b/api/dead/src/BaseConfigObject.h
index 1c96b3d1..1c96b3d1 100644
--- a/api/logic/BaseConfigObject.h
+++ b/api/dead/src/BaseConfigObject.h
diff --git a/api/logic/TypeMagic.h b/api/dead/src/TypeMagic.h
index fa9d12a9..fa9d12a9 100644
--- a/api/logic/TypeMagic.h
+++ b/api/dead/src/TypeMagic.h
diff --git a/application/handlers/IconResourceHandler.cpp b/api/dead/src/handlers/IconResourceHandler.cpp
index b03553fd..b03553fd 100644
--- a/application/handlers/IconResourceHandler.cpp
+++ b/api/dead/src/handlers/IconResourceHandler.cpp
diff --git a/application/handlers/IconResourceHandler.h b/api/dead/src/handlers/IconResourceHandler.h
index 0cc4de4f..0cc4de4f 100644
--- a/application/handlers/IconResourceHandler.h
+++ b/api/dead/src/handlers/IconResourceHandler.h
diff --git a/application/handlers/WebResourceHandler.cpp b/api/dead/src/handlers/WebResourceHandler.cpp
index 757b870a..757b870a 100644
--- a/application/handlers/WebResourceHandler.cpp
+++ b/api/dead/src/handlers/WebResourceHandler.cpp
diff --git a/application/handlers/WebResourceHandler.h b/api/dead/src/handlers/WebResourceHandler.h
index 54bef6a1..54bef6a1 100644
--- a/application/handlers/WebResourceHandler.h
+++ b/api/dead/src/handlers/WebResourceHandler.h
diff --git a/api/logic/resources/Resource.cpp b/api/dead/src/resources/Resource.cpp
index e95675d7..e95675d7 100644
--- a/api/logic/resources/Resource.cpp
+++ b/api/dead/src/resources/Resource.cpp
diff --git a/api/logic/resources/Resource.h b/api/dead/src/resources/Resource.h
index 63e97b88..63e97b88 100644
--- a/api/logic/resources/Resource.h
+++ b/api/dead/src/resources/Resource.h
diff --git a/api/logic/resources/ResourceHandler.cpp b/api/dead/src/resources/ResourceHandler.cpp
index 46a4422c..46a4422c 100644
--- a/api/logic/resources/ResourceHandler.cpp
+++ b/api/dead/src/resources/ResourceHandler.cpp
diff --git a/api/logic/resources/ResourceHandler.h b/api/dead/src/resources/ResourceHandler.h
index f09d8904..f09d8904 100644
--- a/api/logic/resources/ResourceHandler.h
+++ b/api/dead/src/resources/ResourceHandler.h
diff --git a/api/logic/resources/ResourceObserver.cpp b/api/dead/src/resources/ResourceObserver.cpp
index 4f168fd2..4f168fd2 100644
--- a/api/logic/resources/ResourceObserver.cpp
+++ b/api/dead/src/resources/ResourceObserver.cpp
diff --git a/api/logic/resources/ResourceObserver.h b/api/dead/src/resources/ResourceObserver.h
index c42e41ba..c42e41ba 100644
--- a/api/logic/resources/ResourceObserver.h
+++ b/api/dead/src/resources/ResourceObserver.h
diff --git a/api/logic/resources/ResourceProxyModel.cpp b/api/dead/src/resources/ResourceProxyModel.cpp
index f026d9a9..f026d9a9 100644
--- a/api/logic/resources/ResourceProxyModel.cpp
+++ b/api/dead/src/resources/ResourceProxyModel.cpp
diff --git a/api/logic/resources/ResourceProxyModel.h b/api/dead/src/resources/ResourceProxyModel.h
index 98a3dbd1..98a3dbd1 100644
--- a/api/logic/resources/ResourceProxyModel.h
+++ b/api/dead/src/resources/ResourceProxyModel.h
diff --git a/tests/tst_Resource.cpp b/api/dead/test/tst_Resource.cpp
index 4bf41a03..4bf41a03 100644
--- a/tests/tst_Resource.cpp
+++ b/api/dead/test/tst_Resource.cpp
diff --git a/api/logic/CMakeLists.txt b/api/logic/CMakeLists.txt
index 317627d5..a7013c9d 100644
--- a/api/logic/CMakeLists.txt
+++ b/api/logic/CMakeLists.txt
@@ -16,11 +16,6 @@ set(LOGIC_SOURCES
MMCZip.cpp
MMCStrings.h
MMCStrings.cpp
- BaseConfigObject.h
- BaseConfigObject.cpp
- AbstractCommonModel.h
- AbstractCommonModel.cpp
- TypeMagic.h
# Prefix tree where node names are strings between separators
SeparatorPrefixTree.h
@@ -47,16 +42,6 @@ set(LOGIC_SOURCES
# a smart pointer wrapper intended for safer use with Qt signal/slot mechanisms
QObjectPtr.h
- # Resources
- resources/Resource.cpp
- resources/Resource.h
- resources/ResourceHandler.cpp
- resources/ResourceHandler.h
- resources/ResourceObserver.cpp
- resources/ResourceObserver.h
- resources/ResourceProxyModel.h
- resources/ResourceProxyModel.cpp
-
# Path matchers
pathmatcher/FSTreeMatcher.h
pathmatcher/IPathMatcher.h
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index f1a95a8a..15934e3e 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -86,12 +86,6 @@ SET(MULTIMC_SOURCES
BuildConfig.h
${PROJECT_BINARY_DIR}/BuildConfig.cpp
- # Resource handlers and transformers
- handlers/IconResourceHandler.cpp
- handlers/IconResourceHandler.h
- handlers/WebResourceHandler.cpp
- handlers/WebResourceHandler.h
-
# GUI - general utilities
GuiUtil.h
GuiUtil.cpp
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 97c0b02a..1dcc5982 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -62,7 +62,6 @@
#include <net/CacheDownload.h>
#include <news/NewsChecker.h>
#include <notifications/NotificationChecker.h>
-#include <resources/Resource.h>
#include <tools/BaseProfiler.h>
#include <updater/DownloadTask.h>
#include <updater/UpdateChecker.h>
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 24e71fa0..b157c83d 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -45,9 +45,6 @@
#include "settings/Setting.h"
#include "trans/TranslationDownloader.h"
-#include "resources/Resource.h"
-#include "handlers/IconResourceHandler.h"
-#include "handlers/WebResourceHandler.h"
#include "minecraft/ftb/FTBPlugin.h"
@@ -347,19 +344,6 @@ void MultiMC::initIcons()
{
m_icons->directoryChanged(value.toString());
});
-
- //FIXME: none of this should be here.
- Resource::registerHandler<WebResourceHandler>("web");
- Resource::registerHandler<IconResourceHandler>("icon");
-
- Resource::registerTransformer([](const QByteArray &data) -> QPixmap
- {
- return QPixmap::fromImage(QImage::fromData(data));
- });
- Resource::registerTransformer([](const QByteArray &data) -> QIcon
- {
- return QIcon(QPixmap::fromImage(QImage::fromData(data)));
- });
}
@@ -912,7 +896,6 @@ FAILED:
void MultiMC::setIconTheme(const QString& name)
{
XdgIcon::setThemeName(name);
- IconResourceHandler::setTheme(name);
}
QIcon MultiMC::getThemedIcon(const QString& name)
diff --git a/cmake/Coverage.cmake b/cmake/Coverage.cmake
deleted file mode 100644
index 28efbf1c..00000000
--- a/cmake/Coverage.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-if(__COVERAGE_CMAKE__)
- return()
-endif()
-set(__COVERAGE_CMAKE__ TRUE)
-
-if(MultiMC_CODE_COVERAGE)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 --coverage")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 --coverage")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 --coverage")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O0 --coverage")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0 --coverage")
- set(CMAKE_BUILD_TYPE "Debug")
-endif(MultiMC_CODE_COVERAGE)
diff --git a/cmake/Coverity.cmake b/cmake/Coverity.cmake
deleted file mode 100644
index 1fcec86f..00000000
--- a/cmake/Coverity.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-if(__COVERITY_CMAKE__)
- return()
-endif()
-set(__COVERITY_CMAKE__ TRUE)
-
-include(GitFunctions)
-
-git_run(COMMAND config --get user.email DEFAULT "" OUTPUT_VAR GIT_EMAIL)
-git_run(COMMAND describe DEFAULT "" OUTPUT_VAR GIT_VERSION)
-
-set(MultiMC_COVERITY_TOKEN "" CACHE STRING "Coverity access token")
-set(MultiMC_COVERITY_EMAIL "${GIT_EMAIL}" CACHE STRING "Coverity email")
-
-set(MultiMC_COVERITY_TOOLS_DIR "${CMAKE_BINARY_DIR}/coverity_tools" CACHE PATH "Path to the coverity tools")
-
-find_program(CURL_EXECUTABLE NAMES curl PATHS /usr/bin)
-
-if(NOT CURL_EXECUTABLE STREQUAL "" AND NOT MultiMC_COVERITY_TOKEN STREQUAL "" AND NOT MultiMC_COVERITY_EMAIL STREQUAL "")
- add_custom_target(coverity_configure
- COMMAND ${MultiMC_COVERITY_TOOLS_DIR}/bin/cov-configure --comptype gcc --compiler ${CMAKE_C_COMPILER}
- )
- add_custom_target(coverity_create_tarball
- COMMAND ${CMAKE_COMMAND} -E echo "Cleaning..." && ${CMAKE_MAKE_PROGRAM} clean
- COMMAND ${CMAKE_COMMAND} -E echo "Building..." && ${MultiMC_COVERITY_TOOLS_DIR}/bin/cov-build --dir cov-int ${CMAKE_MAKE_PROGRAM} -j3
- COMMAND ${CMAKE_COMMAND} -E echo "Creating tarball..." && ${CMAKE_COMMAND} -E tar cfz multimc_coverity.tgz cov-int/
- COMMENT "Creating coverity build..."
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
- add_custom_target(coverity_upload
- COMMAND ${CURL_EXECUTABLE} --form project=02JanDal/MultiMC5 --form token=${MultiMC_COVERITY_TOKEN} --form email=${MultiMC_COVERITY_EMAIL} --form file=@multimc_coverity.tgz --form version=${MultiMC_GIT_COMMIT} --form description=${GIT_VERSION} http://scan5.coverity.com/cgi-bin/upload.py
- DEPENDS coverity_create_tarball
- COMMENT "Uploading to coverity..."
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-endif()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 409462a2..12fa4108 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -20,7 +20,7 @@ macro(add_unit_test name)
add_test(NAME ${name} COMMAND tst_${name})
endmacro()
-# Tests START #
+# Tests BEGIN #
add_unit_test(gradlespecifier tst_gradlespecifier.cpp)
add_unit_test(userutils tst_userutils.cpp)
@@ -32,7 +32,7 @@ add_unit_test(UpdateChecker tst_UpdateChecker.cpp)
add_unit_test(DownloadTask tst_DownloadTask.cpp)
add_unit_test(filematchers tst_filematchers.cpp)
add_unit_test(ModList tst_ModList.cpp)
-add_unit_test(Resource tst_Resource.cpp)
+# add_unit_test(Resource tst_Resource.cpp)
add_unit_test(GZip tst_GZip.cpp)
add_unit_test(JavaVersion tst_JavaVersion.cpp)
add_unit_test(ParseUtils tst_ParseUtils.cpp)
@@ -44,62 +44,6 @@ add_unit_test(WonkoIndex tst_WonkoIndex.cpp)
# Tests END #
-set(COVERAGE_SOURCE_DIRS
- ${MMC_SRC}/logic/*
- ${MMC_SRC}/logic/auth/*
- ${MMC_SRC}/logic/auth/flows/*
- ${MMC_SRC}/logic/lists/*
- ${MMC_SRC}/logic/net/*
- ${MMC_SRC}/logic/tasks/*
- ${MMC_SRC}/application/*
- ${MMC_SRC}/application/dialogs/*
- ${MMC_SRC}/application/widgets/*
- ${MMC_SRC}/depends/settings/include/*
- ${MMC_SRC}/depends/settings/src/*
- ${MMC_SRC}/depends/util/include/*
- ${MMC_SRC}/depends/util/src/*
-)
-
-if(MultiMC_CODE_COVERAGE)
- unset(MultiMC_RUN_TESTS)
- unset(MultiMC_TEST_COVERAGE_FILES)
-
- foreach(test ${MultiMC_TESTS})
- add_custom_target(MultiMC_RUN_TEST_${test}
- COMMAND lcov -d ${CMAKE_CURRENT_BINARY_DIR} -z -q # clean test
- && lcov -d ${MMC_BIN} -z -q # clean common
- && lcov -d ${MMC_BIN}/depends/settings/CMakeFiles/libSettings.dir -z -q # clean settings
- && lcov -d ${MMC_BIN}/depends/utils/CMakeFiles/libUtil.dir -z -q # clean utils
- && ${MMC_BIN}/${test} -o coverage_${test}.out,xml # run test
- && lcov -q --checksum -b ${MMC_SRC} -d ${CMAKE_CURRENT_BINARY_DIR} -c -o coverage_${test}.info # generate for test
- && lcov -q --checksum -b ${MMC_SRC} -d ${MMC_BIN} -c -o coverage_common.info # generate for common
- && lcov -q --checksum -b ${MMC_SRC} -d ${MMC_BIN}/depends/settings/CMakeFiles/libSettings.dir -c -o coverage_settings.info # generate for settings
- && lcov -q --checksum -b ${MMC_SRC} -d ${MMC_BIN}/depends/util/CMakeFiles/libUtil.dir -c -o coverage_utils.info # generate for utils
- && lcov -q --checksum -b ${MMC_SRC} -d .
- -a coverage_${test}.info -a coverage_common.info -a coverage_settings.info -a coverage_utils.info
- -o coverage_${test}-combined.info # combine test and common
- && lcov -q --checksum -b ${MMC_SRC} --list-full-path --extract coverage_${test}-combined.info ${COVERAGE_SOURCE_DIRS} -o coverage_${test}-stripped.info # strip
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- VERBATIM
- DEPENDS ${test}
- COMMENT "Running ${test}..."
- )
- list(APPEND MultiMC_TEST_COVERAGE_FILES coverage_${test}-stripped.info)
- list(APPEND MultiMC_RUN_TESTS MultiMC_RUN_TEST_${test})
- endforeach(test)
-
- add_custom_target(MultiMC_GENERATE_COVERAGE
- DEPENDS ${MultiMC_RUN_TESTS}
- COMMENT "Generating coverage files..."
- )
- add_custom_target(MultiMC_GENERATE_COVERAGE_HTML
- COMMAND genhtml -t "MultiMC 5 Test Coverage" --num-spaces 4 --demangle-cpp --legend -o ${MMC_SRC}/html/coverage ${MultiMC_TEST_COVERAGE_FILES}
- DEPENDS MultiMC_GENERATE_COVERAGE
- COMMENT "Generating test coverage html..."
- )
- add_custom_target(MultiMC_RUN_TESTS DEPENDS MultiMC_GENERATE_COVERAGE_HTML)
-endif(MultiMC_CODE_COVERAGE)
-
set(MultiMC_TEST_DATA_PATH "${CMAKE_CURRENT_BINARY_DIR}/data")
set(MultiMC_TEST_DATA_PATH_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/data")
diff --git a/wonkoclient/WonkoClient.cpp b/wonkoclient/WonkoClient.cpp
index ca22d407..dd0dfae5 100644
--- a/wonkoclient/WonkoClient.cpp
+++ b/wonkoclient/WonkoClient.cpp
@@ -9,7 +9,6 @@
#include <minecraft/legacy/LwjglVersionList.h>
#include <java/JavaInstallList.h>
#include <settings/INISettingsObject.h>
-#include <resources/Resource.h>
#include "WonkoClient.h"
WonkoClient &WonkoClient::getInstance() {