mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Merged in selmf/yacreader/8.0.0-release (pull request #25)
unarr inclusion and build system updates
This commit is contained in:
commit
5fbc8f3b9e
@ -604,16 +604,21 @@ qulonglong DBHelper::insertReadingSubList(const QString &name, qulonglong parent
|
||||
|
||||
void DBHelper::insertComicsInFavorites(const QList<ComicDB> &comicsList, QSqlDatabase &db)
|
||||
{
|
||||
QSqlQuery getNumComicsInFavoritesQuery("SELECT count(*) FROM comic_default_reading_list WHERE default_reading_list_id = 1;",db);
|
||||
getNumComicsInFavoritesQuery.next();
|
||||
QSqlRecord record = getNumComicsInFavoritesQuery.record();
|
||||
int numComics = record.value(0).toInt();
|
||||
|
||||
db.transaction();
|
||||
|
||||
QSqlQuery query(db);
|
||||
query.prepare("INSERT INTO comic_default_reading_list (default_reading_list_id, comic_id) "
|
||||
"VALUES (1, :comic_id)");
|
||||
query.prepare("INSERT INTO comic_default_reading_list (default_reading_list_id, comic_id, ordering) "
|
||||
"VALUES (1, :comic_id, :ordering)");
|
||||
|
||||
foreach(ComicDB comic, comicsList)
|
||||
{
|
||||
query.bindValue(":comic_id", comic.id);
|
||||
//query.bindValue(":order", numComics++);
|
||||
query.bindValue(":ordering", numComics++);
|
||||
query.exec();
|
||||
}
|
||||
|
||||
@ -622,16 +627,22 @@ void DBHelper::insertComicsInFavorites(const QList<ComicDB> &comicsList, QSqlDat
|
||||
|
||||
void DBHelper::insertComicsInLabel(const QList<ComicDB> &comicsList, qulonglong labelId, QSqlDatabase &db)
|
||||
{
|
||||
QSqlQuery getNumComicsInFavoritesQuery(QString("SELECT count(*) FROM comic_label WHERE label_id = %1;").arg(labelId) ,db);
|
||||
getNumComicsInFavoritesQuery.next();
|
||||
QSqlRecord record = getNumComicsInFavoritesQuery.record();
|
||||
int numComics = record.value(0).toInt();
|
||||
|
||||
db.transaction();
|
||||
|
||||
QSqlQuery query(db);
|
||||
query.prepare("INSERT INTO comic_label (label_id, comic_id) "
|
||||
"VALUES (:label_id, :comic_id)");
|
||||
query.prepare("INSERT INTO comic_label (label_id, comic_id, ordering) "
|
||||
"VALUES (:label_id, :comic_id, :ordering)");
|
||||
|
||||
foreach(ComicDB comic, comicsList)
|
||||
{
|
||||
query.bindValue(":label_id", labelId);
|
||||
query.bindValue(":comic_id", comic.id);
|
||||
query.bindValue(":ordering", numComics++);
|
||||
query.exec();
|
||||
}
|
||||
|
||||
@ -640,7 +651,7 @@ void DBHelper::insertComicsInLabel(const QList<ComicDB> &comicsList, qulonglong
|
||||
|
||||
void DBHelper::insertComicsInReadingList(const QList<ComicDB> &comicsList, qulonglong readingListId, QSqlDatabase &db)
|
||||
{
|
||||
QSqlQuery getNumComicsInFavoritesQuery("SELECT count(*) from comic_reading_list;",db);
|
||||
QSqlQuery getNumComicsInFavoritesQuery("SELECT count(*) FROM comic_reading_list;",db);
|
||||
getNumComicsInFavoritesQuery.next();
|
||||
QSqlRecord record = getNumComicsInFavoritesQuery.record();
|
||||
int numComics = record.value(0).toInt();
|
||||
|
@ -150,11 +150,14 @@ Rectangle {
|
||||
}
|
||||
|
||||
onReleased: {
|
||||
/*if(mouse.button != Qt.RightButton && !(mouse.modifiers & Qt.ControlModifier || mouse.modifiers & Qt.ShiftModifier))
|
||||
if(mouse.button == Qt.LeftButton && !(mouse.modifiers & Qt.ControlModifier || mouse.modifiers & Qt.ShiftModifier))
|
||||
{
|
||||
comicsSelectionHelper.setCurrentIndex(index)
|
||||
grid.currentIndex = index;
|
||||
}*/
|
||||
if(comicsSelectionHelper.isSelectedIndex(index))
|
||||
{
|
||||
comicsSelectionHelper.setCurrentIndex(index)
|
||||
grid.currentIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1269,6 +1269,8 @@ void YACReaderComicFlowGL::updateImageData()
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] indexes;
|
||||
}
|
||||
|
||||
void YACReaderComicFlowGL::remove(int item)
|
||||
@ -1405,6 +1407,8 @@ void YACReaderPageFlowGL::updateImageData()
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] indexes;
|
||||
}
|
||||
|
||||
void YACReaderPageFlowGL::populate(int n)
|
||||
|
@ -1243,6 +1243,7 @@ void YACReaderComicFlowGL::updateImageData()
|
||||
return;
|
||||
}
|
||||
}
|
||||
delete[] indexes;
|
||||
}
|
||||
|
||||
void YACReaderComicFlowGL::remove(int item)
|
||||
@ -1369,6 +1370,7 @@ void YACReaderPageFlowGL::updateImageData()
|
||||
return;
|
||||
}
|
||||
}
|
||||
delete[] indexes;
|
||||
}
|
||||
|
||||
void YACReaderPageFlowGL::populate(int n)
|
||||
|
Loading…
x
Reference in New Issue
Block a user