mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-01 05:33:33 +00:00
Merge remote-tracking branch 'origin/release/21.12'
This commit is contained in:
commit
b38b2dfe52
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
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,google-explicit-constructor,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings,-bugprone-suspicious-include,-bugprone-reserved-identifier,-performance-no-automatic-move,-bugprone-suspicious-enum-usage'
|
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,google-explicit-constructor,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings,-bugprone-suspicious-include,-bugprone-reserved-identifier,-performance-no-automatic-move,-bugprone-suspicious-enum-usage,-bugprone-easily-swappable-parameters,-performance-no-int-to-ptr,-bugprone-implicit-widening-of-multiplication-result'
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
HeaderFilterRegex: '.*/okular/.*'
|
HeaderFilterRegex: '.*/okular/.*'
|
||||||
AnalyzeTemporaryDtors: false
|
AnalyzeTemporaryDtors: false
|
||||||
|
|
|
@ -24,11 +24,11 @@ build_ubuntu_20_04:
|
||||||
|
|
||||||
build_clazy_clang_tidy:
|
build_clazy_clang_tidy:
|
||||||
stage: build
|
stage: build
|
||||||
image: debian:testing
|
image: debian:unstable
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
before_script:
|
before_script:
|
||||||
- echo 'deb-src http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
|
- echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install --yes eatmydata
|
- apt-get install --yes eatmydata
|
||||||
- eatmydata apt-get build-dep --yes --no-install-recommends okular
|
- eatmydata apt-get build-dep --yes --no-install-recommends okular
|
||||||
|
@ -37,13 +37,13 @@ build_clazy_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 && cp "$srcdir/.clang-tidy" .
|
- 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 && cp "$srcdir/.clang-tidy" .
|
||||||
- CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch" 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,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch" ninja
|
||||||
- run-clang-tidy
|
- run-clang-tidy-13
|
||||||
- rm -rf *
|
- rm -rf *
|
||||||
- echo "Now compiling the mobile UI"
|
- echo "Now compiling the mobile UI"
|
||||||
- cd "$CI_PROJECT_DIR"
|
- cd "$CI_PROJECT_DIR"
|
||||||
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DOKULAR_UI=mobile -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 && cp "$srcdir/.clang-tidy" .
|
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DOKULAR_UI=mobile -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 && cp "$srcdir/.clang-tidy" .
|
||||||
- CLAZY_IGNORE_DIRS="settings_mobile.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch" ninja
|
- CLAZY_IGNORE_DIRS="settings_mobile.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch" ninja
|
||||||
- run-clang-tidy
|
- run-clang-tidy-13
|
||||||
|
|
||||||
clang_format:
|
clang_format:
|
||||||
stage: build
|
stage: build
|
||||||
|
|
|
@ -623,9 +623,13 @@ Okular::Document::OpenResult PDFGenerator::init(QVector<Okular::Page *> &pagesVe
|
||||||
pdfdoc->unlock(password.toLatin1(), password.toLatin1());
|
pdfdoc->unlock(password.toLatin1(), password.toLatin1());
|
||||||
|
|
||||||
if (pdfdoc->isLocked()) {
|
if (pdfdoc->isLocked()) {
|
||||||
delete pdfdoc;
|
pdfdoc->unlock(password.toUtf8(), password.toUtf8());
|
||||||
pdfdoc = nullptr;
|
|
||||||
return Okular::Document::OpenNeedsPassword;
|
if (pdfdoc->isLocked()) {
|
||||||
|
delete pdfdoc;
|
||||||
|
pdfdoc = nullptr;
|
||||||
|
return Okular::Document::OpenNeedsPassword;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue