File indexing completed on 2023-09-24 04:08:32
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 "kiocore_export.h" 0013 0014 #include <QUrl> 0015 namespace KIO 0016 { 0017 /** 0018 * Returns a translated error message for @p errorCode using the 0019 * additional error information provided by @p errorText. 0020 * @param errorCode the error code 0021 * @param errorText the additional error text 0022 * @return the created error string 0023 */ 0024 KIOCORE_EXPORT QString buildErrorString(int errorCode, const QString &errorText); 0025 0026 /** 0027 * Returns translated error details for @p errorCode using the 0028 * additional error information provided by @p errorText , @p reqUrl 0029 * (the request URL), and the KIO worker @p method . 0030 * 0031 * @param errorCode the error code 0032 * @param errorText the additional error text 0033 * @param reqUrl the request URL 0034 * @param method the KIO worker method 0035 * @return the following data: 0036 * @li QString errorName - the name of the error 0037 * @li QString techName - if not null, the more technical name of the error 0038 * @li QString description - a description of the error 0039 * @li QStringList causes - a list of possible causes of the error 0040 * @li QStringList solutions - a liso of solutions for the error 0041 */ 0042 KIOCORE_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText, const QUrl *reqUrl = nullptr, int method = -1); 0043 } 0044 0045 // kio/job.h is what apps include to get all jobs -> we include jobclasses.h to preserve SC 0046 // This required to move KIO::Job in a separate header kio/job_base.h 0047 #include "jobclasses.h" 0048 0049 #include <QDateTime> 0050 0051 #endif