mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 15:35:03 -04:00
unificado el formato de lor archivos de about/ayuda a utf-8
eliminados algunos comentarios TODO que ya se hab?an completado
This commit is contained in:
@ -32,7 +32,7 @@ QList<LibraryItem *> Comic::getComicsFromParent(qulonglong parentId, QSqlDatabas
|
||||
{
|
||||
QList<LibraryItem *> list;
|
||||
|
||||
QSqlQuery selectQuery(db); //TODO check
|
||||
QSqlQuery selectQuery(db);
|
||||
selectQuery.prepare("select c.id,c.parentId,c.fileName,c.path,ci.hash from comic c inner join comic_info ci on (c.comicInfoId = ci.id) where c.parentId = :parentId");
|
||||
selectQuery.bindValue(":parentId", parentId);
|
||||
selectQuery.exec();
|
||||
@ -44,7 +44,7 @@ QList<LibraryItem *> Comic::getComicsFromParent(qulonglong parentId, QSqlDatabas
|
||||
QSqlRecord record = selectQuery.record();
|
||||
for(int i=0;i<record.count();i++)
|
||||
data << record.value(i);
|
||||
//TODO sort by sort indicator and name
|
||||
|
||||
currentItem = new Comic();
|
||||
currentItem->id = record.value("id").toULongLong();
|
||||
currentItem->parentId = record.value(1).toULongLong();
|
||||
@ -81,7 +81,7 @@ QList<LibraryItem *> Comic::getComicsFromParent(qulonglong parentId, QSqlDatabas
|
||||
bool Comic::load(qulonglong idc, QSqlDatabase & db)
|
||||
{
|
||||
|
||||
QSqlQuery selectQuery(db); //TODO check
|
||||
QSqlQuery selectQuery(db);
|
||||
selectQuery.prepare("select c.id,c.parentId,c.fileName,c.path,ci.hash from comic c inner join comic_info ci on (c.comicInfoId = ci.id) where c.id = :id");
|
||||
selectQuery.bindValue(":id", idc);
|
||||
selectQuery.exec();
|
||||
@ -104,7 +104,6 @@ bool Comic::load(qulonglong idc, QSqlDatabase & db)
|
||||
|
||||
qulonglong Comic::insert(QSqlDatabase & db)
|
||||
{
|
||||
//TODO comprobar si ya hay comic info con ese hash
|
||||
//TODO cambiar por info.insert(db)
|
||||
|
||||
if(!info.existOnDb)
|
||||
@ -119,7 +118,7 @@ qulonglong Comic::insert(QSqlDatabase & db)
|
||||
_hasCover = false;
|
||||
}
|
||||
else
|
||||
_hasCover = true; //TODO check on disk...
|
||||
_hasCover = true;
|
||||
|
||||
QSqlQuery query(db);
|
||||
query.prepare("INSERT INTO comic (parentId, comicInfoId, fileName, path) "
|
||||
|
@ -40,7 +40,7 @@ QList<LibraryItem *> Folder::getFoldersFromParent(qulonglong parentId, QSqlDatab
|
||||
else
|
||||
{
|
||||
Folder * last = static_cast<Folder *>(list.back());
|
||||
QString nameLast = last->name; //TODO usar info name si est<73> disponible, sino el nombre del fichero.....
|
||||
QString nameLast = last->name;
|
||||
QString nameCurrent = currentItem->name;
|
||||
QList<LibraryItem *>::iterator i;
|
||||
i = list.end();
|
||||
|
@ -201,7 +201,7 @@ void TableModel::setupModelData(QSqlQuery &sqlquery)
|
||||
QSqlRecord record = sqlquery.record();
|
||||
for(int i=0;i<record.count();i++)
|
||||
data << record.value(i);
|
||||
//TODO sort by sort indicator and name
|
||||
|
||||
currentItem = new TableItem(data);
|
||||
bool lessThan = false;
|
||||
if(_data.isEmpty())
|
||||
@ -209,7 +209,7 @@ void TableModel::setupModelData(QSqlQuery &sqlquery)
|
||||
else
|
||||
{
|
||||
TableItem * last = _data.back();
|
||||
QString nameLast = last->data(FILE_NAME).toString(); //TODO usar info name si est<73> disponible, sino el nombre del fichero.....
|
||||
QString nameLast = last->data(FILE_NAME).toString();
|
||||
QString nameCurrent = currentItem->data(FILE_NAME).toString();
|
||||
int numberLast,numberCurrent;
|
||||
numberLast = numberCurrent = NUMBER_MAX; //TODO change by std limit
|
||||
@ -305,7 +305,6 @@ QVector<bool> TableModel::getReadList()
|
||||
QVector<bool> readList(numComics);
|
||||
for(int i=0;i<numComics;i++)
|
||||
{
|
||||
//TODO reemplazar el acceso a las columnas con enteros por defines
|
||||
readList[i] = _data.value(i)->data(READ).toBool();
|
||||
}
|
||||
return readList;
|
||||
@ -319,7 +318,6 @@ QVector<bool> TableModel::setAllComicsRead(bool read)
|
||||
QVector<bool> readList(numComics);
|
||||
for(int i=0;i<numComics;i++)
|
||||
{
|
||||
//TODO reemplazar el acceso a las columnas con enteros por defines
|
||||
readList[i] = read;
|
||||
_data.value(i)->data(READ) = QVariant(true);
|
||||
Comic c;
|
||||
|
Reference in New Issue
Block a user