Fixed YACReaderLibrary compilation under Qt5 (untested at runtime)

TODO fix YACReader compilation under Qt5
     update poppler
     update server
This commit is contained in:
Luis Ángel San Martín
2013-10-08 23:00:16 +02:00
parent 6a6c902803
commit d5a35de96c
11 changed files with 53 additions and 17 deletions

View File

@ -112,7 +112,7 @@ void HttpResponse::write(QByteArray data, bool lastPart) {
void HttpResponse::writeText(QString text, bool lastPart)
{
write(text.toAscii(),lastPart);
write(text.toLatin1(),lastPart);
}
bool HttpResponse::hasSentLastPart() const {

View File

@ -13,7 +13,7 @@ HttpSession::HttpSession(bool canStore) {
dataPtr=new HttpSessionData();
dataPtr->refCount=1;
dataPtr->lastAccess=QDateTime::currentMSecsSinceEpoch();
dataPtr->id=QUuid::createUuid().toString().toAscii();
dataPtr->id=QUuid::createUuid().toString().toLatin1();
dataPtr->yacreaderSessionData.comic = 0;
dataPtr->yacreaderSessionData.comicId = 0;
#ifdef SUPERVERBOSE
@ -306,4 +306,4 @@ int HttpSession::topPage()
if(dataPtr)
return dataPtr->yacreaderSessionData.navigationPath.top();
return 0;
}
}

View File

@ -9,6 +9,7 @@
#include <QMutex>
#include <QDateTime>
#include <QThread>
#include <QtGlobal>
Logger* Logger::defaultLogger=0;
@ -72,7 +73,12 @@ void Logger::msgHandler(const QtMsgType type, const char* message) {
Logger::~Logger() {
if (defaultLogger==this) {
qInstallMsgHandler(0);
#if QT_VERSION >= 0x050100
qInstallMessageHandler(0);
#else
qInstallMsgHandler(0);
#endif
defaultLogger=0;
}
}
@ -86,7 +92,11 @@ void Logger::write(const LogMessage* logMessage) {
void Logger::installMsgHandler() {
defaultLogger=this;
qInstallMsgHandler(msgHandler);
#if QT_VERSION >= 0x050100
//qInstallMessageHandler(msgHandler); TODO Qt5
#else
qInstallMsgHandler(msgHandler);
#endif
}

View File

@ -30,7 +30,7 @@ TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
textCodec=QTextCodec::codecForLocale();
}
else {
textCodec=QTextCodec::codecForName(encoding.toAscii());
textCodec=QTextCodec::codecForName(encoding.toLatin1());
}
qDebug("TemplateLoader: path=%s, codec=%s",qPrintable(templatePath),textCodec->name().data());
}