Merge remote-tracking branch 'origin/release/22.08'

This commit is contained in:
Albert Astals Cid 2022-08-02 23:28:24 +02:00
commit c9b338de10
4 changed files with 6 additions and 6 deletions

View File

@ -42,13 +42,13 @@ 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 && 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
- run-clang-tidy-13
- run-clang-tidy-14
- rm -rf *
- echo "Now compiling the mobile UI"
- 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" .
- 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-13
- run-clang-tidy-14
clang_format:
stage: build

View File

@ -96,7 +96,7 @@ bool Index::makeIndex(const QList<QUrl> &docs, EBook *chmFile)
return false;
}
QUrl filename = *it;
const QUrl &filename = *it;
QStringList terms;
if (parseDocumentToStringlist(chmFile, filename, terms)) {

View File

@ -79,7 +79,7 @@ QString EpubDocument::checkCSS(const QString &c)
std::size_t i = 0;
const QRegularExpression re(QStringLiteral("(([0-9]+)(\\.[0-9]+)?)r?em(.*)"));
while (i < cssArrayCount) {
auto item = cssArray[i];
const auto &item = cssArray[i];
QRegularExpressionMatch match = re.match(item);
if (match.hasMatch()) {
double em = match.captured(1).toDouble();

View File

@ -1434,13 +1434,13 @@ QFont XpsFile::getFontByName(const QString &absoluteFileName, float size)
qCWarning(OkularXpsDebug) << "The unexpected has happened. No font family for a known font:" << absoluteFileName << index;
return QFont();
}
const QString fontFamily = fontFamilies[0];
const QString &fontFamily = fontFamilies[0];
const QStringList fontStyles = m_fontDatabase.styles(fontFamily);
if (fontStyles.isEmpty()) {
qCWarning(OkularXpsDebug) << "The unexpected has happened. No font style for a known font family:" << absoluteFileName << index << fontFamily;
return QFont();
}
const QString fontStyle = fontStyles[0];
const QString &fontStyle = fontStyles[0];
return m_fontDatabase.font(fontFamily, fontStyle, qRound(size));
}