From 0e0d707fafda2887c9a0874415191ea8eefd234a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:08:45 +0200 Subject: [PATCH 01/45] reorder initialization of Comic::Comic --- common/comic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/comic.cpp b/common/comic.cpp index 3724f022..350e5b11 100644 --- a/common/comic.cpp +++ b/common/comic.cpp @@ -44,13 +44,13 @@ const QStringList Comic::literalComicExtensions = LiteralComicArchiveExtensions; //----------------------------------------------------------------------------- Comic::Comic() -:_pages(),_index(0),_path(),_loaded(false),bm(new Bookmarks()),_loadedPages(),_isPDF(false),_invalidated(false),_errorOpening(false) +:_pages(),_loadedPages(),_index(0),_path(),_loaded(false),_isPDF(false),_invalidated(false),_errorOpening(false),bm(new Bookmarks()) { setup(); } //----------------------------------------------------------------------------- Comic::Comic(const QString & pathFile, int atPage ) -:_pages(),_index(0),_path(pathFile),_loaded(false),bm(new Bookmarks()),_loadedPages(),_isPDF(false),_firstPage(atPage),_errorOpening(false) +:_pages(),_loadedPages(),_index(0),_path(pathFile),_loaded(false),_firstPage(atPage),_isPDF(false),_errorOpening(false),bm(new Bookmarks()) { setup(); } From 06a36bfa402231f82b6aeab36d648cdd56efd0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:16:09 +0200 Subject: [PATCH 02/45] reorder initialization of Viewer::Viewer --- YACReader/viewer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index 93c5e5c9..599bd201 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -24,20 +24,20 @@ Viewer::Viewer(QWidget * parent) :QScrollArea(parent), - currentPage(0), - magnifyingGlassShowed(false), fullscreen(false), information(false), doublePage(false), doubleMangaPage(false), + zoom(100), + currentPage(0), wheelStop(false), direction(1), - restoreMagnifyingGlass(false), drag(false), numScrollSteps(22), shouldOpenNext(false), shouldOpenPrevious(false), - zoom(100) + magnifyingGlassShowed(false), + restoreMagnifyingGlass(false) { translator = new YACReaderTranslator(this); translator->hide(); From a8677553b76327b47eec7b68ec9d61fa5ec6bf52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:18:49 +0200 Subject: [PATCH 03/45] reorder initialization of PageRender --- YACReader/render.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YACReader/render.cpp b/YACReader/render.cpp index f2d46255..b812bd1f 100644 --- a/YACReader/render.cpp +++ b/YACReader/render.cpp @@ -361,12 +361,12 @@ PageRender::PageRender() } PageRender::PageRender(Render * r,int np, const QByteArray & rd, QImage * p,unsigned int d, QVector f) :QThread(), -render(r), numPage(np), data(rd), page(p), degrees(d), -filters(f) +filters(f), +render(r) { } From 560bcf7f32313880e05510582786b7941b989a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:22:46 +0200 Subject: [PATCH 04/45] reorder initialization of Render --- YACReader/render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReader/render.cpp b/YACReader/render.cpp index b812bd1f..5c19ec5e 100644 --- a/YACReader/render.cpp +++ b/YACReader/render.cpp @@ -398,7 +398,7 @@ void PageRender::run() //----------------------------------------------------------------------------- Render::Render() -:currentIndex(0),doublePage(false),doubleMangaPage(false),comic(0),loadedComic(false),imageRotation(0),numLeftPages(4),numRightPages(4) +:comic(0),doublePage(false),doubleMangaPage(false),currentIndex(0),numLeftPages(4),numRightPages(4),loadedComic(false),imageRotation(0) { int size = numLeftPages+numRightPages+1; currentPageBufferedIndex = numLeftPages; From 9dbfabc05f15c2ea459707d2661152c7d7450d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:25:12 +0200 Subject: [PATCH 05/45] fix ambigous 'else' in Render::load --- YACReader/render.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/YACReader/render.cpp b/YACReader/render.cpp index 5c19ec5e..a66e779f 100644 --- a/YACReader/render.cpp +++ b/YACReader/render.cpp @@ -734,20 +734,26 @@ void Render::load(const QString & path, const ComicDB & comicDB) for(int i = 0; i < filters.count(); i++) { if(typeid(*filters[i]) == typeid(BrightnessFilter)) + { if(comicDB.info.brightness == -1) filters[i]->setLevel(0); else filters[i]->setLevel(comicDB.info.brightness); + } if(typeid(*filters[i]) == typeid(ContrastFilter)) + { if(comicDB.info.contrast == -1) filters[i]->setLevel(100); else filters[i]->setLevel(comicDB.info.contrast); + } if(typeid(*filters[i]) == typeid(GammaFilter)) + { if(comicDB.info.gamma == -1) filters[i]->setLevel(100); else filters[i]->setLevel(comicDB.info.gamma); + } } createComic(path); if (comic!=0) From f9d6667461ffd75e3cab6b51f44691a607c272f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:27:09 +0200 Subject: [PATCH 06/45] typecast comparison in Render::nextPage --- YACReader/render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReader/render.cpp b/YACReader/render.cpp index a66e779f..64f98719 100644 --- a/YACReader/render.cpp +++ b/YACReader/render.cpp @@ -863,7 +863,7 @@ void Render::nextPage() update(); emit pageChanged(currentIndex); } - else if (hasLoadedComic() && (currentIndex == numPages()-1)) + else if (hasLoadedComic() && ((unsigned int)currentIndex == numPages()-1)) { emit isLast(); } From c10cfc01e9a01a7a9d07e84e5b7f38093dadbd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:31:32 +0200 Subject: [PATCH 07/45] type qualifiers are ignored on function return type --- custom_widgets/yacreader_busy_widget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_widgets/yacreader_busy_widget.h b/custom_widgets/yacreader_busy_widget.h index ab4bf9ff..93fa099b 100644 --- a/custom_widgets/yacreader_busy_widget.h +++ b/custom_widgets/yacreader_busy_widget.h @@ -26,7 +26,7 @@ public: void setIndicatorStyle(IndicatorStyle); void setColor(QColor color); - const IndicatorStyle indicatorStyle() const; + IndicatorStyle indicatorStyle() const; signals: From f012a6d30ec1f7e43f63bac38d4a38ba52323359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:34:19 +0200 Subject: [PATCH 08/45] reorder initialization of PictureFlowState --- common/pictureflow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pictureflow.cpp b/common/pictureflow.cpp index f83507e3..a094ba41 100644 --- a/common/pictureflow.cpp +++ b/common/pictureflow.cpp @@ -283,7 +283,7 @@ private: PictureFlowState::PictureFlowState(int a, float sr): backgroundColor(0), slideWidth(150), slideHeight(200), -reflectionEffect(PictureFlow::BlurredReflection), centerIndex(0) , rawAngle(a), spacingRatio(sr), flowRightToLeft(false) +reflectionEffect(PictureFlow::BlurredReflection), rawAngle(a), spacingRatio(sr), centerIndex(0), flowRightToLeft(false) { } From 0c02564fc5886ddf94bfa6b5231664c5d6c8afae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:35:48 +0200 Subject: [PATCH 09/45] cases missing in 'switch' in PictureFlow --- common/pictureflow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/pictureflow.cpp b/common/pictureflow.cpp index a094ba41..73c0973b 100644 --- a/common/pictureflow.cpp +++ b/common/pictureflow.cpp @@ -1017,6 +1017,8 @@ PictureFlow::PictureFlow(QWidget* parent,FlowType flowType): QWidget(parent) case StripOverlapped: d->state = new PictureFlowState(0,0); break; + default: + break; } framesSkip = 0; From e084bdd44732ca0fedecd806e1b9d6647a43e48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:37:19 +0200 Subject: [PATCH 10/45] cases missing in 'switch' in PictureFlow --- common/pictureflow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/pictureflow.cpp b/common/pictureflow.cpp index 73c0973b..60bb9b8f 100644 --- a/common/pictureflow.cpp +++ b/common/pictureflow.cpp @@ -1399,6 +1399,8 @@ void PictureFlow::setFlowType(FlowType flowType) d->state->spacingRatio = 0; d->state->reposition(); break; + default: + break; } d->state->reset(); d->renderer->init(); From fae244b4e3bf1caaefe5690f49d508eb6738d72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:38:37 +0200 Subject: [PATCH 11/45] typecast comparison in PictureFlow::showSlide --- common/pictureflow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pictureflow.cpp b/common/pictureflow.cpp index 60bb9b8f..b3d4e8cb 100644 --- a/common/pictureflow.cpp +++ b/common/pictureflow.cpp @@ -1261,7 +1261,7 @@ void PictureFlow::showSlide(unsigned int index) { index = qMax(index, 0); index = qMin(slideCount()-1, index); - if(index == d->state->centerSlide.slideIndex) + if((int)index == d->state->centerSlide.slideIndex) return; int distance = centerIndex()-index; From 7b9502bd976c3af7efe0c4ba6191147c954ac07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:40:03 +0200 Subject: [PATCH 12/45] fix misleading indentation of PictureFlow::showSlide --- common/pictureflow.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/common/pictureflow.cpp b/common/pictureflow.cpp index b3d4e8cb..edb5149c 100644 --- a/common/pictureflow.cpp +++ b/common/pictureflow.cpp @@ -1261,18 +1261,19 @@ void PictureFlow::showSlide(unsigned int index) { index = qMax(index, 0); index = qMin(slideCount()-1, index); - if((int)index == d->state->centerSlide.slideIndex) + if((int)index == d->state->centerSlide.slideIndex) { return; + } - int distance = centerIndex()-index; + int distance = centerIndex()-index; - if(abs(distance)>10) - { - if(distance<0) - setCenterIndex(centerIndex()+(-distance)-10); - else - setCenterIndex(centerIndex()-distance+10); - } + if(abs(distance)>10) + { + if(distance<0) + setCenterIndex(centerIndex()+(-distance)-10); + else + setCenterIndex(centerIndex()-distance+10); + } d->state->centerIndex = index; d->animator->start(index); From 4f7f760960e26dc06a59ebaa5d6d95360a1e5c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:41:45 +0200 Subject: [PATCH 13/45] fix misleading indentation of ComicDB::toTXT --- common/comic_db.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/common/comic_db.cpp b/common/comic_db.cpp index bb78d4c4..729d7c4f 100644 --- a/common/comic_db.cpp +++ b/common/comic_db.cpp @@ -29,7 +29,7 @@ QString ComicDB::toTXT() txt.append(QString("comicid:%1\r\n").arg(id)); txt.append(QString("hash:%1\r\n").arg(info.hash)); txt.append(QString("path:%1\r\n").arg(path)); - txt.append(QString("numpages:%1\r\n").arg(info.numPages.toString())); + txt.append(QString("numpages:%1\r\n").arg(info.numPages.toString())); //new 7.0 txt.append(QString("rating:%1\r\n").arg(info.rating)); @@ -37,23 +37,23 @@ QString ComicDB::toTXT() txt.append(QString("contrast:%1\r\n").arg(info.contrast)); //Informaci�n general - if(!info.coverPage.isNull()) - txt.append(QString("coverPage:%1\r\n").arg(info.coverPage.toString())); + if(!info.coverPage.isNull()) + txt.append(QString("coverPage:%1\r\n").arg(info.coverPage.toString())); - if(!info.title.isNull()) - txt.append(QString("title:%1\r\n").arg(info.title.toString())); + if(!info.title.isNull()) + txt.append(QString("title:%1\r\n").arg(info.title.toString())); if(!info.number.isNull()) - txt.append(QString("number:%1\r\n").arg(info.number.toString())); + txt.append(QString("number:%1\r\n").arg(info.number.toString())); if(!info.isBis.isNull()) - txt.append(QString("isBis:%1\r\n").arg(info.isBis.toBool()?"1":"0")); + txt.append(QString("isBis:%1\r\n").arg(info.isBis.toBool()?"1":"0")); if(!info.count.isNull()) - txt.append(QString("count:%1\r\n").arg(info.count.toString())); + txt.append(QString("count:%1\r\n").arg(info.count.toString())); if(!info.volume.isNull()) - txt.append(QString("volume:%1\r\n").arg(info.volume.toString())); + txt.append(QString("volume:%1\r\n").arg(info.volume.toString())); if(!info.storyArc.isNull()) txt.append(QString("storyArc:%1\r\n").arg(info.storyArc.toString())); @@ -88,7 +88,7 @@ QString ComicDB::toTXT() //Publicaci�n if(!info.date.isNull()) txt.append(QString("date:%1\r\n").arg(info.date.toString())); - + if(!info.publisher.isNull()) txt.append(QString("publisher:%1\r\n").arg(info.publisher.toString())); @@ -110,7 +110,7 @@ QString ComicDB::toTXT() if(!info.notes.isNull()) txt.append(QString("notes:%1\r\n").arg(info.notes.toString())); - return txt; + return txt; } ComicDB &ComicDB::operator=(const ComicDB &other) From 8879e7abc599be4dd8bc421a1c95f929f0492ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:43:24 +0200 Subject: [PATCH 14/45] Initialize parent class --- common/comic_db.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/comic_db.cpp b/common/comic_db.cpp index 729d7c4f..87c7ee9e 100644 --- a/common/comic_db.cpp +++ b/common/comic_db.cpp @@ -181,6 +181,7 @@ ComicInfo::ComicInfo() } ComicInfo::ComicInfo(const ComicInfo & comicInfo) + :QObject() { operator=(comicInfo); } From 5ad0e293ac3fa1f3dd8ad77ef01e20aa061283e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:45:17 +0200 Subject: [PATCH 15/45] typecast comparison from unsigned to int --- YACReader/yacreader_local_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReader/yacreader_local_client.cpp b/YACReader/yacreader_local_client.cpp index 23ca326d..fde82a7e 100644 --- a/YACReader/yacreader_local_client.cpp +++ b/YACReader/yacreader_local_client.cpp @@ -69,7 +69,7 @@ bool YACReaderLocalClient::requestComicInfo(quint64 libraryId, ComicDB & comic, int dataAvailable = 0; QByteArray packageSize; localSocket->waitForReadyRead(1000); - while(packageSize.size() < sizeof(quint32) && tries < 20) + while(packageSize.size() < (int)sizeof(quint32) && tries < 20) { packageSize.append(localSocket->read(sizeof(quint32) - packageSize.size())); localSocket->waitForReadyRead(100); From 9ace47ccc04254fd27d10cccc1a1f0c4ef6edac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:46:43 +0200 Subject: [PATCH 16/45] explicit parenthesis in complex comparison --- common/scroll_management.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/scroll_management.cpp b/common/scroll_management.cpp index 8db92273..a773ac1e 100644 --- a/common/scroll_management.cpp +++ b/common/scroll_management.cpp @@ -23,7 +23,7 @@ ScrollManagement::Movement ScrollManagement::getMovement(QWheelEvent *event) } // Accumulate the delta - if(event->delta()<0 != wheelAccumulator<0 ) //different sign means change in direction + if((event->delta()<0) != (wheelAccumulator<0) ) //different sign means change in direction wheelAccumulator = 0; wheelAccumulator += event->delta(); From 472e9f98321f74825dc17ceb28eac132eadf68a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:52:20 +0200 Subject: [PATCH 17/45] reorder initialization of YACReaderFlowGL --- common/gl/yacreader_flow_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gl/yacreader_flow_gl.cpp b/common/gl/yacreader_flow_gl.cpp index ec75ab00..2b8d2997 100644 --- a/common/gl/yacreader_flow_gl.cpp +++ b/common/gl/yacreader_flow_gl.cpp @@ -200,7 +200,7 @@ struct Preset pressetYACReaderFlowDownConfig = { }; /*Constructor*/ YACReaderFlowGL::YACReaderFlowGL(QWidget *parent,struct Preset p) - :QOpenGLWidget(/*QOpenGLWidget migration QGLFormat(QGL::SampleBuffers),*/ parent),numObjects(0),lazyPopulateObjects(-1),bUseVSync(false),hasBeenInitialized(false),flowRightToLeft(false) + :QOpenGLWidget(/*QOpenGLWidget migration QGLFormat(QGL::SampleBuffers),*/ parent),numObjects(0),lazyPopulateObjects(-1),hasBeenInitialized(false),bUseVSync(false),flowRightToLeft(false) { updateCount = 0; config = p; From f87e113f89b464898ab9bfb69faf5b8a12f9ca10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:53:57 +0200 Subject: [PATCH 18/45] fix misleading indentation of YACReaderFlowGL::setCurrentIndex --- common/gl/yacreader_flow_gl.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/common/gl/yacreader_flow_gl.cpp b/common/gl/yacreader_flow_gl.cpp index 2b8d2997..cabb87c9 100644 --- a/common/gl/yacreader_flow_gl.cpp +++ b/common/gl/yacreader_flow_gl.cpp @@ -650,22 +650,21 @@ void YACReaderFlowGL::setCurrentIndex(int pos) if(pos >= images.length() && images.length() > 0) pos = images.length()-1; - startAnimationTimer(); + startAnimationTimer(); - currentSelected = pos; + currentSelected = pos; - config.animationStep *= config.animationSpeedUp; + config.animationStep *= config.animationSpeedUp; - if(config.animationStep > config.animationStepMax){ - config.animationStep = config.animationStepMax; - } + if(config.animationStep > config.animationStepMax){ + config.animationStep = config.animationStepMax; + } - if(viewRotateActive && viewRotate < 1){ - viewRotate += config.viewRotateAdd; - } - - viewRotateActive = 1; + if(viewRotateActive && viewRotate < 1){ + viewRotate += config.viewRotateAdd; + } + viewRotateActive = 1; } void YACReaderFlowGL::updatePositions() From b2f44a939efc18fcba29ab28a09499aa2e5abaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 09:54:36 +0200 Subject: [PATCH 19/45] fix misleading indentation of YACReaderFlowGL::remove --- common/gl/yacreader_flow_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gl/yacreader_flow_gl.cpp b/common/gl/yacreader_flow_gl.cpp index cabb87c9..eac444ca 100644 --- a/common/gl/yacreader_flow_gl.cpp +++ b/common/gl/yacreader_flow_gl.cpp @@ -755,7 +755,7 @@ void YACReaderFlowGL::remove(int item) if(texture != defaultTexture) delete(texture); - numObjects--; + numObjects--; } /*Info*/ From 4ac34071066e9318d359a26f987a653c53c8cf5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:17:33 +0200 Subject: [PATCH 20/45] type qualifiers are ignored on function return type --- custom_widgets/yacreader_busy_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_widgets/yacreader_busy_widget.cpp b/custom_widgets/yacreader_busy_widget.cpp index 3ec075a5..9904de7c 100644 --- a/custom_widgets/yacreader_busy_widget.cpp +++ b/custom_widgets/yacreader_busy_widget.cpp @@ -57,7 +57,7 @@ void BusyIndicator::setColor(QColor color) fillColor = color; } -const BusyIndicator::IndicatorStyle BusyIndicator::indicatorStyle() const +BusyIndicator::IndicatorStyle BusyIndicator::indicatorStyle() const { return m_style; } From 3062d8826eac24ef8fa70344f8da2db826b80fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:21:20 +0200 Subject: [PATCH 21/45] Library: reorder initialization of LibraryWindow --- YACReaderLibrary/library_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index c2d1ca99..13130127 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -88,7 +88,7 @@ #endif LibraryWindow::LibraryWindow() - :QMainWindow(),fullscreen(false),fetching(false),previousFilter(""),removeError(false),status(LibraryWindow::Normal) + :QMainWindow(),fullscreen(false),previousFilter(""),fetching(false),status(LibraryWindow::Normal),removeError(false) { setupUI(); From f7b4b7a5d125134f59463eb3f7335268997ac92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:24:01 +0200 Subject: [PATCH 22/45] Library: add missing 'case' to a 'switch' --- YACReaderLibrary/library_window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 13130127..5b144382 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -2571,6 +2571,8 @@ void LibraryWindow::deleteComicsFromList() case ReadingListModel::ReadingList: comicsModel->deleteComicsFromReadingList(indexList,id); break; + case ReadingListModel::Separator: + break; } } From c044e93446da63775d68c8b74984c310bee52d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:26:22 +0200 Subject: [PATCH 23/45] Library: typecast in comparison of int and quint64 --- YACReaderLibrary/library_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 5b144382..182894c2 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -2629,7 +2629,7 @@ void LibraryWindow::importLibraryPackage() void LibraryWindow::updateComicsView(quint64 libraryId, const ComicDB & comic) { - if(libraryId == libraries.getId(selectedLibrary->currentText())) { + if(libraryId == (quint64)libraries.getId(selectedLibrary->currentText())) { comicsModel->reload(comic); comicsViewsManager->updateCurrentComicView(); } From 2274e49ed039513ee09c65f9ac7581808360f6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:29:27 +0200 Subject: [PATCH 24/45] Library: fix misleading indentation --- YACReaderLibrary/properties_dialog.cpp | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/YACReaderLibrary/properties_dialog.cpp b/YACReaderLibrary/properties_dialog.cpp index dc885f93..e9a25040 100644 --- a/YACReaderLibrary/properties_dialog.cpp +++ b/YACReaderLibrary/properties_dialog.cpp @@ -422,37 +422,37 @@ void PropertiesDialog::setComics(QList comics) numPagesEdit->setText(QString::number(*comic.info.numPages));*/ - if(!comic.info.number.isNull()) - numberEdit->setText(comic.info.number.toString()); - if(!comic.info.isBis.isNull()) - isBisCheck->setChecked(comic.info.isBis.toBool()); - if(!comic.info.count.isNull()) - countEdit->setText(comic.info.count.toString()); + if(!comic.info.number.isNull()) + numberEdit->setText(comic.info.number.toString()); + if(!comic.info.isBis.isNull()) + isBisCheck->setChecked(comic.info.isBis.toBool()); + if(!comic.info.count.isNull()) + countEdit->setText(comic.info.count.toString()); - if(!comic.info.volume.isNull()) - volumeEdit->setText(comic.info.volume.toString()); - if(!comic.info.storyArc.isNull()) - storyArcEdit->setText(comic.info.storyArc.toString()); - if(!comic.info.arcNumber.isNull()) - arcNumberEdit->setText(comic.info.arcNumber.toString()); + if(!comic.info.volume.isNull()) + volumeEdit->setText(comic.info.volume.toString()); + if(!comic.info.storyArc.isNull()) + storyArcEdit->setText(comic.info.storyArc.toString()); + if(!comic.info.arcNumber.isNull()) + arcNumberEdit->setText(comic.info.arcNumber.toString()); if(!comic.info.arcCount.isNull()) - arcCountEdit->setText(comic.info.arcCount.toString()); + arcCountEdit->setText(comic.info.arcCount.toString()); if(!comic.info.genere.isNull()) - genereEdit->setText(comic.info.genere.toString()); + genereEdit->setText(comic.info.genere.toString()); if(!comic.info.writer.isNull()) - writer->setPlainText(comic.info.writer.toString()); + writer->setPlainText(comic.info.writer.toString()); if(!comic.info.penciller.isNull()) - penciller->setPlainText(comic.info.penciller.toString()); + penciller->setPlainText(comic.info.penciller.toString()); if(!comic.info.inker.isNull()) - inker->setPlainText(comic.info.inker.toString()); + inker->setPlainText(comic.info.inker.toString()); if(!comic.info.colorist.isNull()) - colorist->setPlainText(comic.info.colorist.toString()); + colorist->setPlainText(comic.info.colorist.toString()); if(!comic.info.letterer.isNull()) - letterer->setPlainText(comic.info.letterer.toString()); + letterer->setPlainText(comic.info.letterer.toString()); if(!comic.info.coverArtist.isNull()) - coverArtist->setPlainText(comic.info.coverArtist.toString()); + coverArtist->setPlainText(comic.info.coverArtist.toString()); size->setText(QString::number(comic.info.hash.right(comic.info.hash.length()-40).toInt()/1024.0/1024.0,'f',2)+"Mb"); From 66941510f04d3c2a61e58f1d0649280da37e0879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:30:23 +0200 Subject: [PATCH 25/45] Library: fix misleading indentation --- YACReaderLibrary/db_helper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/db_helper.cpp b/YACReaderLibrary/db_helper.cpp index b4753c24..469c3d56 100644 --- a/YACReaderLibrary/db_helper.cpp +++ b/YACReaderLibrary/db_helper.cpp @@ -499,8 +499,8 @@ void DBHelper::update(qulonglong libraryId, ComicInfo & comicInfo) void DBHelper::update(ComicInfo * comicInfo, QSqlDatabase & db) { - if(comicInfo == nullptr) - return; + if(comicInfo == nullptr) + return; QSqlQuery updateComicInfo(db); updateComicInfo.prepare("UPDATE comic_info SET " From 3babc0980e476ef90dfbf1d29fc25c79e45cc267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gannaz?= Date: Mon, 1 Apr 2019 10:31:11 +0200 Subject: [PATCH 26/45] Library: remove unused variable --- YACReaderLibrary/db_helper.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/YACReaderLibrary/db_helper.cpp b/YACReaderLibrary/db_helper.cpp index 469c3d56..3722bb52 100644 --- a/YACReaderLibrary/db_helper.cpp +++ b/YACReaderLibrary/db_helper.cpp @@ -1335,7 +1335,6 @@ QList