cli: Move most classes to shared lib for reuse

This commit is contained in:
Albert S. 2022-03-18 22:33:45 +01:00
förälder d43c35819d
incheckning 478d57b342
33 ändrade filer med 32 tillägg och 44 borttagningar

Visa fil

@ -14,56 +14,28 @@ DEFINES += QT_DEPRECATED_WARNINGS
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
LIBS += -luchardet -lpoppler-qt5 -lquazip5
SOURCES += \
main.cpp \
encodingdetector.cpp \
pagedata.cpp \
processor.cpp \
pdfprocessor.cpp \
defaulttextprocessor.cpp \
commandadd.cpp \
sandboxedprocessor.cpp \
tagstripperprocessor.cpp \
nothingprocessor.cpp \
odtprocessor.cpp \
utils.cpp \
odsprocessor.cpp \
commanddelete.cpp \
commandupdate.cpp \
filesaver.cpp \
sqlitedbservice.cpp \
commandsearch.cpp \
commandlist.cpp
HEADERS += \
encodingdetector.h \
processor.h \
pagedata.h \
pdfprocessor.h \
defaulttextprocessor.h \
command.h \
commandadd.h \
sandboxedprocessor.h \
tagstripperprocessor.h \
nothingprocessor.h \
odtprocessor.h \
utils.h \
odsprocessor.h \
commanddelete.h \
commandupdate.h \
filesaver.h \
sqlitedbservice.h \
commandsearch.h \
commandlist.h
INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../shared/release/ -lshared
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../shared/debug/ -lshared
else:unix: LIBS += -L$$OUT_PWD/../shared/ -lshared
LIBS += -luchardet -lpoppler-qt5 -lquazip5
INCLUDEPATH += $$PWD/../shared
DEPENDPATH += $$PWD/../shared

Visa fil

@ -1,8 +1,6 @@
#ifndef COMMAND_H
#define COMMAND_H
#include <QStringList>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QThreadStorage>
#include <QVariant>
#include "utils.h"

Visa fil

@ -1,7 +1,5 @@
#include <QFileInfo>
#include <QDebug>
#include <QSqlQuery>
#include <QSqlError>
#include <QDateTime>
#include <QMap>
#include <QTextStream>

Visa fil

@ -3,7 +3,6 @@
#include <QFileInfo>
#include <QDebug>
#include <QRegularExpression>
#include <QSqlError>
#include "commanddelete.h"
#include "logger.h"

Visa fil

@ -2,7 +2,6 @@
#include <QFileInfo>
#include <QDateTime>
#include <QThreadPool>
#include <QtConcurrentRun>
#include "commandupdate.h"
#include "logger.h"

Visa fil

@ -5,9 +5,6 @@
#include <QDataStream>
#include <QDebug>
#include <QProcessEnvironment>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QMap>
#include <QDebug>
#include <QSettings>

Visa fil

@ -6,7 +6,6 @@
#include "filesaver.h"
#include "processor.h"
#include "pdfprocessor.h"
#include "commandadd.h"
#include "defaulttextprocessor.h"
#include "tagstripperprocessor.h"
#include "nothingprocessor.h"

Visa fil

@ -2,7 +2,6 @@
#define FILESAVER_H
#include <QSqlDatabase>
#include <QFileInfo>
#include "command.h"
#include "pagedata.h"
#include "filedata.h"
#include "sqlitedbservice.h"

Visa fil

@ -4,9 +4,9 @@
#
#-------------------------------------------------
QT += sql
QT -= gui
QT += sql concurrent
TARGET = shared
TEMPLATE = lib
@ -14,6 +14,7 @@ CONFIG += staticlib
CONFIG += c++17
INCLUDEPATH += $$PWD/../sandbox/exile.h/
INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
@ -29,21 +30,47 @@ DEFINES += QT_DEPRECATED_WARNINGS
SOURCES += sqlitesearch.cpp \
databasefactory.cpp \
dbmigrator.cpp \
defaulttextprocessor.cpp \
encodingdetector.cpp \
filesaver.cpp \
logger.cpp \
looqsgeneralexception.cpp \
common.cpp \
looqsquery.cpp
looqsquery.cpp \
nothingprocessor.cpp \
odsprocessor.cpp \
odtprocessor.cpp \
pagedata.cpp \
pdfprocessor.cpp \
processor.cpp \
sandboxedprocessor.cpp \
sqlitedbservice.cpp \
tagstripperprocessor.cpp \
utils.cpp
HEADERS += sqlitesearch.h \
databasefactory.h \
dbmigrator.h \
defaulttextprocessor.h \
encodingdetector.h \
filedata.h \
filesaver.h \
logger.h \
looqsgeneralexception.h \
looqsquery.h \
nothingprocessor.h \
odsprocessor.h \
odtprocessor.h \
pagedata.h \
pdfprocessor.h \
processor.h \
sandboxedprocessor.h \
searchresult.h \
sqlitedbservice.h \
tagstripperprocessor.h \
token.h \
common.h
common.h \
utils.h
unix {
target.path = /usr/lib
INSTALLS += target