Changeset View
Changeset View
Standalone View
Standalone View
src/core/errorcode.h
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General Public | ||
16 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 16 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | 19 | | |||
20 | #ifndef KNSCORE_ERRORCODE_H | 20 | #ifndef KNSCORE_ERRORCODE_H | ||
21 | #define KNSCORE_ERRORCODE_H | 21 | #define KNSCORE_ERRORCODE_H | ||
22 | 22 | | |||
23 | namespace KNSCore { | 23 | #include "knewstuffcore_export.h" | ||
24 | #include <qobjectdefs.h> | ||||
25 | | ||||
26 | namespace KNSCore | ||||
27 | { | ||||
28 | KNEWSTUFFCORE_EXPORT Q_NAMESPACE | ||||
24 | /** | 29 | /** | ||
25 | * An enumeration of specific error conditions which might occur and which | 30 | * An enumeration of specific error conditions which might occur and which | ||
26 | * users of KNewStuff would want to react to. It is used by both the Engine and | 31 | * users of KNewStuff would want to react to. It is used by both the Engine and | ||
27 | * Provider classes. | 32 | * Provider classes. | ||
28 | * @since 5.53 | 33 | * @since 5.53 | ||
29 | */ | 34 | */ | ||
30 | enum ErrorCode { | 35 | enum ErrorCode { | ||
31 | UnknownError, ///< An unknown error (this should not be used, an error report of this nature should be considered a bug) | 36 | UnknownError, ///< An unknown error (this should not be used, an error report of this nature should be considered a bug) | ||
32 | NetworkError, ///< A network error. In signalErrorCode, this will be accompanied by the QtNetwork error code in the metadata | 37 | NetworkError, ///< A network error. In signalErrorCode, this will be accompanied by the QtNetwork error code in the metadata | ||
33 | OcsError, ///< An error reported by the OCS API server. In signalErrorCode, this will be accompanied by the OCS error code in the metadata | 38 | OcsError, ///< An error reported by the OCS API server. In signalErrorCode, this will be accompanied by the OCS error code in the metadata | ||
34 | ConfigFileError, ///< The configuration file is missing or somehow incorrect. The configuration file filename will be held in the metadata | 39 | ConfigFileError, ///< The configuration file is missing or somehow incorrect. The configuration file filename will be held in the metadata | ||
35 | ProviderError, ///< A provider has failed to load or initialize. The provider file URL or provider URL will be held in the metadata | 40 | ProviderError, ///< A provider has failed to load or initialize. The provider file URL or provider URL will be held in the metadata | ||
36 | InstallationError, ///< Installation of a content item has failed | 41 | InstallationError, ///< Installation of a content item has failed | ||
37 | ImageError ///< Loading an image has failed. The entry name and preview type which failed will be held in the metadata as a QVariantList | 42 | ImageError ///< Loading an image has failed. The entry name and preview type which failed will be held in the metadata as a QVariantList | ||
38 | }; | 43 | }; | ||
44 | Q_ENUM_NS(ErrorCode); | ||||
39 | } | 45 | } | ||
40 | #endif//KNSCORE_ERRORCODE_H | 46 | #endif//KNSCORE_ERRORCODE_H |