src: revert git auto merge fail
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "includes.h" // defines 'void setup(int argc, char *argv[])'
|
||||
|
||||
#include <csignal>
|
||||
|
||||
#include "Application.h"
|
||||
#include "data/indexer/IndexerFactory.h"
|
||||
#include "data/indexer/IndexerFactoryModuleJava.h"
|
||||
@@ -34,6 +36,12 @@
|
||||
#include "utility/Version.h"
|
||||
#include "version.h"
|
||||
|
||||
void signalHandler(int signum)
|
||||
{
|
||||
std::cout << "interrupt running tasks" << std::endl;
|
||||
MessageInterruptTasks().dispatch();
|
||||
}
|
||||
|
||||
void setupLogging()
|
||||
{
|
||||
LogManager* logManager = LogManager::getInstance().get();
|
||||
@@ -261,6 +269,24 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
MessageEnteredLicense(checker->getCurrentLicenseType()).dispatch();
|
||||
}
|
||||
#ifdef _WIN32
|
||||
signal(SIGINT, signalHandler);
|
||||
signal(SIGTERM, signalHandler);
|
||||
signal(SIGABRT, signalHandler);
|
||||
#else
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = signalHandler;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
if (sigaction(SIGINT, &sa, NULL))
|
||||
{
|
||||
std::cout << "Cant install SIGINT handler" << std::endl;
|
||||
}
|
||||
if (sigaction(SIGHUP, &sa, NULL))
|
||||
{
|
||||
std::cout << "Cant install SIGHUP handler" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (commandLineParser.hasError() )
|
||||
|
||||
+10
-1
@@ -277,7 +277,7 @@ void Application::handleMessage(MessageLoadProject* message)
|
||||
|
||||
if (m_project && projectSettingsFilePath == m_project->getProjectSettingsFilePath())
|
||||
{
|
||||
if (message->forceRefresh)
|
||||
if (message->forceRefresh && m_hasGUI)
|
||||
{
|
||||
m_project->setStateSettingsUpdated();
|
||||
refreshProject(false);
|
||||
@@ -285,6 +285,15 @@ void Application::handleMessage(MessageLoadProject* message)
|
||||
return;
|
||||
}
|
||||
createAndLoadProject(projectSettingsFilePath);
|
||||
|
||||
if (message->forceRefresh)
|
||||
{
|
||||
refreshProject(true);
|
||||
}
|
||||
else if (!m_hasGUI)
|
||||
{
|
||||
refreshProject(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Application::handleMessage(MessageRefresh* message)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "component/view/DialogView.h"
|
||||
#include "data/storage/PersistentStorage.h"
|
||||
#include "utility/messaging/type/MessageFinishedParsing.h"
|
||||
#include "utility/messaging/type/MessageStatus.h"
|
||||
#include "utility/messaging/type/MessageQuitApplication.h"
|
||||
#include "utility/messaging/type/MessageStatus.h"
|
||||
#include "utility/scheduling/Blackboard.h"
|
||||
|
||||
Reference in New Issue
Block a user