Commit Graph

67 Commits

Author SHA1 Message Date
Luis Ángel San Martín
f9285bd099 Add a flag to getReadingListFullContent so it can load all the fields 2021-05-27 18:39:00 +02:00
Luis Ángel San Martín
7bb450408c Extract "query to ComicInfo" to its own method to avoid duplicated code 2021-05-27 18:38:24 +02:00
Luis Ángel San Martín
13a29e2657 Make "delete" icon work properly in the "Reading" list
Only the "Favorites" special list was handled.
2021-05-16 09:01:35 +02:00
Luis Ángel San Martín
811c3fcfe4 Add function to get comics from a folder properly sorted 2021-04-30 09:52:10 +02:00
Igor Kushnir
4dcbb958dc Eliminate QStringList <=> QList<QString> conversions
The conversions prevented return value optimization and caused a
-Wreturn-std-move Clang warning.
2021-03-09 21:32:23 +01:00
Igor Kushnir
3c9ed6ef8f Deprecated qSort => std::sort
This change gets rid of some GCC's -Wdeprecated-declarations warnings.
2021-03-09 21:32:23 +01:00
Luis Ángel San Martín
3f6c44ce7a Fix SQL update query for setting manga in all the comics in a folder 2021-01-17 14:05:14 +01:00
Luis Ángel San Martín
6461a4014e Add actions for setting folders as manga/normal 2021-01-16 18:31:48 +01:00
Luis Ángel San Martín
60de69635b Get/set new manga field from/to the db 2021-01-16 18:30:25 +01:00
Luis Ángel San Martín
3ab05c6777 Add a new boolean field for tagging comics as manga 2021-01-16 14:23:59 +01:00
Luis Ángel San Martín
2b780e23a4 Make updateFromRemoteClient return more updated comics
So they can be sent back to the client.
2020-08-25 19:01:43 +02:00
Felix Kauselmann
4b3042def4 Fix object leaks in database code
Qt's database and query model requires that both the queries and the database
objects are out of scope before a database connection can safely be removed.

