openmw-tes3coop/components/contentselector/model/loadordererror.cpp
dteviot dfbd470613 Adjust plug-in order to match profile loading.
Also marks plug-ins with load order problems in red and changes tool tip to describe error.
2014-12-31 19:19:54 +13:00

22 lines
No EOL
794 B
C++

#include "loadordererror.hpp"
#include <assert.h>
QString ContentSelectorModel::LoadOrderError::sErrorToolTips[ErrorCode_LoadOrder] =
{
QString("Unable to find dependant file: %1"),
QString("Dependent file needs to be active: %1"),
QString("This file needs to load after %1"),
};
ContentSelectorModel::LoadOrderError ContentSelectorModel::LoadOrderError::sNoError = ContentSelectorModel::LoadOrderError();
QString ContentSelectorModel::LoadOrderError::toolTip() const
{
assert(mErrorCode);
return sErrorToolTips[mErrorCode - 1].arg(mFileName);
}
bool ContentSelectorModel::LoadOrderError::operator== (const ContentSelectorModel::LoadOrderError& rhs) const
{
return (mErrorCode == rhs.mErrorCode) && ((mErrorCode == ErrorCode_None) || (mFileName == rhs.mFileName));
}