logic: Fixed cli message handling and Mac build

This commit is contained in:
Eberhard Graether
2017-08-10 01:17:26 +02:00
parent 9269468a7b
commit ece2cbfe14
10 changed files with 48 additions and 78 deletions
+9 -8
View File
@@ -260,20 +260,16 @@ void Project::load()
m_storage->buildCaches();
m_storageAccessProxy->setSubject(m_storage.get());
MessageFinishedParsing().dispatch();
if (Application::getInstance()->hasGUI())
{
MessageFinishedParsing().dispatch();
}
MessageStatus("Finished Loading", false, false).dispatch();
}
else
{
MessageStatus("Project not loaded", false, false).dispatch();
}
// refresh always on headless
// since just opening a project in headless does not make sense
if (m_state != PROJECT_STATE_LOADED || !Application::getInstance()->hasGUI())
{
MessageRefresh().dispatch();
}
}
bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
@@ -396,6 +392,11 @@ bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
if (!filesToClean.size() && !filesToIndex.size())
{
if (!Application::getInstance()->hasGUI())
{
MessageFinishedParsing().dispatch();
}
MessageStatus("Nothing to refresh, all files are up-to-date.").dispatch();
return false;
}