Convert to enum class

This commit is contained in:
Magne Sjaastad
2020-04-24 08:22:32 +02:00
parent 95fc63fe7c
commit 72fefb4db5
21 changed files with 54 additions and 47 deletions

View File

@@ -43,7 +43,7 @@ RiaTextFileCompare::~RiaTextFileCompare()
//--------------------------------------------------------------------------------------------------
void RiaTextFileCompare::reset()
{
m_lastError = IC_NO_ERROR;
m_lastError = ErrorType::IC_NO_ERROR;
m_errorMsg.clear();
m_errorDetails.clear();
m_diffOutput.clear();
@@ -77,7 +77,7 @@ bool RiaTextFileCompare::runComparison( const QString& baseFolder, const QString
QProcess::ProcessError procError = proc.error();
if ( procError != QProcess::UnknownError )
{
m_lastError = SEVERE_ERROR;
m_lastError = ErrorType::SEVERE_ERROR;
m_errorMsg = "Error running 'diff' tool process";
m_errorDetails = completeCommand;
return false;
@@ -102,7 +102,7 @@ bool RiaTextFileCompare::runComparison( const QString& baseFolder, const QString
stdErr = stdErr.simplified();
// Report non-severe error
m_lastError = IC_ERROR;
m_lastError = ErrorType::IC_ERROR;
m_errorMsg = "Error running 'diff' tool process";
m_errorDetails = stdErr;

View File

@@ -28,7 +28,7 @@
class RiaTextFileCompare
{
public:
enum ErrorType
enum class ErrorType
{
IC_NO_ERROR, // No error occurred
IC_ERROR, // An error occurred