mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -04:00
fixed compilation of YACReaderLibrary and YACReaderLibraryServer, removing all the dependecies on QtWidgets from non gui code
This commit is contained in:
@ -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);
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user