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
qformdatabuilder.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QFORMDATABUILDER_H
6#define QFORMDATABUILDER_H
7
8#include <QtNetwork/qtnetworkglobal.h>
9#include <QtNetwork/qhttpheaders.h>
10#include <QtNetwork/qhttpmultipart.h>
11
12#include <QtCore/qbytearray.h>
13#include <QtCore/qflags.h>
14#include <QtCore/qiodevice.h>
15#include <QtCore/qstring.h>
16
17#include <memory>
18#include <variant>
19
20#ifndef Q_OS_WASM
22#endif
23
24QT_BEGIN_NAMESPACE
25
26class QHttpPartPrivate;
27class QHttpMultiPart;
28class QDebug;
29
31class QFormDataPartBuilderPrivate;
32
34{
35 QFormDataPartBuilder(QFormDataBuilderPrivate *qfdb, qsizetype idx) : d(qfdb), m_index(idx) {}
36public:
37 void swap(QFormDataPartBuilder &other) noexcept
38 {
39 qt_ptr_swap(d, other.d);
40 std::swap(m_index, other.m_index);
41 }
42
44 // Rule of zero applies
45
50
58private:
62
63 QFormDataPartBuilderPrivate* d_func();
64 const QFormDataPartBuilderPrivate* d_func() const;
65
67 size_t m_index;
68
69 friend class QFormDataBuilder;
70};
71
72Q_DECLARE_SHARED(QFormDataPartBuilder)
73
106Q_DECLARE_OPERATORS_FOR_FLAGS(QFormDataBuilder::Options)
107
108Q_DECLARE_SHARED(QFormDataBuilder)
109
110QT_END_NAMESPACE
111
112#endif // QFORMDATABUILDER_H
std::vector< QFormDataPartBuilderPrivate > parts
The QFormDataBuilder class is a convenience class to simplify the construction of QHttpMultiPart obje...
QFormDataBuilder(QFormDataBuilder &&other) noexcept
The QFormDataPartBuilder class is a convenience class to simplify the construction of QHttpPart objec...
void swap(QFormDataPartBuilder &other) noexcept
QFormDataPartBuilder()=default
static void convertInto_impl(QByteArray &dst, QUtf8StringView in)
static void convertInto(QByteArray &dst, QAnyStringView in)
static void escapeNameAndAppend(QByteArray &dst, QByteArrayView src)
QT_REQUIRE_CONFIG(http)