mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 15:04:40 -04:00
Fixed YACReaderLibrary compilation under Qt5 (untested at runtime)
TODO fix YACReader compilation under Qt5 update poppler update server
This commit is contained in:
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user