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
qmockresolvers_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
//
5
// W A R N I N G
6
// -------------
7
//
8
// This file is not part of the Qt API. It exists purely as an
9
// implementation detail. This header file may change from version to
10
// version without notice, or even be removed.
11
//
12
// We mean it.
13
//
14
15
#
ifndef
QMOCKRESOLVERS_P_H
16
#
define
QMOCKRESOLVERS_P_H
17
18
#
include
<
QtCore
/
qurl
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qmultimedia_source_resolver_p
.
h
>
20
21
namespace
QtMultimediaTest
{
22
23
class
MockSourceResolver
:
public
QMultimediaPrivate
::
AbstractSourceResolver
24
{
25
public
:
26
explicit
MockSourceResolver
(
const
QUrl &ret = QUrl()) :
m_return
(
ret
) { }
27
QUrl
resolve
(QUrl in)
const
override
28
{
29
++
m_callCount
;
30
m_lastInput = in;
31
if
(!m_return.isEmpty())
32
return
m_return;
33
return
in;
34
}
35
36
mutable
int
m_callCount
{};
37
mutable
QUrl
m_lastInput
;
38
QUrl
m_return
;
39
};
40
41
}
// namespace QtMultimediaTest
42
43
#
endif
// QMOCKRESOLVERS_P_H
QtMultimediaTest::MockSourceResolver
Definition
qmockresolvers_p.h:24
QtMultimediaTest::MockSourceResolver::m_lastInput
QUrl m_lastInput
Definition
qmockresolvers_p.h:37
QtMultimediaTest::MockSourceResolver::m_callCount
int m_callCount
Definition
qmockresolvers_p.h:36
QtMultimediaTest::MockSourceResolver::m_return
QUrl m_return
Definition
qmockresolvers_p.h:38
QtMultimediaTest::MockSourceResolver::MockSourceResolver
MockSourceResolver(const QUrl &ret=QUrl())
Definition
qmockresolvers_p.h:26
QtMultimediaTest::MockSourceResolver::resolve
QUrl resolve(QUrl in) const override
Definition
qmockresolvers_p.h:27
QtMultimediaTest
Definition
qmockresolvers_p.h:21
qtmultimedia
src
multimediatestlib
qmockresolvers_p.h
Generated on
for Qt by
1.16.1