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 \a errorCode using the |
20 | * additional error information provided by \a errorText. |
21 | * |
22 | * \a errorCode the error code |
23 | * |
24 | * \a errorText the additional error text |
25 | */ |
26 | KIOCORE_EXPORT QString buildErrorString(int errorCode, const QString &errorText); |
27 | |
28 | /*! |
29 | * Returns translated error details for \a errorCode using the |
30 | * additional error information provided by \a errorText , \a reqUrl |
31 | * (the request URL), and the KIO worker \a method . |
32 | * |
33 | * \a errorCode the error code |
34 | * |
35 | * \a errorText the additional error text |
36 | * |
37 | * \a reqUrl the request URL |
38 | * |
39 | * \a method the KIO worker method |
40 | * |
41 | * Returns the following data: |
42 | * \list |
43 | * \li QString errorName - the name of the error |
44 | * \li QString techName - if not null, the more technical name of the error |
45 | * \li QString description - a description of the error |
46 | * \li QStringList causes - a list of possible causes of the error |
47 | * \li QStringList solutions - a liso of solutions for the error |
48 | * \endlist |
49 | */ |
50 | KIOCORE_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText, const QUrl *reqUrl = nullptr, int method = -1); |
51 | } |
52 | |
53 | #endif |
54 | |