KTextAddons

translation.cpp
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5
6 Based on translateLocally code
7*/
8
9#include "translation.h"
10#include <slimt/Response.hh>
11
12Translation::Translation()
13 : mResponse(nullptr)
14{
15}
16
17Translation::Translation(slimt::Response &&response)
18 : mResponse(std::make_shared<slimt::Response>(std::move(response)))
19{
20}
21
23{
24 return QString::fromStdString(mResponse->target.text);
25}
QString translation() const
Translation result.
KIOCORE_EXPORT CopyJob * move(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
QString fromStdString(const std::string &str)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.