mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Merge
This commit is contained in:
commit
9ed1f0f306
@ -146,7 +146,8 @@ HEADERS += comic_flow.h \
|
|||||||
yacreader_comics_views_manager.h \
|
yacreader_comics_views_manager.h \
|
||||||
info_comics_view.h \
|
info_comics_view.h \
|
||||||
yacreader_comics_selection_helper.h \
|
yacreader_comics_selection_helper.h \
|
||||||
yacreader_comic_info_helper.h
|
yacreader_comic_info_helper.h \
|
||||||
|
db/reading_list.cpp
|
||||||
|
|
||||||
!CONFIG(no_opengl) {
|
!CONFIG(no_opengl) {
|
||||||
CONFIG(legacy_gl_widget) {
|
CONFIG(legacy_gl_widget) {
|
||||||
@ -220,7 +221,8 @@ SOURCES += comic_flow.cpp \
|
|||||||
yacreader_comics_views_manager.cpp \
|
yacreader_comics_views_manager.cpp \
|
||||||
info_comics_view.cpp \
|
info_comics_view.cpp \
|
||||||
yacreader_comics_selection_helper.cpp \
|
yacreader_comics_selection_helper.cpp \
|
||||||
yacreader_comic_info_helper.cpp
|
yacreader_comic_info_helper.cpp \
|
||||||
|
db/reading_list.cpp
|
||||||
|
|
||||||
!CONFIG(no_opengl) {
|
!CONFIG(no_opengl) {
|
||||||
CONFIG(legacy_gl_widget) {
|
CONFIG(legacy_gl_widget) {
|
||||||
|
44
YACReaderLibrary/db/reading_list.cpp
Normal file
44
YACReaderLibrary/db/reading_list.cpp
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#include "reading_list.h"
|
||||||
|
|
||||||
|
ReadingList::ReadingList(const QString &name, qulonglong id, int ordering)
|
||||||
|
:name(name), id(id), ordering(ordering)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
qulonglong ReadingList::getId() const
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ReadingList::getName() const
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ReadingList::getOrdering() const
|
||||||
|
{
|
||||||
|
return ordering;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Label::Label(const QString &name, qulonglong id, YACReader::LabelColors colorid)
|
||||||
|
:name(name), id(id), colorid(colorid)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
YACReader::LabelColors Label::getColorID() const
|
||||||
|
{
|
||||||
|
return colorid;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Label::getName() const
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
qulonglong Label::getId() const
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
36
YACReaderLibrary/db/reading_list.h
Normal file
36
YACReaderLibrary/db/reading_list.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef READING_LIST_H
|
||||||
|
#define READING_LIST_H
|
||||||
|
|
||||||
|
#include "yacreader_global.h"
|
||||||
|
|
||||||
|
class ReadingList
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ReadingList(const QString &name, qulonglong id, int ordering);
|
||||||
|
|
||||||
|
qulonglong getId() const;
|
||||||
|
QString getName() const;
|
||||||
|
int getOrdering() const;
|
||||||
|
private:
|
||||||
|
QString name;
|
||||||
|
qulonglong id;
|
||||||
|
int ordering;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Label
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Label(const QString &name, qulonglong id, YACReader::LabelColors colorid);
|
||||||
|
|
||||||
|
YACReader::LabelColors getColorID() const;
|
||||||
|
QString getName() const;
|
||||||
|
qulonglong getId() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString name;
|
||||||
|
qulonglong id;
|
||||||
|
YACReader::LabelColors colorid;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // READING_LIST_H
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include "reading_list_item.h"
|
#include "reading_list.h"
|
||||||
#include "library_item.h"
|
#include "library_item.h"
|
||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
#include "data_base_management.h"
|
#include "data_base_management.h"
|
||||||
@ -276,6 +276,94 @@ QList<ComicDB> DBHelper::getReading(qulonglong libraryId)
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<ReadingList> DBHelper::getReadingLists(qulonglong libraryId)
|
||||||
|
{
|
||||||
|
QString libraryPath = DBHelper::getLibraries().getPath(libraryId);
|
||||||
|
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath+"/.yacreaderlibrary");
|
||||||
|
|
||||||
|
QList<ReadingList> list;
|
||||||
|
|
||||||
|
QSqlQuery selectQuery("SELECT * from reading_list WHERE parentId IS NULL ORDER BY name DESC",db);
|
||||||
|
|
||||||
|
selectQuery.exec();
|
||||||
|
|
||||||
|
while (selectQuery.next())
|
||||||
|
{
|
||||||
|
QSqlRecord record = selectQuery.record();
|
||||||
|
|
||||||
|
ReadingList item(record.value("name").toString(), record.value("id").toLongLong(),record.value("ordering").toInt());
|
||||||
|
|
||||||
|
if(list.isEmpty())
|
||||||
|
{
|
||||||
|
list.append(item);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int i= 0;
|
||||||
|
while(i<list.length() && naturalSortLessThanCI(list.at(i).getName(),item.getName()))
|
||||||
|
i++;
|
||||||
|
list.insert(i,item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<ComicDB> DBHelper::getReadingListFullContent(qulonglong libraryId, qulonglong readingListId)
|
||||||
|
{
|
||||||
|
QString libraryPath = DBHelper::getLibraries().getPath(libraryId);
|
||||||
|
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath+"/.yacreaderlibrary");
|
||||||
|
|
||||||
|
QList<ComicDB> list;
|
||||||
|
|
||||||
|
{
|
||||||
|
QList<qulonglong> ids;
|
||||||
|
ids << readingListId;
|
||||||
|
|
||||||
|
QSqlQuery subfolders(db);
|
||||||
|
subfolders.prepare("SELECT id "
|
||||||
|
"FROM reading_list "
|
||||||
|
"WHERE parentId = :parentId "
|
||||||
|
"ORDER BY ordering ASC");
|
||||||
|
subfolders.bindValue(":parentId", readingListId);
|
||||||
|
subfolders.exec();
|
||||||
|
while(subfolders.next())
|
||||||
|
ids << subfolders.record().value(0).toULongLong();
|
||||||
|
|
||||||
|
foreach(qulonglong id, ids)
|
||||||
|
{
|
||||||
|
QSqlQuery selectQuery(db);
|
||||||
|
selectQuery.prepare("SELECT c.id,c.parentId,c.fileName,ci.title,ci.currentPage,ci.numPages,ci.hash,ci.read "
|
||||||
|
"FROM comic c INNER JOIN comic_info ci ON (c.comicInfoId = ci.id) "
|
||||||
|
"INNER JOIN comic_reading_list crl ON (c.id == crl.comic_id) "
|
||||||
|
"WHERE crl.reading_list_id = :parentReadingList "
|
||||||
|
"ORDER BY crl.ordering");
|
||||||
|
selectQuery.bindValue(":parentReadingList", id);
|
||||||
|
selectQuery.exec();
|
||||||
|
|
||||||
|
while (selectQuery.next())
|
||||||
|
{
|
||||||
|
ComicDB comic;
|
||||||
|
|
||||||
|
QSqlRecord record = selectQuery.record();
|
||||||
|
|
||||||
|
comic.id = record.value(0).toULongLong();
|
||||||
|
comic.parentId = record.value(1).toULongLong();
|
||||||
|
comic.name = record.value(2).toString();
|
||||||
|
comic.info.title = record.value(3).toString();
|
||||||
|
comic.info.currentPage = record.value(4).toInt();
|
||||||
|
comic.info.numPages = record.value(5).toInt();
|
||||||
|
comic.info.hash = record.value(6).toString();
|
||||||
|
comic.info.read = record.value(7).toBool();
|
||||||
|
|
||||||
|
list.append(comic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
//objects management
|
//objects management
|
||||||
//deletes
|
//deletes
|
||||||
void DBHelper::removeFromDB(LibraryItem * item, QSqlDatabase & db)
|
void DBHelper::removeFromDB(LibraryItem * item, QSqlDatabase & db)
|
||||||
@ -930,7 +1018,7 @@ QList<LibraryItem *> DBHelper::getFoldersFromParent(qulonglong parentId, QSqlDat
|
|||||||
QList<LibraryItem *>::iterator i;
|
QList<LibraryItem *>::iterator i;
|
||||||
i = list.end();
|
i = list.end();
|
||||||
i--;
|
i--;
|
||||||
while ((0 > (lessThan = naturalSortLessThanCI(nameCurrent,nameLast))) && i != list.begin())
|
while ((0 > (lessThan = naturalCompare(nameCurrent,nameLast,Qt::CaseInsensitive))) && i != list.begin())
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
nameLast = (*i)->name;
|
nameLast = (*i)->name;
|
||||||
@ -1138,13 +1226,13 @@ QList<LibraryItem *> DBHelper::getComicsFromParent(qulonglong parentId, QSqlData
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<LabelItem *> DBHelper::getLabelItems(qulonglong libraryId)
|
QList<Label> DBHelper::getLabels(qulonglong libraryId)
|
||||||
{
|
{
|
||||||
QString libraryPath = DBHelper::getLibraries().getPath(libraryId);
|
QString libraryPath = DBHelper::getLibraries().getPath(libraryId);
|
||||||
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath+"/.yacreaderlibrary");
|
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath+"/.yacreaderlibrary");
|
||||||
|
|
||||||
QSqlQuery selectQuery("SELECT * FROM label ORDER BY ordering,name",db); //TODO add some kind of
|
QSqlQuery selectQuery("SELECT * FROM label ORDER BY ordering,name",db); //TODO add some kind of
|
||||||
QList<LabelItem *> labels;
|
QList<Label> labels;
|
||||||
|
|
||||||
QSqlRecord record = selectQuery.record();
|
QSqlRecord record = selectQuery.record();
|
||||||
|
|
||||||
@ -1155,11 +1243,9 @@ QList<LabelItem *> DBHelper::getLabelItems(qulonglong libraryId)
|
|||||||
|
|
||||||
while(selectQuery.next())
|
while(selectQuery.next())
|
||||||
{
|
{
|
||||||
LabelItem *item = new LabelItem(QList<QVariant>()
|
Label item(selectQuery.value(name).toString(),
|
||||||
<< selectQuery.value(name)
|
selectQuery.value(id).toLongLong(),
|
||||||
<< selectQuery.value(color)
|
static_cast<YACReader::LabelColors>(selectQuery.value(color).toInt()));
|
||||||
<< selectQuery.value(id)
|
|
||||||
<< selectQuery.value(ordering));
|
|
||||||
|
|
||||||
if(labels.isEmpty())
|
if(labels.isEmpty())
|
||||||
{
|
{
|
||||||
@ -1169,14 +1255,14 @@ QList<LabelItem *> DBHelper::getLabelItems(qulonglong libraryId)
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (i < labels.count() && (labels.at(i)->colorid() < item->colorid()) )
|
while (i < labels.count() && (labels.at(i).getColorID() < item.getColorID()) )
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if(i < labels.count())
|
if(i < labels.count())
|
||||||
{
|
{
|
||||||
if(labels.at(i)->colorid() == item->colorid()) //sort by name
|
if(labels.at(i).getColorID() == item.getColorID()) //sort by name
|
||||||
{
|
{
|
||||||
while( i < labels.count() && labels.at(i)->colorid() == item->colorid() && naturalSortLessThanCI(labels.at(i)->name(),item->name()))
|
while( i < labels.count() && labels.at(i).getColorID() == item.getColorID() && naturalSortLessThanCI(labels.at(i).getName(),item.getName()))
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,13 @@ class QString;
|
|||||||
class ComicDB;
|
class ComicDB;
|
||||||
class Folder;
|
class Folder;
|
||||||
class LibraryItem;
|
class LibraryItem;
|
||||||
class LabelItem;
|
class Label;
|
||||||
class QSqlDatabase;
|
class QSqlDatabase;
|
||||||
class ComicInfo;
|
class ComicInfo;
|
||||||
class QSqlRecord;
|
class QSqlRecord;
|
||||||
class QSqlQuery;
|
class QSqlQuery;
|
||||||
class YACReaderLibraries;
|
class YACReaderLibraries;
|
||||||
|
class ReadingList;
|
||||||
|
|
||||||
class DBHelper
|
class DBHelper
|
||||||
{
|
{
|
||||||
@ -34,6 +35,8 @@ public:
|
|||||||
static QList<ComicDB> getLabelComics(qulonglong libraryId, qulonglong labelId);
|
static QList<ComicDB> getLabelComics(qulonglong libraryId, qulonglong labelId);
|
||||||
static QList<ComicDB> getFavorites(qulonglong libraryId);
|
static QList<ComicDB> getFavorites(qulonglong libraryId);
|
||||||
static QList<ComicDB> getReading(qulonglong libraryId);
|
static QList<ComicDB> getReading(qulonglong libraryId);
|
||||||
|
static QList<ReadingList> getReadingLists(qulonglong libraryId);
|
||||||
|
static QList<ComicDB> getReadingListFullContent(qulonglong libraryId, qulonglong readingListId);
|
||||||
|
|
||||||
//objects management
|
//objects management
|
||||||
//deletes
|
//deletes
|
||||||
@ -77,7 +80,7 @@ public:
|
|||||||
static QList<LibraryItem *> getFoldersFromParent(qulonglong parentId, QSqlDatabase & db, bool sort = true);
|
static QList<LibraryItem *> getFoldersFromParent(qulonglong parentId, QSqlDatabase & db, bool sort = true);
|
||||||
static QList<ComicDB> getSortedComicsFromParent(qulonglong parentId, QSqlDatabase & db);
|
static QList<ComicDB> getSortedComicsFromParent(qulonglong parentId, QSqlDatabase & db);
|
||||||
static QList<LibraryItem *> getComicsFromParent(qulonglong parentId, QSqlDatabase & db, bool sort = true);
|
static QList<LibraryItem *> getComicsFromParent(qulonglong parentId, QSqlDatabase & db, bool sort = true);
|
||||||
static QList<LabelItem *> getLabelItems(qulonglong libraryId);
|
static QList<Label> getLabels(qulonglong libraryId);
|
||||||
|
|
||||||
//load
|
//load
|
||||||
static Folder loadFolder(qulonglong id, QSqlDatabase & db);
|
static Folder loadFolder(qulonglong id, QSqlDatabase & db);
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
#include "readinglistcontentcontroller.h"
|
||||||
|
|
||||||
|
#include "db_helper.h"
|
||||||
|
#include "comic_db.h"
|
||||||
|
|
||||||
|
#include "yacreader_server_data_helper.h"
|
||||||
|
|
||||||
|
ReadingListContentController::ReadingListContentController()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadingListContentController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
{
|
||||||
|
response.setHeader("Content-Type", "text/plain; charset=utf-8");
|
||||||
|
|
||||||
|
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
||||||
|
QStringList pathElements = path.split('/');
|
||||||
|
int libraryId = pathElements.at(2).toInt();
|
||||||
|
qulonglong readingListId = pathElements.at(4).toULongLong();
|
||||||
|
|
||||||
|
serviceContent(libraryId, readingListId, response);
|
||||||
|
|
||||||
|
response.write("",true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadingListContentController::serviceContent(const int &library, const qulonglong &readingListId, HttpResponse &response)
|
||||||
|
{
|
||||||
|
QList<ComicDB> comics = DBHelper::getReadingListFullContent(library, readingListId);
|
||||||
|
|
||||||
|
for(const ComicDB &comic : comics)
|
||||||
|
{
|
||||||
|
response.write(YACReaderServerDataHelper::comicToYSFormat(library, comic).toUtf8());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef READINGLISTCONTENTCONTROLLER_H
|
||||||
|
#define READINGLISTCONTENTCONTROLLER_H
|
||||||
|
|
||||||
|
#include "httprequest.h"
|
||||||
|
#include "httpresponse.h"
|
||||||
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
|
class ReadingListContentController : public HttpRequestHandler {
|
||||||
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY(ReadingListContentController)
|
||||||
|
public:
|
||||||
|
ReadingListContentController();
|
||||||
|
|
||||||
|
void service(HttpRequest& request, HttpResponse& response);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void serviceContent(const int &library, const qulonglong &readingListId, HttpResponse &response);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // READINGLISTCONTENTCONTROLLER_H
|
@ -1,5 +1,8 @@
|
|||||||
#include "readinglistscontroller.h"
|
#include "readinglistscontroller.h"
|
||||||
|
|
||||||
|
#include "db_helper.h"
|
||||||
|
#include "reading_list.h"
|
||||||
|
|
||||||
ReadingListsController::ReadingListsController()
|
ReadingListsController::ReadingListsController()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -20,5 +23,10 @@ void ReadingListsController::service(HttpRequest &request, HttpResponse &respons
|
|||||||
|
|
||||||
void ReadingListsController::serviceContent(const int library, HttpResponse &response)
|
void ReadingListsController::serviceContent(const int library, HttpResponse &response)
|
||||||
{
|
{
|
||||||
|
QList<ReadingList> readingLists = DBHelper::getReadingLists(library);
|
||||||
|
|
||||||
|
foreach(const ReadingList &item, readingLists)
|
||||||
|
{
|
||||||
|
response.write(QString("%1\t%2\t%3\r\n").arg(library).arg(item.getId()).arg(item.getName()).toUtf8());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
#include "yacreader_libraries.h"
|
#include "yacreader_libraries.h"
|
||||||
|
|
||||||
#include "reading_list_item.h"
|
#include "reading_list.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
#include "yacreader_global.h"
|
#include "yacreader_global.h"
|
||||||
|
|
||||||
@ -19,11 +19,11 @@ void TagsController::service(HttpRequest& request, HttpResponse& response)
|
|||||||
QStringList pathElements = path.split('/');
|
QStringList pathElements = path.split('/');
|
||||||
int libraryId = pathElements.at(2).toInt();
|
int libraryId = pathElements.at(2).toInt();
|
||||||
|
|
||||||
QList<LabelItem *> tags = DBHelper::getLabelItems(libraryId);
|
QList<Label> tags = DBHelper::getLabels(libraryId);
|
||||||
|
|
||||||
foreach(LabelItem * tag, tags)
|
foreach(const Label &tag, tags)
|
||||||
{
|
{
|
||||||
response.write(QString("%1\t%2\t%3\r\n").arg(tag->getId()).arg(tag->name()).arg(labelColorToRGBString(tag->colorid())).toUtf8());
|
response.write(QString("%1\t%2\t%3\t%4\r\n").arg(libraryId).arg(tag.getId()).arg(tag.getName()).arg(labelColorToRGBString(tag.getColorID())).toUtf8());
|
||||||
}
|
}
|
||||||
|
|
||||||
response.write("",true);
|
response.write("",true);
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#include "controllers/tagcontentcontroller.h"
|
#include "controllers/tagcontentcontroller.h"
|
||||||
#include "controllers/favoritescontroller.h"
|
#include "controllers/favoritescontroller.h"
|
||||||
#include "controllers/readingcomicscontroller.h"
|
#include "controllers/readingcomicscontroller.h"
|
||||||
|
#include "controllers/readinglistscontroller.h"
|
||||||
|
#include "controllers/readinglistcontentcontroller.h"
|
||||||
|
|
||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
#include "yacreader_libraries.h"
|
#include "yacreader_libraries.h"
|
||||||
@ -211,11 +213,11 @@ void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
|
|||||||
}
|
}
|
||||||
else if(readingLists.exactMatch(path))
|
else if(readingLists.exactMatch(path))
|
||||||
{
|
{
|
||||||
//ReadingListsController().service(request, response);
|
ReadingListsController().service(request, response);
|
||||||
}
|
}
|
||||||
else if(readingListContent.exactMatch(path))
|
else if(readingListContent.exactMatch(path))
|
||||||
{
|
{
|
||||||
//ReadingListContentController().service(request, response);
|
ReadingListContentController().service(request, response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -26,7 +26,8 @@ HEADERS += \
|
|||||||
$$PWD/yacreader_server_data_helper.h \
|
$$PWD/yacreader_server_data_helper.h \
|
||||||
$$PWD/controllers/favoritescontroller.h \
|
$$PWD/controllers/favoritescontroller.h \
|
||||||
$$PWD/controllers/readingcomicscontroller.h \
|
$$PWD/controllers/readingcomicscontroller.h \
|
||||||
$$PWD/controllers/readinglistscontroller.h
|
$$PWD/controllers/readinglistscontroller.h \
|
||||||
|
$$PWD/controllers/readinglistcontentcontroller.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/static.cpp \
|
$$PWD/static.cpp \
|
||||||
@ -53,7 +54,8 @@ SOURCES += \
|
|||||||
$$PWD/yacreader_server_data_helper.cpp \
|
$$PWD/yacreader_server_data_helper.cpp \
|
||||||
$$PWD/controllers/favoritescontroller.cpp \
|
$$PWD/controllers/favoritescontroller.cpp \
|
||||||
$$PWD/controllers/readingcomicscontroller.cpp \
|
$$PWD/controllers/readingcomicscontroller.cpp \
|
||||||
$$PWD/controllers/readinglistscontroller.cpp
|
$$PWD/controllers/readinglistscontroller.cpp \
|
||||||
|
$$PWD/controllers/readinglistcontentcontroller.cpp
|
||||||
|
|
||||||
include(lib/logging/logging.pri)
|
include(lib/logging/logging.pri)
|
||||||
include(lib/httpserver/httpserver.pri)
|
include(lib/httpserver/httpserver.pri)
|
||||||
|
@ -60,7 +60,8 @@ HEADERS += ../YACReaderLibrary/library_creator.h \
|
|||||||
../common/http_worker.h \
|
../common/http_worker.h \
|
||||||
../YACReaderLibrary/yacreader_libraries.h \
|
../YACReaderLibrary/yacreader_libraries.h \
|
||||||
../YACReaderLibrary/comic_files_manager.h \
|
../YACReaderLibrary/comic_files_manager.h \
|
||||||
console_ui_library_creator.h
|
console_ui_library_creator.h \
|
||||||
|
../YACReaderLibrary/db/reading_list.h
|
||||||
|
|
||||||
|
|
||||||
SOURCES += ../YACReaderLibrary/library_creator.cpp \
|
SOURCES += ../YACReaderLibrary/library_creator.cpp \
|
||||||
@ -81,6 +82,7 @@ SOURCES += ../YACReaderLibrary/library_creator.cpp \
|
|||||||
../YACReaderLibrary/yacreader_libraries.cpp \
|
../YACReaderLibrary/yacreader_libraries.cpp \
|
||||||
../YACReaderLibrary/comic_files_manager.cpp \
|
../YACReaderLibrary/comic_files_manager.cpp \
|
||||||
console_ui_library_creator.cpp \
|
console_ui_library_creator.cpp \
|
||||||
|
../YACReaderLibrary/db/reading_list.cpp \
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
include(../YACReaderLibrary/server/server.pri)
|
include(../YACReaderLibrary/server/server.pri)
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include "library_item.h"
|
#include "library_item.h"
|
||||||
|
|
||||||
|
int naturalCompare(const QString &s1, const QString &s2, Qt::CaseSensitivity caseSensitivity);
|
||||||
bool naturalSortLessThanCS( const QString &left, const QString &right );
|
bool naturalSortLessThanCS( const QString &left, const QString &right );
|
||||||
bool naturalSortLessThanCI( const QString &left, const QString &right );
|
bool naturalSortLessThanCI( const QString &left, const QString &right );
|
||||||
bool naturalSortLessThanCIFileInfo(const QFileInfo & left,const QFileInfo & right);
|
bool naturalSortLessThanCIFileInfo(const QFileInfo & left,const QFileInfo & right);
|
||||||
|
@ -10,7 +10,7 @@ extern"C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
||||||
QObject(parent),valid(false),tools(true),numFiles(0),ar(NULL),stream(NULL)
|
QObject(parent),tools(true),valid(false),numFiles(0),ar(NULL),stream(NULL)
|
||||||
{
|
{
|
||||||
//open file
|
//open file
|
||||||
stream = ar_open_file(filePath.toStdString().c_str());
|
stream = ar_open_file(filePath.toStdString().c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user