mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed compilation in MacOSX Mavericks (Qt4 and Qt5)
This commit is contained in:
parent
7392e55597
commit
5a5c118b83
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)))
|
||||
{
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user