diff --git a/YACReader/YACReader.pri b/YACReader/YACReader.pri index 3fdf852a..578fe087 100644 --- a/YACReader/YACReader.pri +++ b/YACReader/YACReader.pri @@ -29,9 +29,15 @@ LIBS += -lGLU macx{ #INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include" +isEqual(QT_MAJOR_VERSION, 5) { +INCLUDEPATH += /usr/local/include/poppler/qt5 +LIBS += -L/usr/local/lib -lpoppler-qt5 +} +else { INCLUDEPATH += /usr/local/include/poppler/qt4 LIBS += -L/usr/local/lib -lpoppler-qt4 } +} QT += network opengl #CONFIG += release diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index 8ffd4d1c..fd94b0e8 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -41,10 +41,17 @@ LIBS += -lGLU macx{ #INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include" +isEqual(QT_MAJOR_VERSION, 5) { +INCLUDEPATH += /usr/local/include/poppler/qt5 +LIBS += -L/usr/local/lib -lpoppler-qt5 +} +else { INCLUDEPATH += /usr/local/include/poppler/qt4 LIBS += -L/usr/local/lib -lpoppler-qt4 } +} + #CONFIG += release CONFIG -= flat QT += sql network opengl script diff --git a/YACReaderLibrary/library_creator.cpp b/YACReaderLibrary/library_creator.cpp index e5630455..66486cb0 100644 --- a/YACReaderLibrary/library_creator.cpp +++ b/YACReaderLibrary/library_creator.cpp @@ -210,7 +210,7 @@ void LibraryCreator::insertComic(const QString & relativePath,const QFileInfo & //hash Sha1 del primer 0.5MB + filesize QString hash = QString(crypto.result().toHex().constData()) + QString::number(fileInfo.size()); ComicDB comic = DBHelper::loadComic(_currentPathFolders.last().id,fileInfo.fileName(),relativePath,hash,_database); - int numPages; + int numPages = 0; if(! ( comic.hasCover() && checkCover(hash))) { diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 722c1fb1..9e9f691b 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -1036,7 +1036,7 @@ void LibraryWindow::openComic() // %1 %2 %3 NO-->%4 %5 %6 %7 %8 %9 %10 //Invoke YACReader comicPath comicId libraryId NO-->currentPage bookmark1 bookmark2 bookmark3 brightness contrast gamma #ifdef Q_OS_MAC - QProcess::startDetached("open", QStringList() << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path << comicId << libraryId /*<< page << bookmark1 << bookmark2 << bookmark3 << brightness << contrast << gamma*/);//,QStringList() << path); + QProcess::startDetached("open", QStringList());// << "-n" << QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app") << "--args" << path << QString("%1").arg(comicId) << QString("%1").arg(libraryId)); /*<< page << bookmark1 << bookmark2 << bookmark3 << brightness << contrast << gamma*/);//,QStringList() << path); #else /* \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\" \"%10\" */ QProcess::startDetached(QDir::cleanPath(QCoreApplication::applicationDirPath())+QString("/YACReader \"%1\" \"%2\" \"%3\"").arg(path).arg(comicId).arg(libraryId)/*.arg(page).arg(bookmark1).arg(bookmark2).arg(bookmark3).arg(brightness).arg(contrast).arg(gamma)*/,QStringList()); diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index 6aa42399..96c46a1b 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -61,11 +61,7 @@ void logSystemAndConfig() #elif defined(Q_OS_MAC) - QSysInfo::MV_LION - QSysInfo::MV_MOUNTAINLION - QSysInfo::MV_MAVERICKS - - switch (QSysInfo::macVersion()) + switch (QSysInfo::MacVersion()) { case QSysInfo::MV_SNOWLEOPARD: QLOG_INFO() << "SO : MacOSX Snow Leopard"; @@ -76,9 +72,11 @@ void logSystemAndConfig() case QSysInfo::MV_MOUNTAINLION: QLOG_INFO() << "SO : MacOSX Mountain Lion"; break; +#if QT_VERSION >= 0x050000 case QSysInfo::MV_MAVERICKS: QLOG_INFO() << "SO : MacOSX Maverics"; break; +#endif default: QLOG_INFO() << "SO : MacOSX (unknown version)"; break; diff --git a/YACReaderLibrary/server/lib/bfHttpServer/httpconnectionhandler.cpp b/YACReaderLibrary/server/lib/bfHttpServer/httpconnectionhandler.cpp index 3ed0956c..c085937d 100644 --- a/YACReaderLibrary/server/lib/bfHttpServer/httpconnectionhandler.cpp +++ b/YACReaderLibrary/server/lib/bfHttpServer/httpconnectionhandler.cpp @@ -52,7 +52,7 @@ void HttpConnectionHandler::run() { } -void HttpConnectionHandler::handleConnection(int socketDescriptor) { +void HttpConnectionHandler::handleConnection(tSocketDescriptor socketDescriptor) { qDebug("HttpConnectionHandler (%p): handle new connection", this); busy = true; Q_ASSERT(socket.isOpen()==false); // if not, then the handler is already busy diff --git a/YACReaderLibrary/server/lib/bfLogging/logmessage.cpp b/YACReaderLibrary/server/lib/bfLogging/logmessage.cpp index c1632e05..4d610383 100644 --- a/YACReaderLibrary/server/lib/bfLogging/logmessage.cpp +++ b/YACReaderLibrary/server/lib/bfLogging/logmessage.cpp @@ -56,7 +56,7 @@ QString LogMessage::toString(const QString& msgFormat, const QString& timestampF decorated.replace("{line}",QString::number(line)); QString threadId; - threadId.setNum((unsigned int)QThread::currentThreadId()); // change to (qint64) for 64bit Mac OS + threadId.setNum((quint64)QThread::currentThreadId()); // change to (qint64) for 64bit Mac OS decorated.replace("{thread}",threadId); // Fill in variables