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
22
24{
25public:
26 explicit MockSourceResolver(const QUrl &ret = QUrl()) : m_return(ret) { }
27 QUrl resolve(QUrl in) const override
28 {
30 m_lastInput = in;
31 if (!m_return.isEmpty())
32 return m_return;
33 return in;
34 }
35
36 mutable int m_callCount{};
39};
40
41} // namespace QtMultimediaTest
42
43#endif // QMOCKRESOLVERS_P_H
MockSourceResolver(const QUrl &ret=QUrl())
QUrl resolve(QUrl in) const override