mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Merge pull request #4179 from Atlante45/move_setup_essentials
Move setApplication/Organisation to setupEssentials
This commit is contained in:
commit
346381efc9
1 changed files with 18 additions and 22 deletions
|
@ -153,6 +153,16 @@ bool setupEssentials(int& argc, char** argv) {
|
||||||
listenPort = atoi(portStr);
|
listenPort = atoi(portStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||||
|
QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||||
|
QSettings applicationInfo(PathUtils::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
||||||
|
// set the associated application properties
|
||||||
|
applicationInfo.beginGroup("INFO");
|
||||||
|
QApplication::setApplicationName(applicationInfo.value("name").toString());
|
||||||
|
QApplication::setApplicationVersion(BUILD_VERSION);
|
||||||
|
QApplication::setOrganizationName(applicationInfo.value("organizationName").toString());
|
||||||
|
QApplication::setOrganizationDomain(applicationInfo.value("organizationDomain").toString());
|
||||||
|
|
||||||
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
||||||
|
|
||||||
// Set dependencies
|
// Set dependencies
|
||||||
|
@ -223,35 +233,21 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_isVSyncOn(true),
|
_isVSyncOn(true),
|
||||||
_aboutToQuit(false)
|
_aboutToQuit(false)
|
||||||
{
|
{
|
||||||
auto glCanvas = DependencyManager::get<GLCanvas>();
|
_logger = new FileLogger(this); // After setting organization name in order to get correct directory
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
qInstallMessageHandler(messageHandler);
|
||||||
|
|
||||||
|
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
||||||
|
_window->setWindowTitle("Interface");
|
||||||
|
|
||||||
Model::setAbstractViewStateInterface(this); // The model class will sometimes need to know view state details from us
|
Model::setAbstractViewStateInterface(this); // The model class will sometimes need to know view state details from us
|
||||||
|
|
||||||
|
auto glCanvas = DependencyManager::get<GLCanvas>();
|
||||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
QSettings applicationInfo(PathUtils::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
|
||||||
|
|
||||||
// set the associated application properties
|
|
||||||
applicationInfo.beginGroup("INFO");
|
|
||||||
|
|
||||||
setApplicationName(applicationInfo.value("name").toString());
|
|
||||||
setApplicationVersion(BUILD_VERSION);
|
|
||||||
setOrganizationName(applicationInfo.value("organizationName").toString());
|
|
||||||
setOrganizationDomain(applicationInfo.value("organizationDomain").toString());
|
|
||||||
|
|
||||||
_logger = new FileLogger(this); // After setting organization name in order to get correct directory
|
|
||||||
|
|
||||||
QSettings::setDefaultFormat(QSettings::IniFormat);
|
|
||||||
|
|
||||||
_myAvatar = _avatarManager.getMyAvatar();
|
_myAvatar = _avatarManager.getMyAvatar();
|
||||||
|
|
||||||
_applicationStartupTime = startup_time;
|
_applicationStartupTime = startup_time;
|
||||||
|
|
||||||
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
|
||||||
_window->setWindowTitle("Interface");
|
|
||||||
|
|
||||||
qInstallMessageHandler(messageHandler);
|
|
||||||
|
|
||||||
qDebug() << "[VERSION] Build sequence: " << qPrintable(applicationVersion());
|
qDebug() << "[VERSION] Build sequence: " << qPrintable(applicationVersion());
|
||||||
|
|
||||||
_bookmarks = new Bookmarks(); // Before setting up the menu
|
_bookmarks = new Bookmarks(); // Before setting up the menu
|
||||||
|
|
Loading…
Reference in a new issue