5#include "application.h"
6#include "componentfactory.h"
8#include "renderview_p.h"
12#include <QtCore/QLoggingCategory>
14Q_LOGGING_CATEGORY(CUTELYST_RENDERVIEW,
"cutelyst.renderview", QtWarningMsg)
59 :
Action(new RenderViewPrivate, parent)
95 quint16 status = res->
status();
96 if (status == 204 || (status >= 300 && status < 400)) {
104 }
else if (d->view) {
109 qCCritical(CUTELYST_RENDERVIEW) <<
"Could not find a view to render.";
114#include "moc_renderview.cpp"
This class represents a Cutelyst Action.
bool doExecute(Context *c) override
QString className() const noexcept
ParamsMultiMap attributes() const noexcept
The Cutelyst application.
View * view(QStringView name={}) const
virtual bool init(Application *application, const QVariantHash &args)
bool forward(Component *component)
Response * res() const noexcept
View * customView() const noexcept
Sensible default end action that forwards to a View.
bool doExecute(Cutelyst::Context *c) override
RenderView(QObject *parent=nullptr)
bool init(Application *application, const QVariantHash &args) override
bool isHead() const noexcept
void setContentType(const QByteArray &type)
bool hasBody() const noexcept
void setStatus(quint16 status) noexcept
quint16 status() const noexcept
QByteArray contentType() const
Abstract View component for Cutelyst.
The Cutelyst namespace holds all public Cutelyst API.
bool isEmpty() const const
T value(const Key &key, const T &defaultValue) const const
void setObjectName(QAnyStringView name)
QString fromLatin1(QByteArrayView str)