openmw/components/contentselector/model/loadordererror.hpp

40 lines
1,015 B
C++
Raw Permalink Normal View History

#ifndef LOADORDERERROR_HPP
#define LOADORDERERROR_HPP
#include <QString>
namespace ContentSelectorModel
{
2015-01-01 15:53:35 +13:00
/// \brief Details of a suspected Load Order problem a plug-in will have. This is basically a POD.
class LoadOrderError
{
public:
enum ErrorCode
{
2022-09-22 21:26:05 +03:00
ErrorCode_None = 0,
ErrorCode_MissingDependency = 1,
ErrorCode_InactiveDependency = 2,
2022-09-22 21:26:05 +03:00
ErrorCode_LoadOrder = 3
};
2022-09-22 21:26:05 +03:00
inline LoadOrderError()
: mErrorCode(ErrorCode_None)
{
}
2023-07-29 11:44:39 +04:00
inline LoadOrderError(ErrorCode errorCode, const QString& fileName)
2022-09-22 21:26:05 +03:00
: mErrorCode(errorCode)
, mFileName(fileName)
{
}
inline ErrorCode errorCode() const { return mErrorCode; }
inline QString fileName() const { return mFileName; }
private:
ErrorCode mErrorCode;
QString mFileName;
static QString sErrorToolTips[ErrorCode_LoadOrder];
};
}
#endif // LOADORDERERROR_HPP