shared: Move SaveFileResult enum to own header

This commit is contained in:
Albert S. 2022-06-24 17:05:44 +02:00
parent 9c41d531b0
commit cf0c940b15
3 ha cambiato i file con 32 aggiunte e 23 eliminazioni

30
shared/savefileresult.h Normal file
Vedi File

@ -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

Vedi File

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

Vedi File

@ -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
{