Merged luisangelsm/yacreader/headless_server into headless_server

This commit is contained in:
Felix Kauselmann
2015-12-12 18:50:34 +01:00
parent 4a0885fa12
commit 6b5e4c5ec8
36 changed files with 656 additions and 291 deletions

View File

@ -9,7 +9,7 @@
#include <QDateTime>
#include "httpsession.h"
#include "static.h"
#include <QApplication>
#include <QCoreApplication>
StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
@ -29,8 +29,8 @@ StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
QFileInfo configFile(QString(DATADIR)+"/yacreader");
docroot=QFileInfo(QString(DATADIR)+"/yacreader",docroot).absoluteFilePath();
#else
QFileInfo configFile(QApplication::applicationDirPath());
docroot=QFileInfo(QApplication::applicationDirPath(),docroot).absoluteFilePath();
QFileInfo configFile(QCoreApplication::applicationDirPath());
docroot=QFileInfo(QCoreApplication::applicationDirPath(),docroot).absoluteFilePath();
#endif
}
qDebug("StaticFileController: docroot=%s, encoding=%s, maxAge=%i",qPrintable(docroot),qPrintable(encoding),maxAge);

View File

@ -9,7 +9,7 @@
#include <QStringList>
#include <QDir>
#include <QSet>
#include <QApplication>
#include <QCoreApplication>
TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
: QObject(parent)
@ -26,8 +26,8 @@ TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
QFileInfo configFile(QString(DATADIR)+"/yacreader");
templatePath=QFileInfo(QString(DATADIR)+"/yacreader",templatePath).absoluteFilePath();
#else
QFileInfo configFile(QApplication::applicationDirPath());
templatePath=QFileInfo(QApplication::applicationDirPath(),templatePath).absoluteFilePath();
QFileInfo configFile(QCoreApplication::applicationDirPath());
templatePath=QFileInfo(QCoreApplication::applicationDirPath(),templatePath).absoluteFilePath();
#endif
}
fileNameSuffix=settings->value("suffix",".tpl").toString();