diff --git a/.gitlab-ci/scheduled.yml b/.gitlab-ci/scheduled.yml index 3a5cc07..b50df9e 100644 --- a/.gitlab-ci/scheduled.yml +++ b/.gitlab-ci/scheduled.yml @@ -36,9 +36,12 @@ variables: - cd build - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_output -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rtis .. - ninja - - ninja install - - ninja package - - ninja package_source + - > + if [ -z "${CI_SHARED_ENVIRONMENT+x}" ]; then + ninja install + ninja package + ninja package_source + fi - echo "${CI_COMMIT_SHA}" > "../${CI_JOB_NAME}.status" artifacts: paths: @@ -66,11 +69,4 @@ variables: .scheduled-elbrus: extends: .scheduled-test tags: ['elbrus'] - variables: - CI_QTDIR: "/opt/qt59" - before_script: - - export QTDIR=$CI_QTDIR - - export PATH="$CI_QTDIR/bin:$PATH" - - export LD_LIBRARY_PATH="$CI_QTDIR/lib:$LD_LIBRARY_PATH" - - export PKG_CONFIG_PATH="$CI_QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH" diff --git a/cmake/cmlib b/cmake/cmlib index 3607309..9002b99 160000 --- a/cmake/cmlib +++ b/cmake/cmlib @@ -1 +1 @@ -Subproject commit 36073091bc042af1ef1f7324d26c503bce3ac148 +Subproject commit 9002b99e3ec498c0cd431a985807b1df81590cd0 diff --git a/cmake/etc/uncrustify b/cmake/etc/uncrustify index 8b08ebe..45284f9 160000 --- a/cmake/etc/uncrustify +++ b/cmake/etc/uncrustify @@ -1 +1 @@ -Subproject commit 8b08ebee41cab2c632736e5ac137f05acfb64766 +Subproject commit 45284f97623b7ae952020771846ccfe2e0a3cf58 diff --git a/cmake/find b/cmake/find index af57d39..d0bc6e7 160000 --- a/cmake/find +++ b/cmake/find @@ -1 +1 @@ -Subproject commit af57d3921c4d944f8475090f42b034518f7c0bc7 +Subproject commit d0bc6e71e9c613eaaecca62eaf445d647f5216ed diff --git a/examples/filesystem/01_minimal/CMakeLists.txt b/examples/filesystem/01_minimal/CMakeLists.txt index 00f62d9..2fd45e9 100644 --- a/examples/filesystem/01_minimal/CMakeLists.txt +++ b/examples/filesystem/01_minimal/CMakeLists.txt @@ -16,9 +16,11 @@ common_target_properties(${current_target}) add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) -add_uncrustify_format(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) + add_dependencies(${current_target} base) add_dependencies(${current_target} filesystem) diff --git a/examples/log/01_minimal/CMakeLists.txt b/examples/log/01_minimal/CMakeLists.txt index 5ca592b..1afb846 100644 --- a/examples/log/01_minimal/CMakeLists.txt +++ b/examples/log/01_minimal/CMakeLists.txt @@ -16,9 +16,11 @@ common_target_properties(${current_target}) add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) -add_uncrustify_format(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) + add_dependencies(${current_target} base) add_dependencies(${current_target} log) diff --git a/examples/log/02_qt/CMakeLists.txt b/examples/log/02_qt/CMakeLists.txt index 8e6d18f..63d94a2 100644 --- a/examples/log/02_qt/CMakeLists.txt +++ b/examples/log/02_qt/CMakeLists.txt @@ -16,9 +16,11 @@ common_target_properties(${current_target}) add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) -add_uncrustify_format(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) + add_dependencies(${current_target} base) add_dependencies(${current_target} log) diff --git a/examples/qt/01_translators/CMakeLists.txt b/examples/qt/01_translators/CMakeLists.txt index 0e228db..5380ca3 100644 --- a/examples/qt/01_translators/CMakeLists.txt +++ b/examples/qt/01_translators/CMakeLists.txt @@ -16,9 +16,11 @@ common_target_properties(${current_target}) add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) -add_uncrustify_format(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) + add_dependencies(${current_target} base) add_dependencies(${current_target} qt) diff --git a/src/myx/base/CMakeLists.txt b/src/myx/base/CMakeLists.txt index 5aca9ab..3e3b4e3 100644 --- a/src/myx/base/CMakeLists.txt +++ b/src/myx/base/CMakeLists.txt @@ -17,7 +17,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) -add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers}) + +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS}) diff --git a/src/myx/filesystem/CMakeLists.txt b/src/myx/filesystem/CMakeLists.txt index f454917..3439d0e 100644 --- a/src/myx/filesystem/CMakeLists.txt +++ b/src/myx/filesystem/CMakeLists.txt @@ -22,7 +22,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) -add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers}) + +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS}) target_include_directories(${current_target} SYSTEM PUBLIC ${FMT_INCLUDE_DIRS}) diff --git a/src/myx/filesystem/paths.cpp b/src/myx/filesystem/paths.cpp index 6929745..869b1c5 100644 --- a/src/myx/filesystem/paths.cpp +++ b/src/myx/filesystem/paths.cpp @@ -211,9 +211,9 @@ bool Paths::makeDefaultDirectories() { bool status = true; - if ( !m_dataDirectory.mkpath( m_dataDirectory.absolutePath() ) ) { status = false; } + if ( !m_dataDirectory.mkpath( m_dataDirectory.absolutePath() ) ) { status = false; } if ( !m_configDirectory.mkpath( m_configDirectory.absolutePath() ) ) { status = false; } - if ( !m_cacheDirectory.mkpath( m_cacheDirectory.absolutePath() ) ) { status = false; } + if ( !m_cacheDirectory.mkpath( m_cacheDirectory.absolutePath() ) ) { status = false; } return( status ); } diff --git a/src/myx/filesystem/whereami.cpp b/src/myx/filesystem/whereami.cpp index 867bf63..c7d5b08 100644 --- a/src/myx/filesystem/whereami.cpp +++ b/src/myx/filesystem/whereami.cpp @@ -68,9 +68,7 @@ int getExecutablePath( char* out, int capacity, int* dirname_length ) if ( dirname_length ) { - int i; - - for ( i = length - 1; i >= 0; --i ) + for ( int i = length - 1; i >= 0; --i ) { if ( out[i] == '/' ) { @@ -156,9 +154,7 @@ int getModulePath( char* out, int capacity, int* dirname_length ) if ( dirname_length ) { - int i; - - for ( i = length - 1; i >= 0; --i ) + for ( int i = length - 1; i >= 0; --i ) { if ( out[i] == '/' ) { diff --git a/src/myx/log/CMakeLists.txt b/src/myx/log/CMakeLists.txt index 1ee6509..8746cbd 100644 --- a/src/myx/log/CMakeLists.txt +++ b/src/myx/log/CMakeLists.txt @@ -20,7 +20,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) -add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers}) + +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS}) target_include_directories(${current_target} SYSTEM PUBLIC ${FMT_INCLUDE_DIRS}) diff --git a/src/myx/qt/CMakeLists.txt b/src/myx/qt/CMakeLists.txt index 0939200..ebcb425 100644 --- a/src/myx/qt/CMakeLists.txt +++ b/src/myx/qt/CMakeLists.txt @@ -16,7 +16,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources}) add_clang_analyze_check(${current_target} ${current_target_sources}) add_clazy_check(${current_target} ${current_target_sources}) add_pvs_check(${current_target}) -add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers}) + +# Форматирование исходников +add_format_sources(${current_target} ${current_target_sources} ${current_target_headers}) target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS}) target_include_directories(${current_target} SYSTEM PUBLIC ${FMT_INCLUDE_DIRS}) diff --git a/src/myx/qt/backports.hpp b/src/myx/qt/backports.hpp index 1288869..50066f6 100644 --- a/src/myx/qt/backports.hpp +++ b/src/myx/qt/backports.hpp @@ -19,7 +19,12 @@ struct QOverload // this adds const to non-const objects (like std::as_const) template < typename T > -Q_DECL_CONSTEXPR typename std::add_const< T >::type& qAsConst( T& t ) noexcept { return( t ); } +Q_DECL_CONSTEXPR typename std::add_const< T >::type& qAsConst( T& t ) noexcept +{ + return( t ); +} + + // prevent rvalue arguments: template < typename T > void qAsConst( const T&& ) = delete;