Skip to content

Commit 62bd672

Browse files
committed
Fix crash handler flag
1 parent 34b8bb2 commit 62bd672

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/interface/fragment/FirstLaunchWizard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ FirstLaunchWizard::FirstLaunchWizard(QWidget *parent) :
3535
ui->stackedWidget->slideInIdx(1);
3636
});
3737
connect(ui->p3_next, &QPushButton::clicked, this, [&] {
38-
#ifdef ENABLE_CRASH_HANDLER
38+
#ifndef NO_CRASH_HANDLER
3939
ui->stackedWidget->slideInIdx(2);
4040
#else
4141
ui->stackedWidget->slideInIdx(3);

src/interface/fragment/SettingsFragment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ SettingsFragment::SettingsFragment(TrayIcon *trayIcon,
143143
}
144144
#endif
145145

146-
#ifndef ENABLE_CRASH_HANDLER
146+
#ifdef NO_CRASH_HANDLER
147147
ui->crashShareGroup->setVisible(false);
148148
#endif
149149
}

src/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <QTextStream>
1313
#include <QSessionManager>
1414

15-
#ifdef ENABLE_CRASH_HANDLER
15+
#ifndef NO_CRASH_HANDLER
1616
#include "crash/airbag.h"
1717
#include "crash/stacktrace.h"
1818
#include <sys/stat.h>
@@ -51,7 +51,8 @@ int main(int argc,
5151
char exepath[PATH_MAX];
5252
find_yourself(exepath, sizeof(exepath));
5353

54-
#ifdef ENABLE_CRASH_HANDLER
54+
mkdir("/tmp/jamesdsp/", S_IRWXU);
55+
#ifndef NO_CRASH_HANDLER
5556
QFile crashDmp(STACKTRACE_LOG);
5657

5758
bool lastSessionCrashed = false;
@@ -70,7 +71,6 @@ int main(int argc,
7071
}
7172

7273
EXECUTION_FILENAME = exepath;
73-
mkdir("/tmp/jamesdsp/", S_IRWXU);
7474
int fd = safe_open_wo_fd("/tmp/jamesdsp/crash.dmp");
7575
airbag_init_fd(fd, onExceptionRaised, EXECUTION_FILENAME);
7676
#endif
@@ -91,7 +91,7 @@ int main(int argc,
9191
parser.addOption(spinlck);
9292
parser.process(app);
9393

94-
#ifdef ENABLE_CRASH_HANDLER
94+
#ifndef NO_CRASH_HANDLER
9595
SPIN_ON_CRASH = parser.isSet(spinlck);
9696
#endif
9797

@@ -131,7 +131,7 @@ int main(int argc,
131131
return 0;
132132
}
133133

134-
#ifdef ENABLE_CRASH_HANDLER
134+
#ifndef NO_CRASH_HANDLER
135135
if(lastSessionCrashed)
136136
{
137137
Log::information("Last session crashed unexpectedly. A crash report has been saved here: " + QString(STACKTRACE_LOG_OLD));

0 commit comments

Comments
 (0)