Commit 6ddb7e6c authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

CI: Enable clazy qhash-namespace

parent 1a05112b
...@@ -48,7 +48,7 @@ build_clang_tidy: ...@@ -48,7 +48,7 @@ build_clang_tidy:
script: 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 - 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" ninja - CLAZY_CHECKS="qstring-arg,incorrect-emit,qhash-namespace" ninja
# Fix the poppler header, remove when debian:unstable ships poppler 0.82 or later # 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 - 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: '*'}\"" - "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: '*'}\""
...@@ -258,9 +258,9 @@ void NormalizedRect::transform( const QTransform &matrix ) ...@@ -258,9 +258,9 @@ void NormalizedRect::transform( const QTransform &matrix )
bottom = rect.bottom(); bottom = rect.bottom();
} }
uint qHash( const NormalizedRect& r, uint seed ) uint Okular::qHash( const NormalizedRect& r, uint seed )
{ {
return qHash(r.bottom, qHash(r.right, qHash(r.top, qHash(r.left, seed)))); return ::qHash(r.bottom, ::qHash(r.right, ::qHash(r.top, ::qHash(r.left, seed))));
} }
QDebug operator<<( QDebug str, const Okular::NormalizedRect& r ) QDebug operator<<( QDebug str, const Okular::NormalizedRect& r )
......
...@@ -980,9 +980,9 @@ class HighlightAreaRect : public RegularAreaRect ...@@ -980,9 +980,9 @@ class HighlightAreaRect : public RegularAreaRect
QColor color; QColor color;
}; };
uint qHash(const Okular::NormalizedRect& r, uint seed = 0);
} }
uint qHash(const Okular::NormalizedRect& r, uint seed = 0);
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment