1
0

shared: Move SaveFileResult enum to own header

Este cometimento está contido em:
Albert S. 2022-06-24 17:05:44 +02:00
ascendente 9c41d531b0
cometimento cf0c940b15
3 ficheiros modificados com 32 adições e 23 eliminações

30
shared/savefileresult.h Ficheiro normal
Ver ficheiro

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

Ver ficheiro

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

Ver ficheiro

@ -7,29 +7,7 @@
#include "filedata.h" #include "filedata.h"
#include "../shared/sqlitesearch.h" #include "../shared/sqlitesearch.h"
#include "../shared/token.h" #include "../shared/token.h"
enum SaveFileResult #include "savefileresult.h"
{
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];
}
class SqliteDbService class SqliteDbService
{ {