7#include "generateinstalledlanguageinfojob.h"
8#include "libvoskspeechtotext_debug.h"
9#include <KLocalizedString>
11GenerateInstalledLanguageInfoJob::GenerateInstalledLanguageInfoJob(
QObject *parent)
16GenerateInstalledLanguageInfoJob::~GenerateInstalledLanguageInfoJob() =
default;
18void GenerateInstalledLanguageInfoJob::start()
21 if (!VoskEngineUtils::createInstalledLanguageInfo(mInfo.pathToStore, mInfo.info)) {
22 qCWarning(LIBVOSKSPEECHTOTEXT_LOG) <<
" Impossible to store installed language info " << mInfo;
23 Q_EMIT errorText(
i18n(
"Impossible to store language info."));
30bool GenerateInstalledLanguageInfoJob::canStart()
const
32 return mInfo.isValid();
35GenerateInstalledLanguageInfoJob::LanguageInfo GenerateInstalledLanguageInfoJob::info()
const
40void GenerateInstalledLanguageInfoJob::setInfo(
const GenerateInstalledLanguageInfoJob::LanguageInfo &newInfo)
45bool GenerateInstalledLanguageInfoJob::LanguageInfo::isValid()
const
47 return !pathToStore.
isEmpty() && info.isValid();
52 d <<
"info " << t.info;
53 d <<
"pathToStore " << t.pathToStore;
57#include "moc_generateinstalledlanguageinfojob.cpp"
QString i18n(const char *text, const TYPE &arg...)
KTEXTEDITOR_EXPORT QDebug operator<<(QDebug s, const MovingCursor &cursor)
bool isEmpty() const const
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.