shared: Move SaveFileResult enum to own header

This commit is contained in:
Albert S. 2022-06-24 17:05:44 +02:00
förälder 9c41d531b0
incheckning cf0c940b15
3 ändrade filer med 32 tillägg och 23 borttagningar

30
shared/savefileresult.h Normal file
Visa fil

@ -0,0 +1,30 @@
#ifndef SAVEFILERESULT_H
#define SAVEFILERESULT_H
#include <QStringList>
enum SaveFileResult
{
OK,
SKIPPED,
DBFAIL,
PROCESSFAIL,
NOTFOUND,
NOACCESS
};
static inline QString SaveFileResultToString(SaveFileResult sfr)
{
QStringList SaveFileResultStr;
SaveFileResultStr << "OK"
<< "SKIPPED"
<< "DBFAIL"
<< "PROCESSFAIL"
<< "NOTFOUND"
<< "NOACCESS";
return SaveFileResultStr[(int)sfr];
}
#endif // SAVEFILERESULT_H

Visa fil

@ -88,6 +88,7 @@ HEADERS += sqlitesearch.h \
pdfprocessor.h \
processor.h \
sandboxedprocessor.h \
savefileresult.h \
searchresult.h \
sqlitedbservice.h \
tagstripperprocessor.h \

Visa fil

@ -7,29 +7,7 @@
#include "filedata.h"
#include "../shared/sqlitesearch.h"
#include "../shared/token.h"
enum SaveFileResult
{
OK,
SKIPPED,
DBFAIL,
PROCESSFAIL,
NOTFOUND,
NOACCESS
};
static inline QString SaveFileResultToString(SaveFileResult sfr)
{
QStringList SaveFileResultStr;
SaveFileResultStr << "OK"
<< "SKIPPED"
<< "DBFAIL"
<< "PROCESSFAIL"
<< "NOTFOUND"
<< "NOACCESS";
return SaveFileResultStr[(int)sfr];
}
#include "savefileresult.h"
class SqliteDbService
{