mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-17 11:21:51 +03:00
Add checkbox to general settings to disable the crash reporter
This commit is contained in:
parent
b8e8d975aa
commit
89aec52503
5 changed files with 29 additions and 1 deletions
|
@ -55,6 +55,7 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
connect(_ui->monoIconsCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings()));
|
connect(_ui->monoIconsCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings()));
|
||||||
|
connect(_ui->crashreporterCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings()));
|
||||||
|
|
||||||
// OEM themes are not obliged to ship mono icons, so there
|
// OEM themes are not obliged to ship mono icons, so there
|
||||||
// is no point in offering an option
|
// is no point in offering an option
|
||||||
|
@ -73,6 +74,7 @@ void GeneralSettings::loadMiscSettings()
|
||||||
MirallConfigFile cfgFile;
|
MirallConfigFile cfgFile;
|
||||||
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
|
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
|
||||||
_ui->desktopNotificationsCheckBox->setChecked(cfgFile.optionalDesktopNotifications());
|
_ui->desktopNotificationsCheckBox->setChecked(cfgFile.optionalDesktopNotifications());
|
||||||
|
_ui->crashreporterCheckBox->setChecked(cfgFile.crashReporter());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettings::slotUpdateInfo()
|
void GeneralSettings::slotUpdateInfo()
|
||||||
|
@ -96,6 +98,7 @@ void GeneralSettings::saveMiscSettings()
|
||||||
bool isChecked = _ui->monoIconsCheckBox->isChecked();
|
bool isChecked = _ui->monoIconsCheckBox->isChecked();
|
||||||
cfgFile.setMonoIcons(isChecked);
|
cfgFile.setMonoIcons(isChecked);
|
||||||
Theme::instance()->setSystrayUseMonoIcons(isChecked);
|
Theme::instance()->setSystrayUseMonoIcons(isChecked);
|
||||||
|
cfgFile.setCrashReporter(_ui->crashreporterCheckBox->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettings::slotToggleLaunchOnStartup(bool enable)
|
void GeneralSettings::slotToggleLaunchOnStartup(bool enable)
|
||||||
|
|
|
@ -41,6 +41,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="crashreporterCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show crash reporter</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "updater/updater.h"
|
#include "updater/updater.h"
|
||||||
|
|
||||||
#ifdef WITH_CRASHREPORTER
|
#ifdef WITH_CRASHREPORTER
|
||||||
|
#include "mirallconfigfile.h"
|
||||||
#include <libcrashreporter-handler/Handler.h>
|
#include <libcrashreporter-handler/Handler.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -58,7 +59,8 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_CRASHREPORTER
|
#ifdef WITH_CRASHREPORTER
|
||||||
new CrashReporter::Handler( QDir::tempPath(), true, "owncloud_crash_reporter" );
|
MirallConfigFile cfgFile;
|
||||||
|
new CrashReporter::Handler( QDir::tempPath(), cfgFile.crashReporter(), "owncloud_crash_reporter" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
|
|
|
@ -44,6 +44,7 @@ static const char caCertsKeyC[] = "CaCertificates";
|
||||||
static const char remotePollIntervalC[] = "remotePollInterval";
|
static const char remotePollIntervalC[] = "remotePollInterval";
|
||||||
static const char forceSyncIntervalC[] = "forceSyncInterval";
|
static const char forceSyncIntervalC[] = "forceSyncInterval";
|
||||||
static const char monoIconsC[] = "monoIcons";
|
static const char monoIconsC[] = "monoIcons";
|
||||||
|
static const char crashReporterC[] = "crashReporter";
|
||||||
static const char optionalDesktopNoficationsC[] = "optionalDesktopNotifications";
|
static const char optionalDesktopNoficationsC[] = "optionalDesktopNotifications";
|
||||||
static const char skipUpdateCheckC[] = "skipUpdateCheck";
|
static const char skipUpdateCheckC[] = "skipUpdateCheck";
|
||||||
static const char geometryC[] = "geometry";
|
static const char geometryC[] = "geometry";
|
||||||
|
@ -539,4 +540,16 @@ void MirallConfigFile::setMonoIcons(bool useMonoIcons)
|
||||||
settings.setValue(QLatin1String(monoIconsC), useMonoIcons);
|
settings.setValue(QLatin1String(monoIconsC), useMonoIcons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MirallConfigFile::crashReporter() const
|
||||||
|
{
|
||||||
|
QSettings settings(configFile(), QSettings::IniFormat);
|
||||||
|
return settings.value(QLatin1String(crashReporterC), true).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MirallConfigFile::setCrashReporter(bool enabled)
|
||||||
|
{
|
||||||
|
QSettings settings(configFile(), QSettings::IniFormat);
|
||||||
|
settings.setValue(QLatin1String(crashReporterC), enabled);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,9 @@ public:
|
||||||
bool monoIcons() const;
|
bool monoIcons() const;
|
||||||
void setMonoIcons(bool);
|
void setMonoIcons(bool);
|
||||||
|
|
||||||
|
bool crashReporter() const;
|
||||||
|
void setCrashReporter(bool enabled);
|
||||||
|
|
||||||
// proxy settings
|
// proxy settings
|
||||||
void setProxyType(int proxyType,
|
void setProxyType(int proxyType,
|
||||||
const QString& host = QString(),
|
const QString& host = QString(),
|
||||||
|
|
Loading…
Reference in a new issue