fixed compilation of YACReaderLibrary and YACReaderLibraryServer, removing all the dependecies on QtWidgets from non gui code

This commit is contained in:
Luis Ángel San Martín
2015-12-12 12:10:37 +01:00
parent c1e14aea1f
commit e1de588e40
24 changed files with 48 additions and 68 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();