Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
packagefilter.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4
#
include
"logging.h"
5
#
include
"packagefilter.h"
6
#
include
<
iostream
>
7
8
PackageFilter
::
PackageFilter
(
const
QString &expression)
9
: type(
InvalidFilter
)
10
{
11
const
QLatin1String filter(
"QDocModule="
);
12
if
(expression.startsWith(filter)) {
13
type =
QDocModuleFilter
;
14
this
->expression = expression.mid(filter.size());
15
}
else
{
16
std::cerr << qPrintable(tr(
"Invalid filter expression \"%1\""
).arg(expression)) << std::endl;
17
std::cerr << qPrintable(tr(
"Currently only \"QDocModule=*\" is supported."
)) << std::endl;
18
}
19
}
20
21
bool
PackageFilter
::
operator
()(
const
Package
&p)
22
{
23
switch
(type) {
24
case
InvalidFilter
:
25
return
true
;
26
case
QDocModuleFilter:
27
return
p.qdocModule == expression;
28
}
29
return
false
;
30
}
PackageFilter
Definition
packagefilter.h:10
PackageFilter::PackageFilter
PackageFilter(const QString &expression)
Definition
packagefilter.cpp:8
PackageFilter::operator()
bool operator()(const Package &p)
Definition
packagefilter.cpp:21
PackageFilter::InvalidFilter
@ InvalidFilter
Definition
packagefilter.h:16
PackageFilter::QDocModuleFilter
@ QDocModuleFilter
Definition
packagefilter.h:17
Package
Definition
package.h:10
qttools
src
qtattributionsscanner
packagefilter.cpp
Generated on Sat Sep 21 2024 00:51:32 for Qt by
1.12.0