From e80ed4c131ecfe63b670cd7dbeb85f3ccf51ab91 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 17 Sep 2016 12:59:33 +0200 Subject: [PATCH] Fix minor mistakes --- CMakeLists.txt | 2 +- cli/CMakeLists.txt | 7 +++++-- gui/CMakeLists.txt | 7 +++++-- lib/CMakeLists.txt | 5 +++-- lib/alpm/manager.cpp | 2 +- lib/alpm/repository.h | 2 +- lib/alpm/upgradelookup.cpp | 2 +- lib/global.h | 17 +++++++++++++++++ web/CMakeLists.txt | 2 ++ 9 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 lib/global.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 2080ba9..275764a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "Repository browser for Arch Linux") set(META_VERSION_MAJOR 0) set(META_VERSION_MINOR 2) -set(META_VERSION_PATCH 3) +set(META_VERSION_PATCH 4) project(${META_PROJECT_NAME}) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 695833a..bb58ca6 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -7,12 +7,14 @@ set(SRC_FILES main.cpp ) +set(META_PROJECT_TYPE application) + # find c++utilities -find_package(c++utilities 3.3.0 REQUIRED) +find_package(c++utilities 4.0.0 REQUIRED) use_cpp_utilities() # find qtutilities -find_package(qtutilities 4.0.0 REQUIRED) +find_package(qtutilities 5.0.0 REQUIRED) list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS}) # need to link against the repoindex lib @@ -25,6 +27,7 @@ include(QtConfig) include(WindowsResources) include(AppTarget) include(ShellCompletion) +include(ConfigHeader) # add installs for service and config files install(FILES ../resources/systemd/${META_PROJECT_NAME}.service diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 5af5663..6734a03 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -16,12 +16,14 @@ set(ICON_FILES ../resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg ) +set(META_PROJECT_TYPE application) + # find c++utilities -find_package(c++utilities 3.3.0 REQUIRED) +find_package(c++utilities 4.0.0 REQUIRED) use_cpp_utilities() # find qtutilities -find_package(qtutilities 4.0.0 REQUIRED) +find_package(qtutilities 5.0.0 REQUIRED) use_qt_utilities() # add Qt modules which can currently not be detected automatically @@ -41,6 +43,7 @@ include(WindowsResources) include(WebViewProviderConfig) include(AppTarget) include(ShellCompletion) +include(ConfigHeader) # create desktop file using previously defined meta data add_desktop_file() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fd65c00..56d13d4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -49,11 +49,11 @@ list(APPEND ADDITIONAL_QT_MODULES Concurrent Network WebSockets) list(APPEND ADDITIONAL_KF_MODULES Archive) # find c++utilities -find_package(c++utilities 3.3.0 REQUIRED) +find_package(c++utilities 4.0.0 REQUIRED) use_cpp_utilities() # find qtutilities -find_package(qtutilities 4.0.0 REQUIRED) +find_package(qtutilities 5.0.0 REQUIRED) use_qt_utilities() # prefix the target to avoid conflict with cli target @@ -64,3 +64,4 @@ include(BasicConfig) include(QtConfig) include(WindowsResources) include(LibraryTarget) +include(ConfigHeader) diff --git a/lib/alpm/manager.cpp b/lib/alpm/manager.cpp index 92184da..79ffe74 100644 --- a/lib/alpm/manager.cpp +++ b/lib/alpm/manager.cpp @@ -314,7 +314,7 @@ void Manager::addDataBasesFromPacmanConfig() } else if(dbName.startsWith(QLatin1String("aur"), Qt::CaseInsensitive)) { cerr << shchar << "Error: Unable to add database from pacman config: The database name mustn't start with \"aur\" because this name is reserved for the Arch Linux User Repository." << endl; } else if(m_syncDbMap.count(dbName)) { - cerr << shchar << "Error: Unable to add database from pacman config: Database names must be unique. Ignoring second occurance of database [" << scope.first << "]." << endl; + cerr << shchar << "Error: Unable to add database from pacman config: Database names must be unique. Ignoring second occurrence of database [" << scope.first << "]." << endl; } else { // read sig level and usage const auto &sigLevelStr = lastValue(scope.second, sigLevelKey); diff --git a/lib/alpm/repository.h b/lib/alpm/repository.h index f15f20b..b2fd8d6 100644 --- a/lib/alpm/repository.h +++ b/lib/alpm/repository.h @@ -349,7 +349,7 @@ inline bool Repository::isBusy() const /*! * \brief Returns the index of the repository. * - * The index is used to sort the repositories by their occurance the configuration files. + * The index is used to sort the repositories by their occurrence the configuration files. */ inline uint32 Repository::index() const { diff --git a/lib/alpm/upgradelookup.cpp b/lib/alpm/upgradelookup.cpp index e143ed2..6a4b35b 100644 --- a/lib/alpm/upgradelookup.cpp +++ b/lib/alpm/upgradelookup.cpp @@ -188,7 +188,7 @@ UpgradeLookup::UpgradeLookup(QObject *parent) : * {pkg: ..., basic info of package providing upgrade * curVer: current version * ], - * packageOnlyUpdates: [ package-only upgrades + * packageOnlyUpgrades: [ package-only upgrades * {pkg: ..., basic info of package providing upgrade * curVer: current version * ], diff --git a/lib/global.h b/lib/global.h new file mode 100644 index 0000000..854878e --- /dev/null +++ b/lib/global.h @@ -0,0 +1,17 @@ +// Created via CMake from template global.h.in +// WARNING! Any changes to this file will be overwritten by the next CMake run! + +#ifndef REPOINDEX_GLOBAL +#define REPOINDEX_GLOBAL + +#include + +#ifdef REPOINDEX_STATIC +# define REPOINDEX_EXPORT +# define REPOINDEX_IMPORT +#else +# define REPOINDEX_EXPORT LIB_EXPORT +# define REPOINDEX_IMPORT LIB_IMPORT +#endif + +#endif // REPOINDEX_GLOBAL diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt index 487e480..7e69d04 100644 --- a/web/CMakeLists.txt +++ b/web/CMakeLists.txt @@ -33,6 +33,8 @@ configure_file( "${CMAKE_BINARY_DIR}/web/index.html" ) +set(META_PROJECT_TYPE application) + # add install target for web files / minimizing # -> don't minimize debug builds if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")