shared: Move SaveFileResult enum to own header
This commit is contained in:
والد
9c41d531b0
کامیت
cf0c940b15
30
shared/savefileresult.h
Normal file
30
shared/savefileresult.h
Normal 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
|
@ -88,6 +88,7 @@ HEADERS += sqlitesearch.h \
|
||||
pdfprocessor.h \
|
||||
processor.h \
|
||||
sandboxedprocessor.h \
|
||||
savefileresult.h \
|
||||
searchresult.h \
|
||||
sqlitedbservice.h \
|
||||
tagstripperprocessor.h \
|
||||
|
@ -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
|
||||
{
|
||||
|
بارگذاری…
مرجع در شماره جدید
Block a user