mirror of
https://github.com/YACReader/yacreader
synced 2025-07-20 05:54:39 -04:00
antes de a?adir la clase Comic de YACReader a YACReaderLibrary
navegaci?n web con paginaci?n rudimentaria implementada
This commit is contained in:
@ -4,6 +4,23 @@
|
||||
#include <QSqlRecord>
|
||||
#include <QVariant>
|
||||
|
||||
Folder::Folder(qulonglong id, QSqlDatabase & db)
|
||||
{
|
||||
QSqlQuery query(db);
|
||||
query.prepare("SELECT * FROM folder WHERE id = :id");
|
||||
query.bindValue(":id",id);
|
||||
query.exec();
|
||||
this->id = id;
|
||||
this->parentId = 0;
|
||||
if(query.next())
|
||||
{
|
||||
QSqlRecord record = query.record();
|
||||
this->parentId = record.value("parentId").toULongLong();
|
||||
this->name = record.value("name").toString();
|
||||
this->path = record.value("path").toString();
|
||||
}
|
||||
}
|
||||
|
||||
qulonglong Folder::insert(QSqlDatabase & db)
|
||||
{
|
||||
QSqlQuery query(db);
|
||||
|
Reference in New Issue
Block a user