diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index ddb1f3840..16ac512f7 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -55,6 +55,7 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
// misc
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
// is no point in offering an option
@@ -73,6 +74,7 @@ void GeneralSettings::loadMiscSettings()
MirallConfigFile cfgFile;
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
_ui->desktopNotificationsCheckBox->setChecked(cfgFile.optionalDesktopNotifications());
+ _ui->crashreporterCheckBox->setChecked(cfgFile.crashReporter());
}
void GeneralSettings::slotUpdateInfo()
@@ -96,6 +98,7 @@ void GeneralSettings::saveMiscSettings()
bool isChecked = _ui->monoIconsCheckBox->isChecked();
cfgFile.setMonoIcons(isChecked);
Theme::instance()->setSystrayUseMonoIcons(isChecked);
+ cfgFile.setCrashReporter(_ui->crashreporterCheckBox->isChecked());
}
void GeneralSettings::slotToggleLaunchOnStartup(bool enable)
diff --git a/src/gui/generalsettings.ui b/src/gui/generalsettings.ui
index 1ae6761bd..1490f2a66 100644
--- a/src/gui/generalsettings.ui
+++ b/src/gui/generalsettings.ui
@@ -41,6 +41,13 @@
+ -
+
+
+ Show crash reporter
+
+
+
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 5c8d00c07..618d274da 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -29,6 +29,7 @@
#include "updater/updater.h"
#ifdef WITH_CRASHREPORTER
+ #include "mirallconfigfile.h"
#include
#endif
@@ -58,7 +59,8 @@ int main(int argc, char **argv)
#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
#ifndef Q_OS_WIN
diff --git a/src/libsync/mirallconfigfile.cpp b/src/libsync/mirallconfigfile.cpp
index ac5d5e508..534ec63cf 100644
--- a/src/libsync/mirallconfigfile.cpp
+++ b/src/libsync/mirallconfigfile.cpp
@@ -44,6 +44,7 @@ static const char caCertsKeyC[] = "CaCertificates";
static const char remotePollIntervalC[] = "remotePollInterval";
static const char forceSyncIntervalC[] = "forceSyncInterval";
static const char monoIconsC[] = "monoIcons";
+static const char crashReporterC[] = "crashReporter";
static const char optionalDesktopNoficationsC[] = "optionalDesktopNotifications";
static const char skipUpdateCheckC[] = "skipUpdateCheck";
static const char geometryC[] = "geometry";
@@ -539,4 +540,16 @@ void MirallConfigFile::setMonoIcons(bool 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);
+}
+
}
diff --git a/src/libsync/mirallconfigfile.h b/src/libsync/mirallconfigfile.h
index 8b7423fc8..7cee6b0a7 100644
--- a/src/libsync/mirallconfigfile.h
+++ b/src/libsync/mirallconfigfile.h
@@ -67,6 +67,9 @@ public:
bool monoIcons() const;
void setMonoIcons(bool);
+ bool crashReporter() const;
+ void setCrashReporter(bool enabled);
+
// proxy settings
void setProxyType(int proxyType,
const QString& host = QString(),