Commit cca9a321 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Adding support for WITH_CRASHHANDLER_GUI

parent 015c41d1
......@@ -45,6 +45,7 @@ ENDIF(WIN32)
#SET (WITH_LIBVLC FALSE CACHE BOOL "Compile LibVLC in VLMC")
SET(WITH_CRASHBUTTON FALSE CACHE BOOL "Enable the crash button")
SET(WITH_CRASHHANDLER_GUI TRUE CACHE BOOL "Enable the crash handler GUI")
FIND_PACKAGE(LIBVLC)
IF (NOT LIBVLC_FOUND)
......
......@@ -4,6 +4,9 @@
/* With crash handler */
#cmakedefine WITH_CRASHBUTTON
/* With crash handler GUI */
#cmakedefine WITH_CRASHHANDLER_GUI
/* Absolute path to plugins */
#cmakedefine VLMC_EFFECTS_DIR "@VLMC_EFFECTS_DIR@"
......
......@@ -69,7 +69,6 @@ SET(VLMC_SRCS
Gui/timeline/TracksRuler.cpp
Gui/timeline/TracksScene.cpp
Gui/timeline/TracksView.cpp
Gui/widgets/CrashHandler.cpp
Gui/widgets/TrackControls.cpp
Gui/wizard/CustomWizardPage.cpp
Gui/wizard/GeneralPage.cpp
......@@ -157,7 +156,6 @@ SET (VLMC_HDRS
Gui/timeline/TracksScene.h
Gui/timeline/TracksView.h
Gui/UndoStack.h
Gui/widgets/CrashHandler.h
Gui/widgets/TrackControls.h
Gui/wizard/CustomWizardPage.h
Gui/wizard/GeneralPage.h
......@@ -207,7 +205,6 @@ SET(VLMC_UIS
Gui/ui/Timeline.ui
Gui/ui/transcode.ui
Gui/ui/WorkflowFileRendererDialog.ui
Gui/widgets/CrashHandler.ui
Gui/widgets/TrackControls.ui
Gui/wizard/ui/GeneralPage.ui
Gui/wizard/ui/OpenPage.ui
......@@ -220,6 +217,12 @@ SET(VLMC_RCC
../ts/ressources-ts.qrc
)
IF (WITH_CRASHHANDLER_GUI)
LIST( APPEND VLMC_SRC Gui/widgets/CrashHandler.cpp )
LIST( APPEND VLMC_HDRS Gui/widgets/CrashHandler.h )
LIST( APPEND VLMC_UIS Gui/widgets/CrashHandler.ui )
ENDIF(WITH_CRASHHANDLER_GUI)
#include paths for vlmc
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
......
......@@ -20,29 +20,36 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <QtDebug>
#include "config.h"
#ifdef WITH_CRASHHANDLER_GUI
#include "CrashHandler.h"
#endif
#include "Library.h"
#include "MainWorkflow.h"
#include "ProjectManager.h"
#include "SettingsManager.h"
#include <QFileDialog>
#include <QSettings>
#include <QMessageBox>
#include <QSettings>
#include <QtDebug>
#include <QTimer>
#include <errno.h>
#include <signal.h>
#include "ProjectManager.h"
#include "Library.h"
#include "MainWorkflow.h"
#include "SettingsManager.h"
#include "CrashHandler.h"
void ProjectManager::signalHandler( int sig )
{
signal( sig, SIG_DFL );
ProjectManager::getInstance()->emergencyBackup();
#ifdef WITH_CRASHHANDLER_GUI
CrashHandler* ch = new CrashHandler( sig );
::exit( ch->exec() );
#else
::exit( 1 );
#endif
}
const QString ProjectManager::unNamedProject = tr( "<Unnamed project>" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment