Commit d1c2eed1 authored by Albert Astals Cid's avatar Albert Astals Cid

Make the CI pass with new clang-tidy

Disable bugprone-suspicious-include since it's triggered by the moc

Disable bugprone-reserved-identifier since it's triggered by all our
_OKULAR defines, and yes even if the spec says that underscore is
reserved, are we going to be that unlucky that the library decides to
start using _OKULAR ? not probably

Add two TODOs for the future to make NormalizedRect/Point faster

Silence a warning about a quick moving QString if we make it non const

Silence a uchar vs char warning that is in decades old code so
experience seems to suggest it's ok.
parent 4f2c2b27
Pipeline #43522 passed with stage
in 32 minutes and 32 seconds
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,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'
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,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,-bugprone-suspicious-include,-bugprone-reserved-identifier'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*/okular/.*'
AnalyzeTemporaryDtors: false
......@@ -141,7 +141,8 @@ public:
NormalizedPoint &operator=(const NormalizedPoint &);
NormalizedPoint(const NormalizedPoint &);
// TODO next ABI break, move the = default to here
~NormalizedPoint(); // NOLINT(performance-trivially-destructible)
* Transforms the normalized point with the operations defined by @p matrix.
......@@ -237,7 +238,8 @@ public:
NormalizedRect &operator=(const NormalizedRect &other);
// TODO next ABI break, move the = default to here
~NormalizedRect(); // NOLINT(performance-trivially-destructible)
* Build a normalized rect from a QRectF, which already has normalized coordinates.
......@@ -420,7 +420,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
convertedFiles[PDFFilename] = convertedFileName;
return convertedFileName;
return convertedFileName; //// NOLINT(performance-no-automatic-move) QString is cheap to copy and we prefer the const safety
bool dvifile::saveAs(const QString &filename)
......@@ -102,7 +102,7 @@ long snum(FILE *fp, int size)
long x;
#ifdef __STDC__
x = (signed char)getc(fp);
x = (signed char)getc(fp); // NOLINT(bugprone-signed-char-misuse) This code is decades old, so prefer not to touch it
x = (unsigned char)getc(fp);
if (x & 0x80)
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