Solution: Properly encapsulate databases and queries in "{ }" and use a string
to cache the connection name for out-of-scope removal.
2020-08-25 17:34:46 +02:00
Luis Ángel San Martín
a6bfd44aec Remove clear from sql query
It was committed by mistake
2019-09-16 23:44:30 +02:00
Luis Ángel San Martín
9056fffb66 Use db transactions when updating the progress from iOS
Timeouts were a problem before.
2019-08-24 13:31:52 +02:00
Luis Ángel San Martín
bb334cfd50 Use auto to avoid duplicating the type name 2019-06-01 16:04:48 +02:00
Luis Ángel San Martín
e3ec56aa43 Format code using clang-format 2019-05-30 19:46:37 +02:00
François Gannaz
3babc0980e Library: remove unused variable 2019-04-01 11:25:16 +02:00
François Gannaz
66941510f0 Library: fix misleading indentation 2019-04-01 11:25:16 +02:00
Felix Kauselmann
d5a11fb16b Add .gitattributes rules for text and binary handling 2018-07-30 15:04:04 +02:00
Luis Ángel San Martín
9cc4f65fc8 Use older api currentSecsSinceEpoch was introduced in Qt 5.8 2018-05-28 21:18:11 +02:00
Luis Ángel San Martín
1cd33197cc Set hasBeenOpened as true if currentPage > 1
I have seen comics opened with hasBeenOpened to false.
2018-05-25 19:28:20 +02:00
Luis Ángel San Martín
a8655b1037 All lists should load the coverSizeRatio 2018-05-22 18:58:33 +02:00
Luis Ángel San Martín
317f2b839f Remove setting last time opened.
The value should come from the client.
2018-05-21 23:14:51 +02:00
Luis Ángel San Martín
e77d613002 Update last time opened when updating reading progress from ios client. 2018-05-21 22:13:07 +02:00
Luis Ángel San Martín
6cfd09a8b8 Add method for updating reading comic information given a hash. 2018-05-21 19:51:30 +02:00
Luis Ángel San Martín
0e4ffb15a6 Fix update from remote client.
current page has to be set before checking for read.
2018-05-21 19:50:28 +02:00
Luis Ángel San Martín
c93e86af12 Fix loading some missing fields from database 2018-05-20 15:33:11 +02:00
Luis Ángel San Martín
1503fe5383 Add method for marking a comic as reading without opening it first.
Usefull when closing the a comic in the last page to mark the next one and the next being readed.
2018-05-20 14:49:07 +02:00
Luis Ángel San Martín
45e44fa54f Only set a comic as reading if it has been opened beyod the cover. 2018-05-20 14:48:08 +02:00
Luis Ángel San Martín
23823725ac Fix how we consider a comic as being read.
Basically is this: it has been opened and not set as READ.
2018-05-20 14:41:55 +02:00
Luis Ángel San Martín
dc992edb55 Fix color loading for labels. 2018-04-26 22:18:12 +02:00
Luis Ángel San Martín
52c76d5482 Create unique database connections per thread and remove them using the database connection name from the QSqlDatabase instance being used. 2018-04-24 20:53:24 +02:00
Luis Ángel San Martín
db66fe33f3 Merge 2018-04-24 14:44:23 +02:00
Luis Ángel San Martín
30c8cf180e Fix loadComic not loading the comic file name. 2018-04-24 14:43:42 +02:00
Luis Ángel San Martín
c36d4501cc Fix update remote reading query, a coma was missing. 2018-03-24 21:00:27 +01:00
Luis Ángel San Martín
2bb258df13 Load the coverSizeRatio from DB. 2018-03-24 08:20:29 +01:00
Luis Ángel San Martín
f0e1458576 Save and load the the new comic info fields in DBHelper. 2018-03-11 15:30:34 +01:00
Felix Kauselmann
2cbbf8d433 Headless server: simplify system config logger 2018-01-28 13:32:56 +01:00
Luis Ángel San Martín
e8c6f60c13 Merge 2017-11-26 07:39:08 +01:00
Luis Ángel San Martín
b60c0e523c Fix sorting in siblings calculation, it is the name (file name) not the title. 2017-11-20 21:38:07 +01:00
Luis Ángel San Martín
5c268217d3 Fix read flag calculation on progress read updated from the server. 2017-11-19 10:03:40 +01:00
Luis Ángel San Martín
4d4556f7e2 Removed usage of QSqlRecoerd unless is totally necessary. 2017-08-28 19:02:18 +02:00
Luis Ángel San Martín
9ed1f0f306 Merge 2017-08-28 18:52:24 +02:00
Luis Ángel San Martín
1e74234dbf Fixed data base info retrieving through DBHelper - values(QString) and QSqlRecord. Methods implemented before the fixes in the develop branch. 2017-08-26 17:03:18 +02:00
Luis Ángel San Martín
f149f314e0 Merge 2017-08-26 16:54:10 +02:00
Luis Ángel San Martín
d6898e9a4e Fixed data base info retrieving through DBHelper, value(QString) should never be used because it is really slow. All items sorting should be done at db level or using std::sort. 2017-08-26 16:16:11 +02:00
Luis Ángel San Martín
85fba7e8f5 Added new methods for getting reading lists and comics in a reading list. Fixed DBHelper for not using GUI related classes (reading_list_item). 2017-05-26 17:27:08 +02:00
Luis Ángel San Martín
e2a8d520a9 Update the new lastTimeOpened value in the DB when it is needed in the DBHelper. Plus updated the getReading method for ordering the comics by the last time they were opened (descending order). 2017-03-28 18:42:25 +02:00
Luis Ángel San Martín
87e9cf92ff Use FAV_ID instead of hardcoded value. 2016-08-23 22:23:06 +02:00
Luis Ángel San Martín
983a035c31 New method for getting the comics being read, plus added the read state to comics loaded for being served. 2016-08-23 22:22:46 +02:00