added setting to restart on SIGSEGV
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "BaseSettings.hpp"
|
||||
#include <pajlada/settings/setting.hpp>
|
||||
#include <pajlada/settings/settinglistener.hpp>
|
||||
|
||||
#include "BaseSettings.hpp"
|
||||
#include "common/Channel.hpp"
|
||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||
#include "singletons/Toasts.hpp"
|
||||
|
||||
#include <pajlada/settings/setting.hpp>
|
||||
#include <pajlada/settings/settinglistener.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class Settings : public ABSettings
|
||||
@@ -213,6 +212,7 @@ public:
|
||||
BoolSetting openLinksIncognito = {"/misc/openLinksIncognito", 0};
|
||||
|
||||
QStringSetting cachePath = {"/cache/path", ""};
|
||||
BoolSetting restartOnCrash = {"/misc/restartOnCrash", true};
|
||||
|
||||
/// Debug
|
||||
BoolSetting showUnhandledIrcMessages = {"/debug/showUnhandledIrcMessages",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
#include "singletons/WindowManager.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDesktopWidget>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QMessageBox>
|
||||
#include <QSaveFile>
|
||||
#include <QScreen>
|
||||
#include <boost/optional.hpp>
|
||||
#include <chrono>
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
@@ -21,18 +32,6 @@
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDesktopWidget>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QMessageBox>
|
||||
#include <QSaveFile>
|
||||
#include <QScreen>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#define SETTINGS_FILENAME "/window-layout.json"
|
||||
|
||||
namespace chatterino {
|
||||
@@ -556,8 +555,7 @@ void WindowManager::encodeNodeRecusively(SplitNode *node, QJsonObject &obj)
|
||||
{
|
||||
switch (node->getType())
|
||||
{
|
||||
case SplitNode::_Split:
|
||||
{
|
||||
case SplitNode::_Split: {
|
||||
obj.insert("type", "split");
|
||||
obj.insert("moderationMode", node->getSplit()->getModerationMode());
|
||||
QJsonObject split;
|
||||
@@ -568,8 +566,7 @@ void WindowManager::encodeNodeRecusively(SplitNode *node, QJsonObject &obj)
|
||||
}
|
||||
break;
|
||||
case SplitNode::HorizontalContainer:
|
||||
case SplitNode::VerticalContainer:
|
||||
{
|
||||
case SplitNode::VerticalContainer: {
|
||||
obj.insert("type", node->getType() == SplitNode::HorizontalContainer
|
||||
? "horizontal"
|
||||
: "vertical");
|
||||
@@ -593,29 +590,24 @@ void WindowManager::encodeChannel(IndirectChannel channel, QJsonObject &obj)
|
||||
|
||||
switch (channel.getType())
|
||||
{
|
||||
case Channel::Type::Twitch:
|
||||
{
|
||||
case Channel::Type::Twitch: {
|
||||
obj.insert("type", "twitch");
|
||||
obj.insert("name", channel.get()->getName());
|
||||
}
|
||||
break;
|
||||
case Channel::Type::TwitchMentions:
|
||||
{
|
||||
case Channel::Type::TwitchMentions: {
|
||||
obj.insert("type", "mentions");
|
||||
}
|
||||
break;
|
||||
case Channel::Type::TwitchWatching:
|
||||
{
|
||||
case Channel::Type::TwitchWatching: {
|
||||
obj.insert("type", "watching");
|
||||
}
|
||||
break;
|
||||
case Channel::Type::TwitchWhispers:
|
||||
{
|
||||
case Channel::Type::TwitchWhispers: {
|
||||
obj.insert("type", "whispers");
|
||||
}
|
||||
break;
|
||||
case Channel::Type::Irc:
|
||||
{
|
||||
case Channel::Type::Irc: {
|
||||
if (auto ircChannel =
|
||||
dynamic_cast<IrcChannel *>(channel.get().get()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user