diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c17547a04..73a140c57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ build_clazy_clang_tidy: script: - srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir && cat compile_commands.json | jq '[.[] | select(.file | contains("'"$srcdir"'"))]' > compile_commands.aux.json && cat compile_commands.aux.json | jq '[.[] | select(.file | contains("/synctex/")| not)]' > compile_commands.json - - CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-qstring-allocations,isempty-vs-count,qhash-with-char-pointer-key" ninja + - CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-qstring-allocations,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function" ninja # Fix the poppler header, remove when debian:unstable ships poppler 0.82 or later - sed -i "N;N;N;N; s#class MediaRendition\;\nclass MovieAnnotation\;\nclass ScreenAnnotation;#class MediaRendition\;#g" /usr/include/poppler/qt5/poppler-link.h - "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-loop-convert,modernize-use-nullptr,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config=\"{WarningsAsErrors: '*'}\"" diff --git a/generators/chm/lib/ebook_chm.cpp b/generators/chm/lib/ebook_chm.cpp index 28a282707..b1a56cea1 100644 --- a/generators/chm/lib/ebook_chm.cpp +++ b/generators/chm/lib/ebook_chm.cpp @@ -42,7 +42,7 @@ static const char * URL_SCHEME_CHM = "ms-its"; EBook_CHM::EBook_CHM() : EBook() { - m_envOptions = getenv("KCHMVIEWEROPTS"); + m_envOptions = qgetenv("KCHMVIEWEROPTS"); m_chmFile = nullptr; m_filename = m_font = QString(); diff --git a/generators/plucker/unpluck/config.cpp b/generators/plucker/unpluck/config.cpp index 98611e0e9..05685aa20 100644 --- a/generators/plucker/unpluck/config.cpp +++ b/generators/plucker/unpluck/config.cpp @@ -269,7 +269,7 @@ static void InitializeConfigInfo () const char *config_dir = STRINGIFY (PLUCKER_CONFIG_DIR); const char *system_config_file_name = STRINGIFY (SYS_CONFIG_FILE_NAME); const char *user_config_filename = STRINGIFY (USER_CONFIG_FILE_NAME); - char *home = getenv ("HOME"); + char *home = getenv ("HOME"); //clazy:exclude=raw-environment-function TryReadConfigFile (config_dir, system_config_file_name); if (home != nullptr)