From 2b4c9722195d09713a8a66fc545573398e489006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 13 Dec 2015 18:45:48 +0100 Subject: [PATCH] don't use QPixmap if it is not necessary, so QCoreApplication can be used instead of QGuiApplication --- YACReaderLibrary/library_creator.cpp | 2 +- YACReaderLibrary/library_creator.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/YACReaderLibrary/library_creator.cpp b/YACReaderLibrary/library_creator.cpp index ec12222a..9ff6c47b 100644 --- a/YACReaderLibrary/library_creator.cpp +++ b/YACReaderLibrary/library_creator.cpp @@ -636,7 +636,7 @@ void ThumbnailCreator::create() #else QImage p = pdfComic->page(_coverPage-1)->renderToImage(72,72); #endif - _cover = QPixmap::fromImage(p); + _cover = p; if(_target!="") { QImage scaled; diff --git a/YACReaderLibrary/library_creator.h b/YACReaderLibrary/library_creator.h index 83c06164..ed37fdab 100644 --- a/YACReaderLibrary/library_creator.h +++ b/YACReaderLibrary/library_creator.h @@ -78,14 +78,14 @@ QString _target; QString _currentName; int _numPages; - QPixmap _cover; + QImage _cover; int _coverPage; static bool crash; public slots: void create(); - int getNumPages(){return _numPages;}; - QPixmap getCover(){return _cover;}; + int getNumPages(){return _numPages;} + QPixmap getCover(){return QPixmap::fromImage(_cover);} signals: void openingError(QProcess::ProcessError error);