1 | /* |
2 | This file is part of the KDE libraries |
3 | SPDX-FileCopyrightText: 2000 Stephan Kulow <coolo@kde.org> |
4 | SPDX-FileCopyrightText: 2000-2009 David Faure <faure@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #ifndef KIO_JOB_H |
10 | #define KIO_JOB_H |
11 | |
12 | #include "job_base.h" // IWYU pragma: export |
13 | #include "kiocore_export.h" |
14 | |
15 | #include <QUrl> |
16 | namespace KIO |
17 | { |
18 | /** |
19 | * Returns a translated error message for @p errorCode using the |
20 | * additional error information provided by @p errorText. |
21 | * @param errorCode the error code |
22 | * @param errorText the additional error text |
23 | * @return the created error string |
24 | */ |
25 | KIOCORE_EXPORT QString buildErrorString(int errorCode, const QString &errorText); |
26 | |
27 | /** |
28 | * Returns translated error details for @p errorCode using the |
29 | * additional error information provided by @p errorText , @p reqUrl |
30 | * (the request URL), and the KIO worker @p method . |
31 | * |
32 | * @param errorCode the error code |
33 | * @param errorText the additional error text |
34 | * @param reqUrl the request URL |
35 | * @param method the KIO worker method |
36 | * @return the following data: |
37 | * @li QString errorName - the name of the error |
38 | * @li QString techName - if not null, the more technical name of the error |
39 | * @li QString description - a description of the error |
40 | * @li QStringList causes - a list of possible causes of the error |
41 | * @li QStringList solutions - a liso of solutions for the error |
42 | */ |
43 | KIOCORE_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText, const QUrl *reqUrl = nullptr, int method = -1); |
44 | } |
45 | |
46 | #endif |
47 | |