From 4b078a9f153964b2942c4ca8915cee033cdbfa17 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Tue, 24 Feb 2015 19:04:21 +0100 Subject: [PATCH] merge --- YACReader/main_window_viewer.cpp | 1 + YACReader/render.cpp | 6 +++--- YACReaderLibrary/main.cpp | 2 +- common/comic.cpp | 8 +++++--- compressed_archive/compressed_archive.cpp | 22 ++++++++++++++++++++-- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 1d8a350e..032f5384 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -578,6 +578,7 @@ void MainWindowViewer::createToolBars() viewer->addAction(leftRotationAction); viewer->addAction(rightRotationAction); viewer->addAction(doublePageAction); + viewer->addAction(doubleMangaPageAction); YACReader::addSperator(viewer); viewer->addAction(showMagnifyingGlassAction); diff --git a/YACReader/render.cpp b/YACReader/render.cpp index 5f311657..155c1a5a 100644 --- a/YACReader/render.cpp +++ b/YACReader/render.cpp @@ -849,7 +849,7 @@ void Render::nextPage() update(); emit pageChanged(currentIndex); } - else + else if (hasLoadedComic() && (currentIndex == numPages()-1)) { emit isLast(); } @@ -873,7 +873,7 @@ void Render::nextDoublePage() update(); emit pageChanged(currentIndex); } - else + else if (hasLoadedComic() && (currentIndex >= numPages()-2)) { emit isLast(); } @@ -894,7 +894,7 @@ void Render::previousPage() update(); emit pageChanged(currentIndex); } - else + else if (hasLoadedComic() && (currentIndex == 0)) { emit isCover(); } diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index 5f12d0f0..a883151f 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -95,7 +95,7 @@ void logSystemAndConfig() #ifdef Q_OS_WIN if(QLibrary::isLibrary(QApplication::applicationDirPath()+"/utils/7z.dll")) #elif defined Q_OS_UNIX && !defined Q_OS_MAC - if(QLibrary::isLibrary(QString(LIBDIR)+"/p7zip/7z.so")) + if(QLibrary::isLibrary(QString(LIBDIR)+"/yacreader/7z.so") | QLibrary::isLibrary(QString(LIBDIR)+"/p7zip/7z.so")) #else if(QLibrary::isLibrary(QApplication::applicationDirPath()+"/utils/7z.so")) #endif diff --git a/common/comic.cpp b/common/comic.cpp index d4c81305..7939e468 100644 --- a/common/comic.cpp +++ b/common/comic.cpp @@ -730,11 +730,13 @@ void PDFComic::process() _index = _firstPage; emit(openAt(_index)); - for(int i=_index;ithread()); diff --git a/compressed_archive/compressed_archive.cpp b/compressed_archive/compressed_archive.cpp index 77fc9b1e..25bcc2ee 100644 --- a/compressed_archive/compressed_archive.cpp +++ b/compressed_archive/compressed_archive.cpp @@ -2,6 +2,7 @@ #include "extract_delegate.h" #include +#include #include #include @@ -201,7 +202,16 @@ bool CompressedArchive::loadFunctions() #if defined Q_OS_MAC rarLib = new QLibrary(QApplication::applicationDirPath()+"/utils/Codecs/Rar29"); #else - rarLib = new QLibrary(QString(LIBDIR)+"/p7zip/Codecs/Rar29.so"); + //check if a yacreader specific version of p7zip exists on the system + QFileInfo rarCodec(QString(LIBDIR)+"/yacreader/Codecs/Rar29.so"); + if (rarCodec.exists()) + { + rarLib = new QLibrary(rarCodec.absoluteFilePath()); + } + else + { + rarLib = new QLibrary(QString(LIBDIR)+"/p7zip/Codecs/Rar29.so"); + } #endif if(!rarLib->load()) { @@ -211,7 +221,15 @@ bool CompressedArchive::loadFunctions() } #endif #if defined Q_OS_UNIX && !defined Q_OS_MAC - sevenzLib = new QLibrary(QString(LIBDIR)+"/p7zip/7z.so"); + QFileInfo sevenzlibrary(QString(LIBDIR)+"/yacreader/7z.so"); + if (sevenzlibrary.exists()) + { + sevenzLib = new QLibrary(sevenzlibrary.absoluteFilePath()); + } + else + { + sevenzLib = new QLibrary(QString(LIBDIR)+"/p7zip/7z.so"); + } #else sevenzLib = new QLibrary(QApplication::applicationDirPath()+"/utils/7z"); #endif