src: added StartupProject setting to ApplicationSettings

This commit is contained in:
Eberhard Graether
2015-03-17 14:45:49 +01:00
parent ba48731c8c
commit c4ca420677
5 changed files with 22 additions and 4 deletions
+11 -2
View File
@@ -12,7 +12,8 @@
std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
{
ApplicationSettings::getInstance()->load("data/ApplicationSettings.xml");
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
settings->load("data/ApplicationSettings.xml");
std::shared_ptr<Application> ptr(new Application());
@@ -26,7 +27,15 @@ std::shared_ptr<Application> Application::create(ViewFactory* viewFactory)
ptr->m_componentManager->setup(ptr->m_mainView.get());
ptr->m_mainView->loadLayout();
MessageLoadProject("data/ProjectSettings.xml").dispatch();
std::string startupProjectFilePath = settings->getStartupProjectFilePath();
if (startupProjectFilePath.size())
{
MessageLoadProject(startupProjectFilePath).dispatch();
}
else
{
LOG_WARNING("No StartupProject defined in ApplicationSettings");
}
return ptr;
}