From 3ca05fc1f8fd577852932bbf9b0b180a0db0dc34 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 20 Feb 2020 11:15:15 +0100 Subject: [PATCH] Enable clazy qstring-insensitive-allocation --- .gitlab-ci.yml | 2 +- generators/fax/generator_fax.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 922e1d47c..9ecdcfc3e 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_CHECKS="qstring-arg,incorrect-emit,qhash-namespace,detaching-temporary,range-loop,qdeleteall,connect-not-normalized,inefficient-qlist-soft,strict-iterators,lambda-in-connect,fully-qualified-moc-types,qstring-ref,unused-non-trivial-variable,qcolor-from-literal,qcolor-from-literal" ninja + - CLAZY_CHECKS="qstring-arg,incorrect-emit,qhash-namespace,detaching-temporary,range-loop,qdeleteall,connect-not-normalized,inefficient-qlist-soft,strict-iterators,lambda-in-connect,fully-qualified-moc-types,qstring-ref,unused-non-trivial-variable,qcolor-from-literal,qcolor-from-literal,qstring-insensitive-allocation" 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/fax/generator_fax.cpp b/generators/fax/generator_fax.cpp index 8e5eae062..bf7243208 100644 --- a/generators/fax/generator_fax.cpp +++ b/generators/fax/generator_fax.cpp @@ -34,7 +34,7 @@ FaxGenerator::~FaxGenerator() bool FaxGenerator::loadDocument( const QString & fileName, QVector & pagesVector ) { - if ( fileName.toLower().endsWith( QLatin1String(".g3") ) ) + if ( fileName.endsWith( QLatin1String(".g3"), Qt::CaseInsensitive ) ) m_type = FaxDocument::G3; else m_type = FaxDocument::G4;