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:
Luis Ángel San Martín
2012-07-23 18:00:33 +02:00
parent 192ebd04b2
commit 2b63c08251
19 changed files with 189 additions and 141 deletions

View File

@ -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) "

View File

@ -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();

View File

@ -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;

View File

@ -41,7 +41,6 @@ void LibraryCreator::processLibrary(const QString & source, const QString & targ
{
_source = source;
_target = target;
//if(!(QFile(target+"/library.ydb").exists())) //TODO, no sirve s<>lo con realizar el update, hay que validar la base de datos y determinar si existe "/covers"
if(DataBaseManagement::checkValidDB(target+"/library.ydb")=="")
{
//se limpia el directorio ./yacreaderlibrary
@ -102,7 +101,7 @@ void LibraryCreator::run()
void LibraryCreator::stop()
{
_database.commit(); //TODO check
_database.commit();
stopRunning = true;
}
@ -236,8 +235,7 @@ void LibraryCreator::update(QDir dirS)
{
dirS.setNameFilters(_nameFilter);
dirS.setFilter(QDir::AllDirs|QDir::Files|QDir::NoDotAndDotDot);
dirS.setSorting(QDir::Name|QDir::IgnoreCase|QDir::LocaleAware|QDir::DirsFirst); //TODO la ordenaci<63>n debe ser igual que en la base de datos
//TODO obtener primero los directorios, despu<70>s los ficheros, ordenar por separado y concatenar
dirS.setSorting(QDir::Name|QDir::IgnoreCase|QDir::LocaleAware|QDir::DirsFirst);
QFileInfoList listS = dirS.entryInfoList();
QList<LibraryItem *> folders = Folder::getFoldersFromParent(_currentPathFolders.last().id,_database);
@ -456,7 +454,6 @@ void ThumbnailCreator::create()
{
if(p.loadFromData(image))
{
//TODO calculate aspect ratio
QImage scaled;
if(p.width()>p.height()) //landscape??
scaled = p.scaledToWidth(640,Qt::SmoothTransformation);
@ -468,7 +465,6 @@ void ThumbnailCreator::create()
{
p.load(":/images/notCover.png");
p.save(_target);
//TODO save a default image.
}
}
delete _7z;

View File

@ -612,8 +612,6 @@ void LibraryWindow::loadLibrary(const QString & name)
{
index = 0;
sm->clear();
//foldersView->setModel(NULL); //TODO comprobar pq no sirve con usar simplemente las se<73>ales beforeReset y reset
//comicView->setModel(NULL);
dm->setupModelData(path);
foldersView->setModel(dm);
@ -658,7 +656,7 @@ void LibraryWindow::loadLibrary(const QString & name)
{
int ret = QMessageBox::question(this,tr("Download new version"),tr("This library was created with a newer version of YACReaderLibrary. Download the new version now?"),QMessageBox::Yes,QMessageBox::No);
if(ret == QMessageBox::Yes)
QDesktopServices::openUrl(QUrl("http://code.google.com/p/yacreader/"));
QDesktopServices::openUrl(QUrl("http://www.yacreader.com"));
comicView->setModel(NULL);
foldersView->setModel(NULL);
@ -1065,7 +1063,6 @@ void LibraryWindow::rename(QString newName)
void LibraryWindow::cancelCreating()
{
stopLibraryCreator();
//TODO delete library.
}
void LibraryWindow::stopLibraryCreator()

View File

@ -350,7 +350,7 @@ void PropertiesDialog::setComics(QList<Comic> comics)
if(itr->info.title == NULL || *(itr->info.title) != title->text())
title->clear();
if(itr->info.count == NULL || *(itr->info.count) != countEdit->text().toInt()) //TODO esto est<73> mal
if(itr->info.count == NULL || *(itr->info.count) != countEdit->text().toInt())
countEdit->clear();
if(itr->info.volume == NULL || *(itr->info.volume) != volumeEdit->text())