diff --git a/Telegram/SourceFiles/core/crash_reports.cpp b/Telegram/SourceFiles/core/crash_reports.cpp index 8f4e865257..0cf4df22d3 100644 --- a/Telegram/SourceFiles/core/crash_reports.cpp +++ b/Telegram/SourceFiles/core/crash_reports.cpp @@ -514,6 +514,8 @@ void SetAnnotationRef(const std::string &key, const QString *valuePtr) { } } +#ifndef TDESKTOP_DISABLE_CRASH_REPORTS + dump::~dump() { if (ReportFile) { fflush(ReportFile); @@ -573,4 +575,6 @@ const dump &operator<<(const dump &stream, double num) { return stream; } +#endif // TDESKTOP_DISABLE_CRASH_REPORTS + } // namespace CrashReports diff --git a/Telegram/SourceFiles/core/crash_reports.h b/Telegram/SourceFiles/core/crash_reports.h index 392ca0a2f6..d7b14d5336 100644 --- a/Telegram/SourceFiles/core/crash_reports.h +++ b/Telegram/SourceFiles/core/crash_reports.h @@ -22,6 +22,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org namespace CrashReports { +#ifndef TDESKTOP_DISABLE_CRASH_REPORTS + struct dump { ~dump(); }; @@ -33,6 +35,8 @@ const dump &operator<<(const dump &stream, unsigned long num); const dump &operator<<(const dump &stream, unsigned long long num); const dump &operator<<(const dump &stream, double num); +#endif // TDESKTOP_DISABLE_CRASH_REPORTS + enum Status { CantOpen, LastCrashed, diff --git a/Telegram/SourceFiles/platform/mac/specific_mac.mm b/Telegram/SourceFiles/platform/mac/specific_mac.mm index 2c56c393c8..a3f98f8303 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac.mm @@ -90,8 +90,10 @@ QAbstractNativeEventFilter *psNativeEventFilter() { } void psWriteDump() { +#ifndef TDESKTOP_DISABLE_CRASH_REPORTS double v = objc_appkitVersion(); CrashReports::dump() << "OS-Version: " << v; +#endif // TDESKTOP_DISABLE_CRASH_REPORTS } QString demanglestr(const QString &mangled) {