cleaning headless main file

This commit is contained in:
Luis Ángel San Martín 2015-12-12 13:36:49 +01:00
parent 1003fa0b26
commit 6c93c1e3c9

View File

@ -1,13 +1,4 @@
#include <QCoreApplication>
#include <QTranslator>
#include <QSettings>
#include <QLocale>
#include <QDir>
#include <QSysInfo>
#include <QFileInfo>
#include <QSettings>
#include <QLibrary>
#include <QTextStream>
#include <QtCore>
#include "yacreader_global.h"
#include "startup.h"
@ -19,9 +10,6 @@
#include "QsLog.h"
#include "QsLogDest.h"
//interfaz al servidor
Startup * s;
using namespace QsLogging;
void logSystemAndConfig()
@ -97,7 +85,7 @@ void logSystemAndConfig()
else
QLOG_ERROR() << "7z : not found";
/*
/* TODO: qrencode could be helpfull for showing a qr code in the web client for client devices
#if defined Q_OS_UNIX && !defined Q_OS_MAC
if(QFileInfo(QString(BINDIR)+"/qrencode").exists())
#else
@ -122,23 +110,13 @@ QCoreApplication* createApplication(int &argc, char *argv[])
int main( int argc, char ** argv )
{
//fix for misplaced text in Qt4.8 and Mavericks
#ifdef Q_OS_MAC
#if QT_VERSION < 0x050000
if(QSysInfo::MacintoshVersion > QSysInfo::MV_10_8)
QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
#endif
#endif
QScopedPointer<QCoreApplication> app(createApplication(argc, argv));
//QApplication app( argc, argv );
app->setApplicationName("YACReaderLibraryServer");
app->setOrganizationName("YACReader");
//simple command line parser
//will be replaced by QCommandLineParser in the future
//TODO: --headless, --server=[on|off], support for file and directory arguments
//simple command line parser
//will be replaced by QCommandLineParser in the future
//TODO: support for file and directory arguments
if (argc > 1)
{
QTextStream parser(stdout);
@ -199,7 +177,8 @@ int main( int argc, char ** argv )
QSettings * settings = new QSettings(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creaci�n del fichero de config con el servidor
settings->beginGroup("libraryConfig");
s = new Startup();
//server
Startup *s = new Startup();
s->start();
QLOG_INFO() << "YACReaderLibraryServer attempting to start";