Coverage Report

Created: 2026-08-17 07:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/syntax-highlighting/src/lib/xml_p.h
Line
Count
Source
1
/*
2
    SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org>
3
4
    SPDX-License-Identifier: MIT
5
*/
6
7
#ifndef KSYNTAXHIGHLIGHTING_XML_P_H
8
#define KSYNTAXHIGHLIGHTING_XML_P_H
9
10
#include <QString>
11
12
namespace KSyntaxHighlighting
13
{
14
/** Utilities for XML parsing. */
15
namespace Xml
16
{
17
/** Parse a xs:boolean attribute. */
18
inline bool attrToBool(QStringView str)
19
1.88k
{
20
1.88k
    return str == QStringLiteral("1") || str.compare(QStringLiteral("true"), Qt::CaseInsensitive) == 0;
21
1.88k
}
22
23
}
24
}
25
26
#endif