Fix settings init in all exe

This commit is contained in:
Atlante45 2018-01-26 15:53:08 -08:00
parent 78a5f535c1
commit 314c51ab3b
9 changed files with 14 additions and 12 deletions

View file

@ -157,7 +157,6 @@ DomainServer::DomainServer(int argc, char* argv[]) :
DependencyManager::set<StatTracker>();
LogUtils::init();
Setting::init();
qDebug() << "Setting up domain-server";
qDebug() << "[VERSION] Build sequence:" << qPrintable(applicationVersion());

View file

@ -29,6 +29,8 @@ int main(int argc, char* argv[]) {
QCoreApplication::setOrganizationDomain(BuildInfo::ORGANIZATION_DOMAIN);
QCoreApplication::setApplicationVersion(BuildInfo::VERSION);
Setting::init();
#ifndef WIN32
setvbuf(stdout, NULL, _IOLBF, 0);
#endif

View file

@ -33,8 +33,6 @@ private:
Qt59TestApp::Qt59TestApp(int argc, char* argv[]) :
QCoreApplication(argc, argv)
{
Setting::init();
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
DependencyManager::set<AccountManager>([&] { return QString("Mozilla/5.0 (HighFidelityACClient)"); });
DependencyManager::set<AddressManager>();

View file

@ -97,7 +97,6 @@ ACClientApp::ACClientApp(int argc, char* argv[]) :
_password = pieces[1];
}
Setting::init();
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
DependencyManager::set<AccountManager>([&]{ return QString("Mozilla/5.0 (HighFidelityACClient)"); });

View file

@ -25,6 +25,8 @@ int main(int argc, char * argv[]) {
QCoreApplication::setOrganizationDomain(BuildInfo::ORGANIZATION_DOMAIN);
QCoreApplication::setApplicationVersion(BuildInfo::VERSION);
Setting::init();
ACClientApp app(argc, argv);
return app.exec();

View file

@ -135,7 +135,6 @@ ATPClientApp::ATPClientApp(int argc, char* argv[]) :
_domainServerAddress = domainURL.toString();
}
Setting::init();
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
DependencyManager::set<StatTracker>();

View file

@ -25,6 +25,8 @@ int main(int argc, char * argv[]) {
QCoreApplication::setOrganizationDomain(BuildInfo::ORGANIZATION_DOMAIN);
QCoreApplication::setApplicationVersion(BuildInfo::VERSION);
Setting::init();
ATPClientApp app(argc, argv);
return app.exec();

View file

@ -14,7 +14,6 @@
#include <QtCore/QCommandLineParser>
#include <image/Image.h>
#include <SettingInterface.h>
#include "ui/OvenMainWindow.h"
#include "Oven.h"
@ -29,12 +28,6 @@ static const QString CLI_TYPE_PARAMETER = "t";
Oven::Oven(int argc, char* argv[]) :
QApplication(argc, argv)
{
QCoreApplication::setOrganizationName("High Fidelity");
QCoreApplication::setApplicationName("Oven");
// init the settings interface so we can save and load settings
Setting::init();
// parse the command line parameters
QCommandLineParser parser;

View file

@ -10,7 +10,15 @@
#include "Oven.h"
#include <SettingInterface.h>
int main (int argc, char** argv) {
QCoreApplication::setOrganizationName("High Fidelity");
QCoreApplication::setApplicationName("Oven");
// init the settings interface so we can save and load settings
Setting::init();
Oven app(argc, argv);
return app.exec();
}