File indexing completed on 2024-10-06 03:39:26
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2000 Stephan Kulow <coolo@kde.org> 0004 SPDX-FileCopyrightText: 2000-2009 David Faure <faure@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef KIO_JOB_H 0010 #define KIO_JOB_H 0011 0012 #include "job_base.h" // IWYU pragma: export 0013 #include "kiocore_export.h" 0014 0015 #include <QUrl> 0016 namespace KIO 0017 { 0018 /** 0019 * Returns a translated error message for @p errorCode using the 0020 * additional error information provided by @p errorText. 0021 * @param errorCode the error code 0022 * @param errorText the additional error text 0023 * @return the created error string 0024 */ 0025 KIOCORE_EXPORT QString buildErrorString(int errorCode, const QString &errorText); 0026 0027 /** 0028 * Returns translated error details for @p errorCode using the 0029 * additional error information provided by @p errorText , @p reqUrl 0030 * (the request URL), and the KIO worker @p method . 0031 * 0032 * @param errorCode the error code 0033 * @param errorText the additional error text 0034 * @param reqUrl the request URL 0035 * @param method the KIO worker method 0036 * @return the following data: 0037 * @li QString errorName - the name of the error 0038 * @li QString techName - if not null, the more technical name of the error 0039 * @li QString description - a description of the error 0040 * @li QStringList causes - a list of possible causes of the error 0041 * @li QStringList solutions - a liso of solutions for the error 0042 */ 0043 KIOCORE_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText, const QUrl *reqUrl = nullptr, int method = -1); 0044 } 0045 0046 #endif